parent
5476808683
commit
d241ca5698
@ -20,6 +20,31 @@
|
||||
{$_('add-donor')}
|
||||
</button>
|
||||
{/if}
|
||||
{#if store.state.jwtinfo.userdetails.permissions.includes('DONOR:GET')}
|
||||
<button
|
||||
on:click={() => {
|
||||
const data = (current_donors.filter(d=>d.receiptNeeded===true)).map(function (d) {
|
||||
d.address.address2=d.address.address2===""?"":" "+d.address.address2;
|
||||
const address=`${d.address.address1}${d.address.address2}, ${d.address.postalcode} ${d.address.city}, ${d.address.country}`;
|
||||
return [d.firstname,d.middlename,d.lastname,d.donationAmount,address];
|
||||
})
|
||||
let csv = `${$_('csv_import__firstname')};${$_('csv_import__middlename')};${$_('csv_import__lastname')};${$_('total_donation_amount_in_eur')};${$_('address')}\n`;
|
||||
data.forEach(function(row) {
|
||||
csv += row.join(';');
|
||||
csv += "\n";
|
||||
});
|
||||
let hiddenElement = document.createElement('a');
|
||||
hiddenElement.href = 'data:text/csv;charset=utf-8,' + encodeURI(csv);
|
||||
hiddenElement.target = '_blank';
|
||||
hiddenElement.download = `${$_('filename_sponsoringquittungsliste')}.csv`;
|
||||
hiddenElement.click();
|
||||
hiddenElement.remove();
|
||||
}}
|
||||
type="button"
|
||||
class="w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-blue-600 text-base font-medium text-white hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 sm:ml-3 sm:w-auto sm:text-sm">
|
||||
{$_('sponsoring-quittungs-liste_herunterladen')}
|
||||
</button>
|
||||
{/if}
|
||||
</span>
|
||||
<DonorsOverview bind:current_donors />
|
||||
</section>
|
||||
|
@ -1,5 +1,5 @@
|
||||
<script>
|
||||
import { getLocaleFromNavigator, _ } from "svelte-i18n";
|
||||
import { _ } from "svelte-i18n";
|
||||
import { DonationService, DonorService } from "@odit/lfk-client-js";
|
||||
import store from "../../store";
|
||||
import DonorsEmptyState from "./DonorsEmptyState.svelte";
|
||||
|
@ -183,6 +183,7 @@
|
||||
"everything-concerning-your-profile": "Alles zu deinem Profil",
|
||||
"everything-is-more-fun-together": "Im Team macht's mehr Spaß 🏃♂️🏃♀️🏃♂️",
|
||||
"faq": "FAQ",
|
||||
"filename_sponsoringquittungsliste": "SponsoringQuittungsListe",
|
||||
"filter-by-organization-team": "Filtern nach Organisation / Team",
|
||||
"first-name": "Vorname",
|
||||
"first-name-is-required": "Vorname muss angegeben werden",
|
||||
@ -354,6 +355,7 @@
|
||||
"settings": "Einstellungen",
|
||||
"settings-for-your-profile": "Die Einstellungen deines Accounts",
|
||||
"something-about-the-group": "Infos zur Gruppe",
|
||||
"sponsoring-quittungs-liste_herunterladen": "Sponsoring-Quittungs-Liste herunterladen",
|
||||
"sponsorings": "Sponsoringerklaerungen",
|
||||
"stats-are-being-loaded": "Die Statistiken werden geladen...",
|
||||
"status": "Status",
|
||||
@ -386,6 +388,7 @@
|
||||
"total-donation-amount": "Gesamtbetrag",
|
||||
"total-donations": "Spendensumme",
|
||||
"total-scans": "gesamte Scans",
|
||||
"total_donation_amount_in_eur": "Gesamtbetrag in €",
|
||||
"track": "Track",
|
||||
"track-added": "Track hinzugefügt",
|
||||
"track-data-is-being-loaded": "Trackdaten werden geladen",
|
||||
@ -395,6 +398,7 @@
|
||||
"track-name": "Trackname",
|
||||
"track-name-must-not-be-empty": "Der Name muss angegeben werden",
|
||||
"tracks": "Tracks",
|
||||
"update-card": "Karte aktualisieren",
|
||||
"update-password": "Passwort ändern",
|
||||
"updated-contact": "Kontakt aktualisiert!",
|
||||
"updated-donor": "Sponsor:in wurde aktualisiert",
|
||||
|
@ -183,6 +183,7 @@
|
||||
"everything-concerning-your-profile": "Everything concerning your profile",
|
||||
"everything-is-more-fun-together": "everything is more fun together 🏃♂️🏃♀️🏃♂️",
|
||||
"faq": "FAQ",
|
||||
"filename_sponsoringquittungsliste": "DonorReceiptList",
|
||||
"filter-by-organization-team": "Filter by Organization/ Team",
|
||||
"first-name": "First name",
|
||||
"first-name-is-required": "First Name is required",
|
||||
@ -354,6 +355,7 @@
|
||||
"settings": "Settings",
|
||||
"settings-for-your-profile": "Settings for your profile",
|
||||
"something-about-the-group": "Something about the group...",
|
||||
"sponsoring-quittungs-liste_herunterladen": "Download Donor Receipt List",
|
||||
"sponsorings": "Sponsorings",
|
||||
"stats-are-being-loaded": "stats are being loaded...",
|
||||
"status": "Status",
|
||||
@ -386,6 +388,7 @@
|
||||
"total-donation-amount": "total donation amount",
|
||||
"total-donations": "total donations",
|
||||
"total-scans": "total scans",
|
||||
"total_donation_amount_in_eur": "Total donation amount in €",
|
||||
"track": "Track",
|
||||
"track-added": "Track added",
|
||||
"track-data-is-being-loaded": "Track data is being loaded",
|
||||
|
Loading…
x
Reference in New Issue
Block a user