Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
b5c079da9a | |||
93422b9779 |
@ -2,8 +2,15 @@
|
|||||||
|
|
||||||
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.12.6](https://git.odit.services/lfk/frontend/compare/1.12.5...1.12.6)
|
||||||
|
|
||||||
|
- feat(pdfs): Experimental generation of large runner card files [`93422b9`](https://git.odit.services/lfk/frontend/commit/93422b97799c5e45c89acadd34f33b1a11b04617)
|
||||||
|
|
||||||
#### [1.12.5](https://git.odit.services/lfk/frontend/compare/1.12.4...1.12.5)
|
#### [1.12.5](https://git.odit.services/lfk/frontend/compare/1.12.4...1.12.5)
|
||||||
|
|
||||||
|
> 1 May 2025
|
||||||
|
|
||||||
|
- chore(release): 1.12.5 [`6dcfd9a`](https://git.odit.services/lfk/frontend/commit/6dcfd9a4fedd1e44894c9803482576bc650fb4db)
|
||||||
- fix(locales): Fixed translation [`2139524`](https://git.odit.services/lfk/frontend/commit/21395241de4de8f3a6b8404758d09c01d8a6f95f)
|
- fix(locales): Fixed translation [`2139524`](https://git.odit.services/lfk/frontend/commit/21395241de4de8f3a6b8404758d09c01d8a6f95f)
|
||||||
- feat(runners): Show total donations in runner detail [`f27c716`](https://git.odit.services/lfk/frontend/commit/f27c716296e228ecccbf500a21130f1bc47ea52d)
|
- feat(runners): Show total donations in runner detail [`f27c716`](https://git.odit.services/lfk/frontend/commit/f27c716296e228ecccbf500a21130f1bc47ea52d)
|
||||||
- chore(deps): Bump @odit/lfk-client-js to 1.2.7 [`6d19199`](https://git.odit.services/lfk/frontend/commit/6d1919974aacd74a265cf9ce0c9ed501028f0aa3)
|
- chore(deps): Bump @odit/lfk-client-js to 1.2.7 [`6d19199`](https://git.odit.services/lfk/frontend/commit/6d1919974aacd74a265cf9ce0c9ed501028f0aa3)
|
||||||
|
@ -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.12.5-RELEASE_INFO</span
|
>RELEASE_INFO-1.12.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>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@odit/lfk-frontend",
|
"name": "@odit/lfk-frontend",
|
||||||
"version": "1.12.5",
|
"version": "1.12.6",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"i18n-order": "node order.js",
|
"i18n-order": "node order.js",
|
||||||
|
@ -33,9 +33,13 @@
|
|||||||
toast.success($_("pdf-successfully-generated"));
|
toast.success($_("pdf-successfully-generated"));
|
||||||
}
|
}
|
||||||
|
|
||||||
function generateRunnerCards(locale) {
|
function generateRunnerCards(locale, useCombined = false) {
|
||||||
if (generate_orgs.length > 0) {
|
if (generate_orgs.length > 0) {
|
||||||
generateOrgCards(locale);
|
if(useCombined){
|
||||||
|
generateOrgCardsCombined(locale);
|
||||||
|
} else {
|
||||||
|
generateOrgCards(locale)
|
||||||
|
}
|
||||||
} else if (generate_teams.length > 0) {
|
} else if (generate_teams.length > 0) {
|
||||||
generateTeamCards(locale);
|
generateTeamCards(locale);
|
||||||
} else if (generate_runners.length > 0) {
|
} else if (generate_runners.length > 0) {
|
||||||
@ -175,6 +179,55 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
async function generateOrgCardsCombined(locale) {
|
||||||
|
toast.loading($_("generating-pdfs"));
|
||||||
|
const current_cards = await RunnerCardService.runnerCardControllerGetAll();
|
||||||
|
let count = 0;
|
||||||
|
let count_orgs = 0;
|
||||||
|
for (const o of generate_orgs) {
|
||||||
|
count_orgs++;
|
||||||
|
let cards = [];
|
||||||
|
let count = 0;
|
||||||
|
let runners =
|
||||||
|
await RunnerOrganizationService.runnerOrganizationControllerGetRunners(
|
||||||
|
o.id,
|
||||||
|
true
|
||||||
|
);
|
||||||
|
for (let runner of runners) {
|
||||||
|
let card = current_cards.find((c) => c.runner?.id == runner.id);
|
||||||
|
if (!card) {
|
||||||
|
card = await RunnerCardService.runnerCardControllerPost({
|
||||||
|
runner: runner.id,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
cards.push(card);
|
||||||
|
}
|
||||||
|
for (const t of o.teams) {
|
||||||
|
count++;
|
||||||
|
let runners = await RunnerTeamService.runnerTeamControllerGetRunners(
|
||||||
|
t.id
|
||||||
|
);
|
||||||
|
for (let runner of runners) {
|
||||||
|
let card = current_cards.find((c) => c.runner?.id == runner.id);
|
||||||
|
if (!card) {
|
||||||
|
card = await RunnerCardService.runnerCardControllerPost({
|
||||||
|
runner: runner.id,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
cards.push(card);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
await documentServer
|
||||||
|
.generateCards(cards, locale)
|
||||||
|
.then((blob) => {
|
||||||
|
download(
|
||||||
|
blob,
|
||||||
|
`${$_("runnercards")}_${o.name}-${locale}-${createId()}.pdf`
|
||||||
|
);
|
||||||
|
})
|
||||||
|
.catch((err) => {});
|
||||||
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{#if cards_show}
|
{#if cards_show}
|
||||||
@ -182,6 +235,9 @@
|
|||||||
on:click={() => {
|
on:click={() => {
|
||||||
generateRunnerCards("de");
|
generateRunnerCards("de");
|
||||||
}}
|
}}
|
||||||
|
on:contextmenu|preventDefault={() => {
|
||||||
|
generateRunnerCards("de", true);
|
||||||
|
}}
|
||||||
class="w-full 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:w-auto sm:text-sm mb-1 lg:mb-0"
|
class="w-full 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:w-auto sm:text-sm mb-1 lg:mb-0"
|
||||||
>
|
>
|
||||||
{$_("generate-runnercards")}: DE
|
{$_("generate-runnercards")}: DE
|
||||||
@ -189,6 +245,9 @@
|
|||||||
<button
|
<button
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
generateRunnerCards("en");
|
generateRunnerCards("en");
|
||||||
|
}}
|
||||||
|
on:contextmenu|preventDefault={() => {
|
||||||
|
generateRunnerCards("en", true);
|
||||||
}}
|
}}
|
||||||
class="w-full 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:w-auto sm:text-sm mb-1 lg:mb-0"
|
class="w-full 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:w-auto sm:text-sm mb-1 lg:mb-0"
|
||||||
>
|
>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user