diff --git a/src/components/donations/DonationDetail.svelte b/src/components/donations/DonationDetail.svelte index 3c770589..7dea62de 100644 --- a/src/components/donations/DonationDetail.svelte +++ b/src/components/donations/DonationDetail.svelte @@ -8,6 +8,7 @@ } from "@odit/lfk-client-js"; import Toastify from "toastify-js"; import PromiseError from "../base/PromiseError.svelte"; + import Select from "svelte-select"; let data_loaded = false; export let params; $: delete_triggered = false; @@ -46,6 +47,11 @@ } original_comparison_string = JSON.stringify(editable); }); + const getDonorLabel = (option) => + option.firstname + " " + (option.middlename || "") + " " + option.lastname; + const filterDonors = (label, filterText, option) => + label.toLowerCase().includes(filterText.toLowerCase()) || + option.id.toString().startsWith(filterText.toLowerCase()); function submit() { if (data_loaded === true && save_enabled) { @@ -62,6 +68,7 @@ .then((resp) => { Object.assign(original_data, resp); original_data = original_data; + original_comparison_string = JSON.stringify(editable); Toastify({ text: "updated donation", duration: 2500, @@ -192,7 +199,8 @@
- {$_('total-donation-amount')}: + {$_('total-donation-amount')}: {(editable.amount / 100) .toFixed(2) .toLocaleString('de-DE', { valute: 'EUR' })}€ @@ -201,34 +209,34 @@ - + - {#each current_runners as r} - - {/each} - +