This commit is contained in:
Philipp Dormann 2025-04-28 10:38:27 +02:00
parent 09b59175ee
commit 0baf2fc460
Signed by: philipp
GPG Key ID: 3BB9ADD52DCA4314

View File

@ -73,6 +73,28 @@
processed_last_submit = true;
});
} else if (type === "anonymous") {
let postdata = {
amount: amount_cent,
paidAmount: 0,
};
if (is_paid) {
postdata.paidAmount = amount_cent;
}
DonationService.donationControllerPostFixed(postdata)
.then((result) => {
amount_input = 0;
modal_open = false;
//
toast.dismiss();
toast.success($_("donation_added"));
dispatch("created", { donations: [result] });
})
.catch((err) => {
//
})
.finally(() => {
processed_last_submit = true;
});
} else if (type === "distance") {
let postdata = {
donor,