fix(donations): Support anon donations in deletion modal

This commit is contained in:
Nicolai Ort 2025-04-28 20:06:27 +02:00
parent e28f543d89
commit 27187b428d
Signed by: niggl
GPG Key ID: 13AFA55AF62F269F

View File

@ -13,6 +13,7 @@
firstname: "", firstname: "",
lastname: "", lastname: "",
}, },
amount: 0,
}; };
const dispatch = createEventDispatcher(); const dispatch = createEventDispatcher();
onMount(() => { onMount(() => {
@ -86,8 +87,10 @@
</h3> </h3>
<div class="w-full"> <div class="w-full">
<span class="inline-block" <span class="inline-block"
><b>{$_("donor")}</b>: {delete_donation.donor.firstname} >{#if delete_donation.donor}<b>{$_("donor")}</b>: {delete_donation.donor.firstname}
{delete_donation.donor.lastname}</span {delete_donation.donor.lastname}{:else}{$_("anonymer_sponsor")}{/if}: {`${(delete_donation.amount / 100)
.toFixed(2)
.toLocaleString("de-DE", { valute: "EUR" })}€`}</span
> >
</div> </div>
</div> </div>