feat(donations): Donations reactive create and load into datatable
This commit is contained in:
@@ -4,11 +4,13 @@
|
||||
|
||||
import { DonationService } from "@odit/lfk-client-js";
|
||||
import Toastify from "toastify-js";
|
||||
import { createEventDispatcher } from "svelte";
|
||||
export let payment_modal_open = false;
|
||||
export let current_donations = [];
|
||||
export let editable = {};
|
||||
export let original_data = {};
|
||||
export let paid_amount_input = 0;
|
||||
const dispatch = createEventDispatcher();
|
||||
$:processed_last_submit=true;
|
||||
function focus(el) {
|
||||
el.focus();
|
||||
@@ -52,8 +54,7 @@
|
||||
duration: 500,
|
||||
backgroundColor: "linear-gradient(to right, #00b09b, #96c93d)",
|
||||
}).showToast();
|
||||
current_donations[current_donations.findIndex((c) => c.id === id)] = result;
|
||||
current_donations = current_donations;
|
||||
dispatch("created", {donation: response})
|
||||
})
|
||||
.catch((err) => {
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user