{#if store.state.jwtinfo.userdetails.permissions.includes("DONATION:GET")} {#if !dataLoaded} {:else if current_donations.length === 0} {:else}
{#each current_donations as donation} {#if donation.donor.firstname .toLowerCase() .includes(searchvalue.toLowerCase()) || donation.donor.lastname .toLowerCase() .includes(searchvalue.toLowerCase()) || donation.runner?.firstname .toLowerCase() .includes(searchvalue.toLowerCase()) || donation.runner?.lastname .toLowerCase() .includes(searchvalue.toLowerCase()) || should_display_based_on_id(donation.id)} {#if active_deletes[donation.id] === true} {:else} {/if} {/if} {/each}
{$_("donor")} {$_("runner")} {$_("amount-per-kilometer")} {$_("donation-amount")} {$_("paid-amount")} {$_("status")} {$_("action")}
{#if donation.runner} {:else}
{$_("fixed-donation")}
{/if}
{#if donation.amountPerDistance}
{(donation.amountPerDistance / 100) .toFixed(2) .toLocaleString("de-DE", { valute: "EUR" })}€
{:else}
{$_("fixed-donation")}
{/if}
{(donation.amount / 100) .toFixed(2) .toLocaleString("de-DE", { valute: "EUR" })}€
{(donation.paidAmount / 100) .toFixed(2) .toLocaleString("de-DE", { valute: "EUR" })}€
{#if donation.status == "PAID"} {$_("paid")} {:else} {$_("open")} {/if} {$_("details")} {#if store.state.jwtinfo.userdetails.permissions.includes("DONATION:DELETE")} {/if}
{/if} {/if}