Compare commits

...

9 Commits

Author SHA1 Message Date
56c3365656 add svelte-french-toast
Some checks failed
continuous-integration/drone/push Build is failing
2023-04-22 11:11:50 +02:00
e7b2c64798 🚀RELEASE v1.3.4
Some checks failed
continuous-integration/drone/push Build is failing
2023-04-19 18:23:17 +02:00
7cb6b63eb9 Smaller sponsoring page size 2023-04-19 18:23:07 +02:00
d6d88f5f60 🚀RELEASE v1.3.3
Some checks failed
continuous-integration/drone/push Build is failing
2023-04-19 18:18:44 +02:00
2c208c4381 bumped lfk-client-js 2023-04-19 18:18:26 +02:00
39bc6c4945 🚀RELEASE v1.3.2
Some checks failed
continuous-integration/drone/push Build is failing
2023-04-19 18:17:18 +02:00
b94e3b745f fix(donors): Shortened texts 2023-04-19 18:16:50 +02:00
6f337aeee1 feat(donations): Resolve donations via donor 2023-04-19 18:15:15 +02:00
5d48060834 fix(donors): Removed debug infos 2023-04-19 18:12:24 +02:00
11 changed files with 72 additions and 34 deletions

View File

@@ -2,10 +2,33 @@
All notable changes to this project will be documented in this file. Dates are displayed in UTC. All notable changes to this project will be documented in this file. Dates are displayed in UTC.
#### [1.3.4](https://git.odit.services/lfk/frontend/compare/1.3.3...1.3.4)
- Smaller sponsoring page size [`7cb6b63`](https://git.odit.services/lfk/frontend/commit/7cb6b63eb9596da4ee84369b220c3e680c607032)
#### [1.3.3](https://git.odit.services/lfk/frontend/compare/1.3.2...1.3.3)
> 19 April 2023
- 🚀RELEASE v1.3.3 [`d6d88f5`](https://git.odit.services/lfk/frontend/commit/d6d88f5f60716ca496a17f09b835b23223ec495d)
- bumped lfk-client-js [`2c208c4`](https://git.odit.services/lfk/frontend/commit/2c208c438185892270a0ebd37deb6a7c9ac08fc0)
#### [1.3.2](https://git.odit.services/lfk/frontend/compare/1.3.1...1.3.2)
> 19 April 2023
- 🚀RELEASE v1.3.2 [`39bc6c4`](https://git.odit.services/lfk/frontend/commit/39bc6c49450964510f996369d014f92c569188ae)
- fix(donors): Shortened texts [`b94e3b7`](https://git.odit.services/lfk/frontend/commit/b94e3b745f2febbe91e16a7a26f96b47d347ab92)
- feat(donations): Resolve donations via donor [`6f337ae`](https://git.odit.services/lfk/frontend/commit/6f337aeee16267d1e67e3d3855b63b6f2e57979f)
- fix(donors): Removed debug infos [`5d48060`](https://git.odit.services/lfk/frontend/commit/5d48060834717b2244172a0914e2690f8fe634d9)
#### [1.3.1](https://git.odit.services/lfk/frontend/compare/1.3.0...1.3.1) #### [1.3.1](https://git.odit.services/lfk/frontend/compare/1.3.0...1.3.1)
> 19 April 2023
- feat(donations): Donation table filtering [`91ab199`](https://git.odit.services/lfk/frontend/commit/91ab199769c9f4f8051c74ad43a701db321f3995) - feat(donations): Donation table filtering [`91ab199`](https://git.odit.services/lfk/frontend/commit/91ab199769c9f4f8051c74ad43a701db321f3995)
- feat(donors): Added name and address filtering [`27b4dde`](https://git.odit.services/lfk/frontend/commit/27b4dde7551995c9d7e8ca33a9bd97d429a35801) - feat(donors): Added name and address filtering [`27b4dde`](https://git.odit.services/lfk/frontend/commit/27b4dde7551995c9d7e8ca33a9bd97d429a35801)
- 🚀RELEASE v1.3.1 [`c842c20`](https://git.odit.services/lfk/frontend/commit/c842c203e2fbf0a201297d475db9047c0691bd52)
- More filtering [`5bcfc8d`](https://git.odit.services/lfk/frontend/commit/5bcfc8db752fce96e9f523d14cefff1a4f675661) - More filtering [`5bcfc8d`](https://git.odit.services/lfk/frontend/commit/5bcfc8db752fce96e9f523d14cefff1a4f675661)
#### [1.3.0](https://git.odit.services/lfk/frontend/compare/1.2.0...1.3.0) #### [1.3.0](https://git.odit.services/lfk/frontend/compare/1.2.0...1.3.0)

View File

@@ -13,7 +13,7 @@
</head> </head>
<body> <body>
<span style="display: none;visibility: hidden;" id="buildinfo">RELEASE_INFO-1.3.1-RELEASE_INFO</span> <span style="display: none;visibility: hidden;" id="buildinfo">RELEASE_INFO-1.3.4-RELEASE_INFO</span>
<noscript>You need to enable JavaScript to run this app.</noscript> <noscript>You need to enable JavaScript to run this app.</noscript>
<script src="/env.js"></script> <script src="/env.js"></script>
<script type="module" src="/src/main.js"></script> <script type="module" src="/src/main.js"></script>

View File

@@ -1,6 +1,6 @@
{ {
"name": "@odit/lfk-frontend", "name": "@odit/lfk-frontend",
"version": "1.3.1", "version": "1.3.4",
"type": "module", "type": "module",
"scripts": { "scripts": {
"i18n-order": "node order.js", "i18n-order": "node order.js",
@@ -39,7 +39,7 @@
} }
}, },
"dependencies": { "dependencies": {
"@odit/lfk-client-js": "1.1.0", "@odit/lfk-client-js": "1.1.1",
"@paralleldrive/cuid2": "^2.2.0", "@paralleldrive/cuid2": "^2.2.0",
"@tanstack/svelte-table": "^8.8.5", "@tanstack/svelte-table": "^8.8.5",
"bwip-js": "^3.4.0", "bwip-js": "^3.4.0",
@@ -49,6 +49,7 @@
"localforage": "1.10.0", "localforage": "1.10.0",
"marked": "2.0.3", "marked": "2.0.3",
"svelte": "3.58.0", "svelte": "3.58.0",
"svelte-french-toast": "1.0.4-beta.0",
"svelte-i18n": "3.6.0", "svelte-i18n": "3.6.0",
"tinro": "0.6.12", "tinro": "0.6.12",
"toastify-js": "1.12.0", "toastify-js": "1.12.0",

28
pnpm-lock.yaml generated
View File

@@ -2,8 +2,8 @@ lockfileVersion: '6.0'
dependencies: dependencies:
'@odit/lfk-client-js': '@odit/lfk-client-js':
specifier: 1.1.0 specifier: 1.1.1
version: 1.1.0 version: 1.1.1
'@paralleldrive/cuid2': '@paralleldrive/cuid2':
specifier: ^2.2.0 specifier: ^2.2.0
version: 2.2.0 version: 2.2.0
@@ -31,6 +31,9 @@ dependencies:
svelte: svelte:
specifier: 3.58.0 specifier: 3.58.0
version: 3.58.0 version: 3.58.0
svelte-french-toast:
specifier: 1.0.4-beta.0
version: 1.0.4-beta.0(svelte@3.58.0)
svelte-i18n: svelte-i18n:
specifier: 3.6.0 specifier: 3.6.0
version: 3.6.0(svelte@3.58.0) version: 3.6.0(svelte@3.58.0)
@@ -510,8 +513,8 @@ packages:
'@octokit/openapi-types': 16.0.0 '@octokit/openapi-types': 16.0.0
dev: true dev: true
/@odit/lfk-client-js@1.1.0: /@odit/lfk-client-js@1.1.1:
resolution: {integrity: sha512-yhjsi7YMzL9/fJ7o06yszzw15iZhao3VmX0G9oqZWFwYJd1M2td3Lvm76mXNzTVlbdG6W0W3+eEjcalBdo51Pg==} resolution: {integrity: sha512-EVwK/kT8VBs0vLk64KgCsHCl2heWHJMWAmZAghEDZWPCPQWX9xL6UzRuKewLXl36/T9YKqZLfDyM5e3WfgLyOg==}
dev: false dev: false
/@odit/license-exporter@0.0.12: /@odit/license-exporter@0.0.12:
@@ -3443,6 +3446,15 @@ packages:
engines: {node: '>= 0.4'} engines: {node: '>= 0.4'}
dev: true dev: true
/svelte-french-toast@1.0.4-beta.0(svelte@3.58.0):
resolution: {integrity: sha512-PkYNukEQAPZyV5ei+JzeYEsbaXFSbJS8/SDTdC8giYa5Atxp2SRepFnPDWx6mu7rV53g886FNLktPMLwRljkpw==}
peerDependencies:
svelte: ^3.57.0
dependencies:
svelte: 3.58.0
svelte-writable-derived: 3.0.1(svelte@3.58.0)
dev: false
/svelte-hmr@0.15.1(svelte@3.58.0): /svelte-hmr@0.15.1(svelte@3.58.0):
resolution: {integrity: sha512-BiKB4RZ8YSwRKCNVdNxK/GfY+r4Kjgp9jCLEy0DuqAKfmQtpL38cQK3afdpjw4sqSs4PLi3jIPJIFp259NkZtA==} resolution: {integrity: sha512-BiKB4RZ8YSwRKCNVdNxK/GfY+r4Kjgp9jCLEy0DuqAKfmQtpL38cQK3afdpjw4sqSs4PLi3jIPJIFp259NkZtA==}
engines: {node: ^12.20 || ^14.13.1 || >= 16} engines: {node: ^12.20 || ^14.13.1 || >= 16}
@@ -3472,6 +3484,14 @@ packages:
resolution: {integrity: sha512-ITmX/XUiSdkaILmsTviKRkZPaXckM5/FA7Y8BhiUPoamaZG/ZDyOo6ydjFu9fDVFTbwoAUGUi6HBjs+ZdK2AwA==} resolution: {integrity: sha512-ITmX/XUiSdkaILmsTviKRkZPaXckM5/FA7Y8BhiUPoamaZG/ZDyOo6ydjFu9fDVFTbwoAUGUi6HBjs+ZdK2AwA==}
dev: true dev: true
/svelte-writable-derived@3.0.1(svelte@3.58.0):
resolution: {integrity: sha512-zBWCS5c3MA9o4NT/UJHP3KoPOhtmH2ZQ/QRK31w9LzLdPP7MNncUcBGIu4iH2RVt17iRfR6agm7nEqwNvsYuMw==}
peerDependencies:
svelte: ^3.2.1
dependencies:
svelte: 3.58.0
dev: false
/svelte@3.58.0: /svelte@3.58.0:
resolution: {integrity: sha512-brIBNNB76mXFmU/Kerm4wFnkskBbluBDCjx/8TcpYRb298Yh2dztS2kQ6bhtjMcvUhd5ynClfwpz5h2gnzdQ1A==} resolution: {integrity: sha512-brIBNNB76mXFmU/Kerm4wFnkskBbluBDCjx/8TcpYRb298Yh2dztS2kQ6bhtjMcvUhd5ynClfwpz5h2gnzdQ1A==}
engines: {node: '>= 8'} engines: {node: '>= 8'}

View File

@@ -2,7 +2,7 @@
import { _ } from "svelte-i18n"; import { _ } from "svelte-i18n";
import { RunnerCardService } from "@odit/lfk-client-js"; import { RunnerCardService } from "@odit/lfk-client-js";
import store from "../../store"; import store from "../../store";
import Toastify from "toastify-js"; import toast from "svelte-french-toast";
import CardsEmptyState from "./CardsEmptyState.svelte"; import CardsEmptyState from "./CardsEmptyState.svelte";
import CardDetailModal from "./CardDetailModal.svelte"; import CardDetailModal from "./CardDetailModal.svelte";
import GenerateRunnerCards from "../pdf_generation/GenerateRunnerCards.svelte"; import GenerateRunnerCards from "../pdf_generation/GenerateRunnerCards.svelte";
@@ -148,14 +148,11 @@
...options, ...options,
data: current_cards, data: current_cards,
})); }));
Toastify({ toast.success($_("card-deleted"));
text: $_("card-deleted"),
duration: 3500,
backgroundColor: "linear-gradient(to right, #00b09b, #96c93d)",
}).showToast();
} }
onMount(async () => { onMount(async () => {
toast.loading("Karten werden geladen...");
let page = 0; let page = 0;
while (page >= 0) { while (page >= 0) {
const cards = await RunnerCardService.runnerCardControllerGetAll( const cards = await RunnerCardService.runnerCardControllerGetAll(
@@ -175,6 +172,8 @@
dataLoaded = true; dataLoaded = true;
page++; page++;
} }
toast.dismiss();
toast.success("All cards loaded");
console.log("All cards loaded"); console.log("All cards loaded");
}); });
</script> </script>

View File

@@ -5,6 +5,7 @@
import { router } from "tinro"; import { router } from "tinro";
import NoComponentLoaded from "../base/NoComponentLoaded.svelte"; import NoComponentLoaded from "../base/NoComponentLoaded.svelte";
import { AuthService } from "@odit/lfk-client-js"; import { AuthService } from "@odit/lfk-client-js";
import { Toaster } from 'svelte-french-toast';
$: navOpen = false; $: navOpen = false;
function logout() { function logout() {
localForage.clear(); localForage.clear();
@@ -345,6 +346,7 @@
d="M3 5a1 1 0 011-1h12a1 1 0 110 2H4A1 1 0 013 5zm0 5a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zm0 5a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1z" d="M3 5a1 1 0 011-1h12a1 1 0 110 2H4A1 1 0 013 5zm0 5a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zm0 5a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1z"
clip-rule="evenodd" /></svg></button> clip-rule="evenodd" /></svg></button>
</header> </header>
<Toaster position="top-right" />
<slot> <slot>
<NoComponentLoaded /> <NoComponentLoaded />
</slot> </slot>

View File

@@ -23,7 +23,10 @@
import DonationStatus from "./DonationStatus.svelte"; import DonationStatus from "./DonationStatus.svelte";
import DonationTableAction from "./DonationTableAction.svelte"; import DonationTableAction from "./DonationTableAction.svelte";
import DeleteDonationModal from "./DeleteDonationModal.svelte"; import DeleteDonationModal from "./DeleteDonationModal.svelte";
import { donationDonorFilter, donationRunnerFilter } from "../shared/tablefilters"; import {
donationDonorFilter,
donationRunnerFilter,
} from "../shared/tablefilters";
$: searchvalue = ""; $: searchvalue = "";
$: active_deletes = []; $: active_deletes = [];
$: active_edits = []; $: active_edits = [];
@@ -173,7 +176,7 @@
while (page >= 0) { while (page >= 0) {
const donations = await DonationService.donationControllerGetAll( const donations = await DonationService.donationControllerGetAll(
page, page,
500 100
); );
if (donations.length == 0) { if (donations.length == 0) {
page = -2; page = -2;

View File

@@ -17,10 +17,10 @@
> >
{:else} {:else}
<a <a
href="../donations/{d.id}" href="../donations/{donation.id}"
class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-green-700 text-white mr-1" class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-green-700 text-white mr-1"
>{$_("fixed-donation")}: >{$_("fixed-donation")}:
{(d.amount / 100) {(donation.amount / 100)
.toFixed(2) .toFixed(2)
.toLocaleString("de-DE", { valute: "EUR" })}</a .toLocaleString("de-DE", { valute: "EUR" })}</a
> >

View File

@@ -25,7 +25,6 @@
import { filterAddress, filterName } from "../shared/tablefilters"; import { filterAddress, filterName } from "../shared/tablefilters";
$: searchvalue = ""; $: searchvalue = "";
$: active_deletes = []; $: active_deletes = [];
$: current_donations = [];
$: selectedDonors = $: selectedDonors =
$table?.getSelectedRowModel().rows.map((row) => row.original) || []; $table?.getSelectedRowModel().rows.map((row) => row.original) || [];
$: selected = $: selected =
@@ -71,13 +70,10 @@
filterFn: `address`, filterFn: `address`,
}, },
{ {
accessorKey: "sponsorings", accessorKey: "donations",
header: () => $_("sponsorings"), header: () => $_("sponsorings"),
cell: (info) => { cell: (info) => {
const donations = current_donations.filter( return renderComponent(DonorDonations, { donations: info.getValue() });
(d) => d?.donor?.id == info.row.original.id
);
return renderComponent(DonorDonations, { donations });
}, },
enableColumnFilter: false, enableColumnFilter: false,
}, },
@@ -153,16 +149,11 @@
let page = 0; let page = 0;
while (page >= 0) { while (page >= 0) {
const donors = await DonorService.donorControllerGetAll(page, 500); const donors = await DonorService.donorControllerGetAll(page, 500);
const donations = await DonationService.donationControllerGetAll( if (donors.length == 0) {
page,
500
);
if (donors.length == 0 && donations.length == 0) {
page = -2; page = -2;
} }
current_donors = current_donors.concat(...donors); current_donors = current_donors.concat(...donors);
current_donations = current_donations.concat(...donors);
options.update((options) => ({ options.update((options) => ({
...options, ...options,
data: current_donors, data: current_donors,
@@ -197,7 +188,6 @@
modal_open={active_deletes.length > 0} modal_open={active_deletes.length > 0}
delete_donor={active_deletes[0]} delete_donor={active_deletes[0]}
/> />
{active_deletes.length}
{#if store.state.jwtinfo.userdetails.permissions.includes("DONOR:GET")} {#if store.state.jwtinfo.userdetails.permissions.includes("DONOR:GET")}
{#if !dataLoaded} {#if !dataLoaded}
<div <div

View File

@@ -187,7 +187,7 @@
"donor": "Sponsor:in", "donor": "Sponsor:in",
"donor-added": "Sponsor:in hinzugefügt", "donor-added": "Sponsor:in hinzugefügt",
"donor-deleted": "Sponsor:in gelöscht", "donor-deleted": "Sponsor:in gelöscht",
"donor-has-no-associated-donations": "Zur Sponsor:in gibt es noch keine Sponsorings", "donor-has-no-associated-donations": "Keine Sponsorings",
"donor-is-being-added": "Sponsor:in wird hinzugefügt...", "donor-is-being-added": "Sponsor:in wird hinzugefügt...",
"donor-is-being-updated": "Sponsor:in wird aktualisiert", "donor-is-being-updated": "Sponsor:in wird aktualisiert",
"donors": "Sponsor:innen", "donors": "Sponsor:innen",
@@ -442,7 +442,7 @@
"total-donation-count": "Gesamte Sponsorings", "total-donation-count": "Gesamte Sponsorings",
"total-donations": "Spendensumme", "total-donations": "Spendensumme",
"total-donors": "gesamte Sponsor:innen", "total-donors": "gesamte Sponsor:innen",
"total-paid-amount": "Gezahlter Gesamtbetrag", "total-paid-amount": "Gezahlt",
"total-scans": "gesamte Scans", "total-scans": "gesamte Scans",
"total_donation_amount_in_eur": "Gesamtbetrag in €", "total_donation_amount_in_eur": "Gesamtbetrag in €",
"track": "Track", "track": "Track",

View File

@@ -187,7 +187,7 @@
"donor": "Donor", "donor": "Donor",
"donor-added": "Donor added", "donor-added": "Donor added",
"donor-deleted": "donor deleted", "donor-deleted": "donor deleted",
"donor-has-no-associated-donations": "Donor has no associated donations.", "donor-has-no-associated-donations": "No donations",
"donor-is-being-added": "Donor is being added...", "donor-is-being-added": "Donor is being added...",
"donor-is-being-updated": "Donor is being updated", "donor-is-being-updated": "Donor is being updated",
"donors": "Donors", "donors": "Donors",
@@ -442,7 +442,7 @@
"total-donation-count": "total donations (count)", "total-donation-count": "total donations (count)",
"total-donations": "total donations", "total-donations": "total donations",
"total-donors": "total donors", "total-donors": "total donors",
"total-paid-amount": "Total paid amount", "total-paid-amount": "Paid",
"total-scans": "total scans", "total-scans": "total scans",
"total_donation_amount_in_eur": "Total donation amount in €", "total_donation_amount_in_eur": "Total donation amount in €",
"track": "Track", "track": "Track",