{#if store.state.jwtinfo.userdetails.permissions.includes('DONATION:GET')} {#await donations_promise} {:then} {#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')} {$_('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' })}€
{$_('details')} {#if store.state.jwtinfo.userdetails.permissions.includes('DONATION:DELETE')} {/if}
{/if} {:catch error}
{$_('general_promise_error')} {error}
{/await} {/if}