Compare commits

...

3 Commits
1.4.6 ... 1.4.7

Author SHA1 Message Date
6364536dcd
🚀RELEASE v1.4.7
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-04 20:30:20 +02:00
a8a771114d
Paginated modal data loading 2023-05-04 20:28:21 +02:00
4e0a2c8301
Moved loading to onmount 2023-05-04 20:17:29 +02:00
4 changed files with 41 additions and 14 deletions

View File

@ -2,8 +2,16 @@
All notable changes to this project will be documented in this file. Dates are displayed in UTC.
#### [1.4.7](https://git.odit.services/lfk/frontend/compare/1.4.6...1.4.7)
- Paginated modal data loading [`a8a7711`](https://git.odit.services/lfk/frontend/commit/a8a771114df6eb57d5b1d5497a5be49e619d4102)
- Moved loading to onmount [`4e0a2c8`](https://git.odit.services/lfk/frontend/commit/4e0a2c83015bde5e360c5fb2c0babbeaa03dc2b5)
#### [1.4.6](https://git.odit.services/lfk/frontend/compare/1.4.5...1.4.6)
> 4 May 2023
- 🚀RELEASE v1.4.6 [`b6fed92`](https://git.odit.services/lfk/frontend/commit/b6fed92a176af1c975484d9146ee5634e0031401)
- 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)

View File

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

View File

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

View File

@ -8,7 +8,7 @@
RunnerService,
} from "@odit/lfk-client-js";
import Select from "svelte-select";
import { createEventDispatcher } from "svelte";
import { createEventDispatcher, onMount } from "svelte";
import toast from "svelte-french-toast";
export let modal_open;
const dispatch = createEventDispatcher();
@ -23,16 +23,6 @@
$: runners = [];
$: is_fixed = false;
$: is_paid = false;
DonorService.donorControllerGetAll().then((val) => {
donors = val.map((r) => {
return { label: getDonorLabel(r), value: r };
});
});
RunnerService.runnerControllerGetAll().then((val) => {
runners = val.map((r) => {
return { label: getDonorLabel(r), value: r };
});
});
$: amount_input = 0;
$: processed_last_submit = true;
$: is_amount_valid = amount_input > 0;
@ -89,7 +79,7 @@
amountPerDistance: amount_cent,
};
DonationService.donationControllerPostDistance(postdata)
.then((result) => {
.then((result) => {
donor = donors[0].id || 0;
runner = runners[0].id || 0;
amount_input = 0;
@ -108,6 +98,35 @@
}
}
}
onMount(()=>{
loadDonorsAndRunnersPaginated();
})
async function loadDonorsAndRunnersPaginated() {
let page = 0;
let pagesize = 500;
while (page >= 0) {
const don = await DonorService.donorControllerGetAll(page, pagesize);
const run = await RunnerService.runnerControllerGetAll(page, pagesize);
if (don.length == 0 && run.length == 0) {
page = -2;
}
donors = donors.concat(
...run.map((r) => {
return { label: getDonorLabel(r), value: r };
})
);
runners = runners.concat(
...run.map((r) => {
return { label: getDonorLabel(r), value: r };
})
);
dataLoaded = true;
page++;
}
}
</script>
{#if modal_open}