Fixed donation badges now show their amount

ref #79
This commit is contained in:
Nicolai Ort 2021-02-25 16:58:14 +01:00
parent 3d51ba0dc2
commit fb5a64c251

View File

@ -193,7 +193,8 @@
<span>{(editable.donationAmount / 100) <span>{(editable.donationAmount / 100)
.toFixed(2) .toFixed(2)
.toLocaleString('de-DE', { valute: 'EUR' })}€</span> .toLocaleString('de-DE', { valute: 'EUR' })}€</span>
<br> <br />
<span class="font-medium text-gray-700">{$_('donations')}:</span>
{#if current_donations.filter((d) => d.donor.id == editable.id).length > 0} {#if current_donations.filter((d) => d.donor.id == editable.id).length > 0}
{#each current_donations.filter((o) => o.donor.id == editable.id) as d} {#each current_donations.filter((o) => o.donor.id == editable.id) as d}
{#if d.responseType === 'DISTANCEDONATION'} {#if d.responseType === 'DISTANCEDONATION'}
@ -205,8 +206,10 @@
{:else} {:else}
<a <a
href="../donations/{d.id}" href="../donations/{d.id}"
class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-gray-100 text-gray-800">Fixed: class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-gray-100 text-gray-800">{$_('fixed-donation')}:
{d.id}</a> {(d.amount / 100)
.toFixed(2)
.toLocaleString('de-DE', { valute: 'EUR' })}€</a>
{/if} {/if}
{/each} {/each}
{:else}Donor has no associated donations.{/if} {:else}Donor has no associated donations.{/if}