diff --git a/src/components/donations/AddDonationModal.svelte b/src/components/donations/AddDonationModal.svelte index 5946715c..c4fa24ee 100644 --- a/src/components/donations/AddDonationModal.svelte +++ b/src/components/donations/AddDonationModal.svelte @@ -22,7 +22,6 @@ $: donors = []; $: runners = []; $: type = "distance"; - $: is_fixed = false; $: is_paid = false; $: amount_input = 0; $: processed_last_submit = true; @@ -47,7 +46,7 @@ let amount_cent = Math.floor(amount_input * 100); processed_last_submit = false; toast.loading($_("adding-donation")); - if (is_fixed) { + if (type === "fixed") { let postdata = { donor, amount: amount_cent, @@ -73,7 +72,8 @@ .finally(() => { processed_last_submit = true; }); - } else { + } else if (type === "anonymous") { + } else if (type === "distance") { let postdata = { donor, runner, @@ -258,7 +258,7 @@ on:clear={() => (donors = null)} /> - {#if !is_fixed} + {#if type === "distance"}
{/if}
- {#if is_fixed} -
+ {#if type === "fixed"} +
+ -

- - - {#if is_paid} - {$_("paid")} - {:else} - {$_("open")} - {/if} - -

{/if} {/if}