Compare commits

...

9 Commits
1.4.3 ... 1.4.6

Author SHA1 Message Date
b6fed92a17 🚀RELEASE v1.4.6
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-04 20:10:57 +02:00
97b57aeb0c fix(donor/detail): Set email to null to avoid vaidation errors 2023-05-04 20:10:21 +02:00
e25ed1fff9 fix(donor/detail): Set phone to null to avoid vaidation errors 2023-05-04 20:09:43 +02:00
a2ff5b8a14 fix(donor/details): don't load donations 2023-05-04 20:07:54 +02:00
0284f18beb 🚀RELEASE v1.4.5
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-04 20:04:02 +02:00
803d64c78c fix: Removed dynamic pagesize adjustments
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-04 20:03:23 +02:00
dacb2f8ace Revert "revert: buggy pagination"
This reverts commit b2648645e8.
2023-05-04 19:57:46 +02:00
b7a53960e5 🚀RELEASE v1.4.4
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-04 14:44:31 +02:00
66f1e6b4fe fix(AddDonationModal): missing toast dismiss on success distance donation
Some checks failed
continuous-integration/drone/push Build is failing
2023-05-04 14:44:17 +02:00
10 changed files with 104 additions and 42 deletions

View File

@@ -2,9 +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.4.6](https://git.odit.services/lfk/frontend/compare/1.4.5...1.4.6)
- fix(donor/details): don't load donations [`a2ff5b8`](https://git.odit.services/lfk/frontend/commit/a2ff5b8a142ce4e6b8876f64935f9787ec44a51e)
- fix(donor/detail): Set email to null to avoid vaidation errors [`97b57ae`](https://git.odit.services/lfk/frontend/commit/97b57aeb0cc9058542a36dea9c8b2852169c250f)
- fix(donor/detail): Set phone to null to avoid vaidation errors [`e25ed1f`](https://git.odit.services/lfk/frontend/commit/e25ed1fff9b200605d5d2b78238b774ec7289aaa)
#### [1.4.5](https://git.odit.services/lfk/frontend/compare/1.4.4...1.4.5)
> 4 May 2023
- Revert "revert: buggy pagination" [`dacb2f8`](https://git.odit.services/lfk/frontend/commit/dacb2f8ace373f6594fc64af133971af053f00c0)
- fix: Removed dynamic pagesize adjustments [`803d64c`](https://git.odit.services/lfk/frontend/commit/803d64c78caa570d31d6055e70e2d2af6834f04b)
- 🚀RELEASE v1.4.5 [`0284f18`](https://git.odit.services/lfk/frontend/commit/0284f18beb8b24d4d4d071eca13bc5868666232c)
#### [1.4.4](https://git.odit.services/lfk/frontend/compare/1.4.3...1.4.4)
> 4 May 2023
- 🚀RELEASE v1.4.4 [`b7a5396`](https://git.odit.services/lfk/frontend/commit/b7a53960e5f37ae089d77bc11668d917145e2abb)
- fix(AddDonationModal): missing toast dismiss on success distance donation [`66f1e6b`](https://git.odit.services/lfk/frontend/commit/66f1e6b4fe1350ee79673a0aff97e36f44179c92)
#### [1.4.3](https://git.odit.services/lfk/frontend/compare/1.4.2...1.4.3) #### [1.4.3](https://git.odit.services/lfk/frontend/compare/1.4.2...1.4.3)
> 4 May 2023
- revert: buggy pagination [`b264864`](https://git.odit.services/lfk/frontend/commit/b2648645e8fc05f8742ecfc592557f954261671b) - revert: buggy pagination [`b264864`](https://git.odit.services/lfk/frontend/commit/b2648645e8fc05f8742ecfc592557f954261671b)
- 🚀RELEASE v1.4.3 [`33166bf`](https://git.odit.services/lfk/frontend/commit/33166bfafcffb9d86dfc7dfcd2cb8ba5c85da7e7)
#### [1.4.2](https://git.odit.services/lfk/frontend/compare/1.4.1...1.4.2) #### [1.4.2](https://git.odit.services/lfk/frontend/compare/1.4.1...1.4.2)

View File

@@ -13,7 +13,7 @@
<body> <body>
<span style="display: none; visibility: hidden" id="buildinfo" <span style="display: none; visibility: hidden" id="buildinfo"
>RELEASE_INFO-1.4.3-RELEASE_INFO</span >RELEASE_INFO-1.4.6-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>

View File

@@ -1,6 +1,6 @@
{ {
"name": "@odit/lfk-frontend", "name": "@odit/lfk-frontend",
"version": "1.4.3", "version": "1.4.6",
"type": "module", "type": "module",
"scripts": { "scripts": {
"i18n-order": "node order.js", "i18n-order": "node order.js",

View File

@@ -153,7 +153,7 @@
onMount(async () => { onMount(async () => {
toast.loading($_("loading-cards")); toast.loading($_("loading-cards"));
let page = 0; let page = 0;
let pagesize = 100; let pagesize = 500;
while (page >= 0) { while (page >= 0) {
const cards = await RunnerCardService.runnerCardControllerGetAll( const cards = await RunnerCardService.runnerCardControllerGetAll(
page, page,
@@ -171,7 +171,6 @@
dataLoaded = true; dataLoaded = true;
page++; page++;
pagesize += 100;
} }
toast.dismiss(); toast.dismiss();
toast.success($_("all-cards-loaded")); toast.success($_("all-cards-loaded"));

View File

@@ -89,12 +89,13 @@
amountPerDistance: amount_cent, amountPerDistance: amount_cent,
}; };
DonationService.donationControllerPostDistance(postdata) DonationService.donationControllerPostDistance(postdata)
.then((result) => { .then((result) => {
donor = donors[0].id || 0; donor = donors[0].id || 0;
runner = runners[0].id || 0; runner = runners[0].id || 0;
amount_input = 0; amount_input = 0;
modal_open = false; modal_open = false;
// //
toast.dismiss();
toast.success($_("donation_added")); toast.success($_("donation_added"));
dispatch("created", { donations: [result] }); dispatch("created", { donations: [result] });
}) })

View File

@@ -167,13 +167,26 @@
} }
onMount(async () => { onMount(async () => {
const donations = await DonationService.donationControllerGetAll(); let page = 0;
current_donations = donations; let pagesize = 300;
options.update((options) => ({ while (page >= 0) {
...options, const donations = await DonationService.donationControllerGetAll(
data: current_donations, page,
})); pagesize
dataLoaded = true; );
if (donations.length == 0) {
page = -2;
}
current_donations = current_donations.concat(...donations);
options.update((options) => ({
...options,
data: current_donations,
}));
dataLoaded = true;
page++;
}
}); });
</script> </script>

View File

@@ -12,7 +12,6 @@
$: delete_triggered = false; $: delete_triggered = false;
$: original_data = {}; $: original_data = {};
$: editable = {}; $: editable = {};
$: current_donations = [];
$: changes_performed = !( $: changes_performed = !(
JSON.stringify(original_data) === JSON.stringify(editable) JSON.stringify(original_data) === JSON.stringify(editable)
); );
@@ -29,11 +28,6 @@
isPhoneValidOrEmpty && isPhoneValidOrEmpty &&
((isAddress1Valid && iszipcodevalid && iscityvalid) || ((isAddress1Valid && iszipcodevalid && iscityvalid) ||
editable.address_checked === false); editable.address_checked === false);
const donation_promise = DonationService.donationControllerGetAll().then(
(val) => {
current_donations = val;
}
);
const promise = DonorService.donorControllerGetOne(params.donorid).then( const promise = DonorService.donorControllerGetOne(params.donorid).then(
(data) => { (data) => {
data_loaded = true; data_loaded = true;
@@ -69,7 +63,9 @@
editable.address = null; editable.address = null;
} }
if (editable.email) editable.email = editable.email; if (editable.email) editable.email = editable.email;
else editable.email = null;
if (editable.phone) editable.phone = editable.phone; if (editable.phone) editable.phone = editable.phone;
else editable.phone = null;
if (editable.middlename) editable.middlename = editable.middlename; if (editable.middlename) editable.middlename = editable.middlename;
editable.receiptNeeded = editable.address_checked; editable.receiptNeeded = editable.address_checked;
DonorService.donorControllerPut(original_data.id, editable) DonorService.donorControllerPut(original_data.id, editable)
@@ -96,7 +92,7 @@
</script> </script>
<ConfirmDonorDeletion bind:modal_open bind:delete_donor /> <ConfirmDonorDeletion bind:modal_open bind:delete_donor />
{#await promise && donation_promise} {#await promise}
{$_("loading-donor-details")} {$_("loading-donor-details")}
{:then} {:then}
<section class="container p-5 select-none"> <section class="container p-5 select-none">
@@ -206,8 +202,8 @@
> >
<br /> <br />
<span class="font-medium text-gray-700">{$_("donations")}:</span> <span class="font-medium text-gray-700">{$_("donations")}:</span>
{#if current_donations.filter((d) => d.donor.id == editable.id).length > 0} {#if original_data.donations.length > 0}
{#each current_donations.filter((o) => o.donor.id == editable.id) as d} {#each original_data.donations as d}
{#if d.responseType === "DISTANCEDONATION"} {#if d.responseType === "DISTANCEDONATION"}
<a <a
href="../donations/{d.id}" href="../donations/{d.id}"

View File

@@ -146,13 +146,23 @@
} }
onMount(async () => { onMount(async () => {
const donors = await DonorService.donorControllerGetAll(); let page = 0;
current_donors = donors; let pagesize = 300;
options.update((options) => ({ while (page >= 0) {
...options, const donors = await DonorService.donorControllerGetAll(page, pagesize);
data: donors, if (donors.length == 0) {
})); page = -2;
dataLoaded = true; }
current_donors = current_donors.concat(...donors);
options.update((options) => ({
...options,
data: current_donors,
}));
dataLoaded = true;
page++;
}
}); });
</script> </script>

View File

@@ -161,13 +161,22 @@
} }
); );
const runners = await RunnerService.runnerControllerGetAll(); let page = 0;
current_runners = runners; while (page >= 0) {
options.update((options) => ({ const runners = await RunnerService.runnerControllerGetAll(page, 500);
...options, if (runners.length == 0) {
data: current_runners, page = -2;
})); }
dataLoaded = true;
current_runners = current_runners.concat(...runners);
options.update((options) => ({
...options,
data: current_runners,
}));
dataLoaded = true;
page++;
}
}); });
</script> </script>

View File

@@ -178,13 +178,23 @@
} }
onMount(async () => { onMount(async () => {
const scans = await ScanService.scanControllerGetAll(); let page = 0;
current_scans = scans; let pagesize = 500;
options.update((options) => ({ while (page >= 0) {
...options, const scans = await ScanService.scanControllerGetAll(page, pagesize);
data: current_scans, if (scans.length == 0) {
})); page = -2;
dataLoaded = true; }
current_scans = current_scans.concat(...scans);
options.update((options) => ({
...options,
data: current_scans,
}));
dataLoaded = true;
page++;
}
}); });
</script> </script>