feat(donations): Donations reactive create and load into datatable

This commit is contained in:
2023-04-19 17:21:24 +02:00
parent 133470b6f2
commit 02003ec80e
4 changed files with 238 additions and 192 deletions

View File

@@ -36,6 +36,13 @@
export let editable = {};
export let original_data = {};
export let paid_amount_input = 0;
export const addDonations = (donations) => {
current_donations = current_donations.concat(...donations);
options.update((options) => ({
...options,
data: current_donations,
}));
};
function open_payment_modal(donation) {
editable = Object.assign({}, donation);
@@ -104,7 +111,7 @@
accessorKey: "status",
header: () => $_("status"),
cell: (info) => {
return renderComponent(DonationStatus, {status: info.getValue()});
return renderComponent(DonationStatus, { status: info.getValue() });
},
enableColumnFilter: false,
},