Compare commits

..

No commits in common. "1.14.2" and "1.14.1" have entirely different histories.

6 changed files with 28 additions and 77 deletions

View File

@ -2,16 +2,9 @@
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)
> 26 May 2025
- 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)

View File

@ -13,7 +13,7 @@
<body>
<span style="display: none; visibility: hidden" id="buildinfo"
>RELEASE_INFO-1.14.2-RELEASE_INFO</span
>RELEASE_INFO-1.14.1-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.14.2",
"version": "1.14.1",
"type": "module",
"scripts": {
"i18n-order": "node order.js",

View File

@ -20,13 +20,13 @@
export let generate_orgs = [];
export let generate_teams = [];
function generateCertificates(locale, include0runners = false) {
function generateCertificates(locale) {
if (generate_orgs.length > 0) {
generateOrgCertificates(locale, include0runners = false);
generateOrgCertificates(locale);
} else if (generate_teams.length > 0) {
generateTeamCertificates(locale, include0runners = false);
generateTeamCertificates(locale);
} else {
generateRunnerCertificates(locale, include0runners = false);
generateRunnerCertificates(locale);
}
}
function download(blob, fileName) {
@ -41,7 +41,7 @@
toast.success($_("pdf-successfully-generated"));
}
async function generateRunnerCertificates(locale, include0runners = false) {
async function generateRunnerCertificates(locale) {
toast.loading($_("generating-pdf"));
const current_donations =
(await DonationService.donationControllerGetAll()) || [];
@ -50,16 +50,8 @@
const linkRunner = await RunnerService.runnerControllerGetOne(runner.id)
linkRunner.distanceDonations =
current_donations.filter((d) => d.runner?.id == runner.id) || [];
// 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
.generateCertificates(certificateRunners, locale)
.then((blob) => {
@ -74,7 +66,7 @@
.catch((err) => {});
}
async function generateTeamCertificates(locale, include0runners = false) {
async function generateTeamCertificates(locale) {
toast.loading($_("generating-pdfs"));
let count = 0;
const current_donations =
@ -88,16 +80,8 @@
for (let runner of runners) {
runner.distanceDonations =
current_donations.filter((d) => d.runner?.id == runner.id) || [];
// 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
.generateCertificates(certificateRunners, locale)
.then((blob) => {
@ -111,7 +95,7 @@
}
}
async function generateOrgCertificates(locale, include0runners = false) {
async function generateOrgCertificates(locale) {
toast.loading($_("generating-pdfs"));
const current_donations =
(await DonationService.donationControllerGetAll()) || [];
@ -130,16 +114,8 @@
for (let runner of runners) {
runner.distanceDonations =
current_donations.filter((d) => d.runner?.id == runner.id) || [];
// 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
.generateCertificates(certificateRunners, locale)
.then((blob) => {
@ -187,7 +163,7 @@
{#if certificates_show}
<button
on:click={() => {
generateCertificates("de", true);
generateCertificates("de");
}}
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"
>
@ -195,26 +171,10 @@
</button>
<button
on:click={() => {
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"
>
{$_("generate-runner-certificates")}: DE [{$_('exclude_0m_runners_certificate')}]
</button>
<button
on:click={() => {
generateCertificates("en", true);
generateCertificates("en");
}}
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}

View File

@ -232,7 +232,6 @@
"error-whyile-copying-to-clipboard": "Fehler beim Kopieren in die Zwischenablage",
"error_on_login": "😢Fehler beim Login",
"everything-concerning-your-profile": "Alles zu deinem Profil",
"exclude_0m_runners_certificate": "ohne 0m Läufer",
"existing-donor": "Existierende Sponsor:in",
"faq": "FAQ",
"fast_card_replacement": "Karten-Schnellzusweisung (Mit Mobilgeräteunterstützung)",

View File

@ -232,7 +232,6 @@
"error-whyile-copying-to-clipboard": "Error while copying to clipboard",
"error_on_login": "Error on login",
"everything-concerning-your-profile": "Everything concerning your profile",
"exclude_0m_runners_certificate": "exclude runners without scans",
"existing-donor": "Existing Donor",
"faq": "FAQ",
"fast_card_replacement": "Fast card replacement (with mobile support)",