Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
878d3acc9c | |||
5a7bc239d2 |
@ -2,9 +2,16 @@
|
|||||||
|
|
||||||
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.14.2](https://git.odit.services/lfk/frontend/compare/1.14.1...1.14.2)
|
||||||
|
|
||||||
|
- feat(GenerateRunnerCertificates): support skipping runners without scans [`5a7bc23`](https://git.odit.services/lfk/frontend/commit/5a7bc239d2f93ced9ebdc5b113fe27d0d8d3899c)
|
||||||
|
|
||||||
#### [1.14.1](https://git.odit.services/lfk/frontend/compare/1.14.0...1.14.1)
|
#### [1.14.1](https://git.odit.services/lfk/frontend/compare/1.14.0...1.14.1)
|
||||||
|
|
||||||
|
> 26 May 2025
|
||||||
|
|
||||||
- fix: ensure numeric values are parsed as integers in DocumentServer methods [`1b088b8`](https://git.odit.services/lfk/frontend/commit/1b088b87bf6e67796c2509d9c21f21833cb4df0f)
|
- fix: ensure numeric values are parsed as integers in DocumentServer methods [`1b088b8`](https://git.odit.services/lfk/frontend/commit/1b088b87bf6e67796c2509d9c21f21833cb4df0f)
|
||||||
|
- chore(release): 1.14.1 [`661a698`](https://git.odit.services/lfk/frontend/commit/661a698fbaeb2432bec758ed632a520676ae86b2)
|
||||||
|
|
||||||
#### [1.14.0](https://git.odit.services/lfk/frontend/compare/1.13.5...1.14.0)
|
#### [1.14.0](https://git.odit.services/lfk/frontend/compare/1.13.5...1.14.0)
|
||||||
|
|
||||||
|
@ -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.14.1-RELEASE_INFO</span
|
>RELEASE_INFO-1.14.2-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.14.1",
|
"version": "1.14.2",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"i18n-order": "node order.js",
|
"i18n-order": "node order.js",
|
||||||
|
@ -20,13 +20,13 @@
|
|||||||
export let generate_orgs = [];
|
export let generate_orgs = [];
|
||||||
export let generate_teams = [];
|
export let generate_teams = [];
|
||||||
|
|
||||||
function generateCertificates(locale) {
|
function generateCertificates(locale, include0runners = false) {
|
||||||
if (generate_orgs.length > 0) {
|
if (generate_orgs.length > 0) {
|
||||||
generateOrgCertificates(locale);
|
generateOrgCertificates(locale, include0runners = false);
|
||||||
} else if (generate_teams.length > 0) {
|
} else if (generate_teams.length > 0) {
|
||||||
generateTeamCertificates(locale);
|
generateTeamCertificates(locale, include0runners = false);
|
||||||
} else {
|
} else {
|
||||||
generateRunnerCertificates(locale);
|
generateRunnerCertificates(locale, include0runners = false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function download(blob, fileName) {
|
function download(blob, fileName) {
|
||||||
@ -41,7 +41,7 @@
|
|||||||
toast.success($_("pdf-successfully-generated"));
|
toast.success($_("pdf-successfully-generated"));
|
||||||
}
|
}
|
||||||
|
|
||||||
async function generateRunnerCertificates(locale) {
|
async function generateRunnerCertificates(locale, include0runners = false) {
|
||||||
toast.loading($_("generating-pdf"));
|
toast.loading($_("generating-pdf"));
|
||||||
const current_donations =
|
const current_donations =
|
||||||
(await DonationService.donationControllerGetAll()) || [];
|
(await DonationService.donationControllerGetAll()) || [];
|
||||||
@ -50,7 +50,15 @@
|
|||||||
const linkRunner = await RunnerService.runnerControllerGetOne(runner.id)
|
const linkRunner = await RunnerService.runnerControllerGetOne(runner.id)
|
||||||
linkRunner.distanceDonations =
|
linkRunner.distanceDonations =
|
||||||
current_donations.filter((d) => d.runner?.id == runner.id) || [];
|
current_donations.filter((d) => d.runner?.id == runner.id) || [];
|
||||||
certificateRunners.push(linkRunner);
|
// check if linkRunner.distance is 0, if so, and include0runners is false, skip this runner
|
||||||
|
if (
|
||||||
|
!include0runners &&
|
||||||
|
(linkRunner.distance === 0 || linkRunner.distance === null)
|
||||||
|
) {
|
||||||
|
continue;
|
||||||
|
} else {
|
||||||
|
certificateRunners.push(linkRunner);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
documentServer
|
documentServer
|
||||||
.generateCertificates(certificateRunners, locale)
|
.generateCertificates(certificateRunners, locale)
|
||||||
@ -66,7 +74,7 @@
|
|||||||
.catch((err) => {});
|
.catch((err) => {});
|
||||||
}
|
}
|
||||||
|
|
||||||
async function generateTeamCertificates(locale) {
|
async function generateTeamCertificates(locale, include0runners = false) {
|
||||||
toast.loading($_("generating-pdfs"));
|
toast.loading($_("generating-pdfs"));
|
||||||
let count = 0;
|
let count = 0;
|
||||||
const current_donations =
|
const current_donations =
|
||||||
@ -80,7 +88,15 @@
|
|||||||
for (let runner of runners) {
|
for (let runner of runners) {
|
||||||
runner.distanceDonations =
|
runner.distanceDonations =
|
||||||
current_donations.filter((d) => d.runner?.id == runner.id) || [];
|
current_donations.filter((d) => d.runner?.id == runner.id) || [];
|
||||||
certificateRunners.push(runner);
|
// check if runner.distance is 0, if so, and include0runners is false, skip this runner
|
||||||
|
if (
|
||||||
|
!include0runners &&
|
||||||
|
(runner.distance === 0 || runner.distance === null)
|
||||||
|
) {
|
||||||
|
continue;
|
||||||
|
} else {
|
||||||
|
certificateRunners.push(runner);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
documentServer
|
documentServer
|
||||||
.generateCertificates(certificateRunners, locale)
|
.generateCertificates(certificateRunners, locale)
|
||||||
@ -95,7 +111,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async function generateOrgCertificates(locale) {
|
async function generateOrgCertificates(locale, include0runners = false) {
|
||||||
toast.loading($_("generating-pdfs"));
|
toast.loading($_("generating-pdfs"));
|
||||||
const current_donations =
|
const current_donations =
|
||||||
(await DonationService.donationControllerGetAll()) || [];
|
(await DonationService.donationControllerGetAll()) || [];
|
||||||
@ -114,7 +130,15 @@
|
|||||||
for (let runner of runners) {
|
for (let runner of runners) {
|
||||||
runner.distanceDonations =
|
runner.distanceDonations =
|
||||||
current_donations.filter((d) => d.runner?.id == runner.id) || [];
|
current_donations.filter((d) => d.runner?.id == runner.id) || [];
|
||||||
certificateRunners.push(runner);
|
// check if runner.distance is 0, if so, and include0runners is false, skip this runner
|
||||||
|
if (
|
||||||
|
!include0runners &&
|
||||||
|
(runner.distance === 0 || runner.distance === null)
|
||||||
|
) {
|
||||||
|
continue;
|
||||||
|
} else {
|
||||||
|
certificateRunners.push(runner);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
await documentServer
|
await documentServer
|
||||||
.generateCertificates(certificateRunners, locale)
|
.generateCertificates(certificateRunners, locale)
|
||||||
@ -161,20 +185,36 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
{#if certificates_show}
|
{#if certificates_show}
|
||||||
<button
|
<button
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
generateCertificates("de");
|
generateCertificates("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-runner-certificates")}: DE
|
{$_("generate-runner-certificates")}: DE
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
generateCertificates("en");
|
generateCertificates("de", false);
|
||||||
}}
|
}}
|
||||||
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-runner-certificates")}: EN
|
{$_("generate-runner-certificates")}: DE [{$_('exclude_0m_runners_certificate')}]
|
||||||
</button>
|
</button>
|
||||||
|
<button
|
||||||
|
on:click={() => {
|
||||||
|
generateCertificates("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"
|
||||||
|
>
|
||||||
|
{$_("generate-runner-certificates")}: EN
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
on:click={() => {
|
||||||
|
generateCertificates("en", false);
|
||||||
|
}}
|
||||||
|
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-runner-certificates")}: EN [{$_('exclude_0m_runners_certificate')}]
|
||||||
|
</button>
|
||||||
{/if}
|
{/if}
|
||||||
|
@ -232,6 +232,7 @@
|
|||||||
"error-whyile-copying-to-clipboard": "Fehler beim Kopieren in die Zwischenablage",
|
"error-whyile-copying-to-clipboard": "Fehler beim Kopieren in die Zwischenablage",
|
||||||
"error_on_login": "😢Fehler beim Login",
|
"error_on_login": "😢Fehler beim Login",
|
||||||
"everything-concerning-your-profile": "Alles zu deinem Profil",
|
"everything-concerning-your-profile": "Alles zu deinem Profil",
|
||||||
|
"exclude_0m_runners_certificate": "ohne 0m Läufer",
|
||||||
"existing-donor": "Existierende Sponsor:in",
|
"existing-donor": "Existierende Sponsor:in",
|
||||||
"faq": "FAQ",
|
"faq": "FAQ",
|
||||||
"fast_card_replacement": "Karten-Schnellzusweisung (Mit Mobilgeräteunterstützung)",
|
"fast_card_replacement": "Karten-Schnellzusweisung (Mit Mobilgeräteunterstützung)",
|
||||||
|
@ -232,6 +232,7 @@
|
|||||||
"error-whyile-copying-to-clipboard": "Error while copying to clipboard",
|
"error-whyile-copying-to-clipboard": "Error while copying to clipboard",
|
||||||
"error_on_login": "Error on login",
|
"error_on_login": "Error on login",
|
||||||
"everything-concerning-your-profile": "Everything concerning your profile",
|
"everything-concerning-your-profile": "Everything concerning your profile",
|
||||||
|
"exclude_0m_runners_certificate": "exclude runners without scans",
|
||||||
"existing-donor": "Existing Donor",
|
"existing-donor": "Existing Donor",
|
||||||
"faq": "FAQ",
|
"faq": "FAQ",
|
||||||
"fast_card_replacement": "Fast card replacement (with mobile support)",
|
"fast_card_replacement": "Fast card replacement (with mobile support)",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user