Compare commits
No commits in common. "dev" and "feature/custom-select-with-search-and-virtual-list" have entirely different histories.
dev
...
feature/cu
59
CHANGELOG.md
59
CHANGELOG.md
@ -2,67 +2,8 @@
|
||||
|
||||
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)
|
||||
|
||||
> 20 May 2025
|
||||
|
||||
- wip [`564a971`](https://git.odit.services/lfk/frontend/commit/564a971c63403af2e2eb550db814519576d62023)
|
||||
- wip [`50b5e4e`](https://git.odit.services/lfk/frontend/commit/50b5e4e455ce705fc5ef7f3d069d88c9ff48a6af)
|
||||
- wip [`2c91f46`](https://git.odit.services/lfk/frontend/commit/2c91f463758c8452561fbcc5dad8412edba8915d)
|
||||
- wip [`1386b80`](https://git.odit.services/lfk/frontend/commit/1386b80d0c8569cf127f8235b3dd249c2775594a)
|
||||
- wip [`6ef6dc0`](https://git.odit.services/lfk/frontend/commit/6ef6dc007837c237273a29ca489ef0cdb92f7c6c)
|
||||
- wip [`3709881`](https://git.odit.services/lfk/frontend/commit/370988117683ab1fdc149a30f920cc6a66575c7a)
|
||||
- chore(release): 1.14.0 [`d5fecd3`](https://git.odit.services/lfk/frontend/commit/d5fecd3f31916b80c305d76f37c4600f1d242eba)
|
||||
- wip [`77413c7`](https://git.odit.services/lfk/frontend/commit/77413c7e5350a1d8643d2baf135b531235f78e64)
|
||||
- wip [`0cb1193`](https://git.odit.services/lfk/frontend/commit/0cb1193269912b047abfacb6012463093c2adcfa)
|
||||
- wip [`9ef3435`](https://git.odit.services/lfk/frontend/commit/9ef34359d8ac32674c28825b91b6aa2877e63552)
|
||||
- wip [`a00af08`](https://git.odit.services/lfk/frontend/commit/a00af08b3f7c8278cfc54af6f593a9dcf4509ab4)
|
||||
- wip [`286bd61`](https://git.odit.services/lfk/frontend/commit/286bd614976dcf8bcb14cffd092f23ef65393917)
|
||||
- wip [`b89d4f2`](https://git.odit.services/lfk/frontend/commit/b89d4f248c5575548d77336832c64dc6e395efc3)
|
||||
- inputElementID param [`4d79589`](https://git.odit.services/lfk/frontend/commit/4d79589903bb0726f6bcb2c0e5089a9e20f7db17)
|
||||
- wip [`53f5fa3`](https://git.odit.services/lfk/frontend/commit/53f5fa3988e81215e17e41b7dd92e9ddf897610a)
|
||||
- wip [`444b1f5`](https://git.odit.services/lfk/frontend/commit/444b1f537016b303a57fcaaac4468a749fe4f33c)
|
||||
- disable autocomplete [`72e5425`](https://git.odit.services/lfk/frontend/commit/72e5425c0847102b0ed3f88abe17dc22ccea0a30)
|
||||
|
||||
#### [1.13.5](https://git.odit.services/lfk/frontend/compare/1.13.4...1.13.5)
|
||||
|
||||
> 20 May 2025
|
||||
|
||||
- add missing cursor-pointer [`6500839`](https://git.odit.services/lfk/frontend/commit/650083965a35cf3b05b6b67389ff8035dc5fa3fa)
|
||||
- refactor(DonationsOverview): drop checkboxes - they dont do anything [`06d22c9`](https://git.odit.services/lfk/frontend/commit/06d22c929f94587d9bdbcb4abfc0a770cf94a771)
|
||||
- chore(release): 1.13.5 [`e2a1c9a`](https://git.odit.services/lfk/frontend/commit/e2a1c9a508c6061e55438afefcd641e3d9423aaa)
|
||||
|
||||
#### [1.13.4](https://git.odit.services/lfk/frontend/compare/1.13.3...1.13.4)
|
||||
|
||||
> 20 May 2025
|
||||
|
||||
- feat(donationcreate): improved focus handling [`a827279`](https://git.odit.services/lfk/frontend/commit/a82727916345c7e713d4225c4771ef3f23d1392c)
|
||||
- chore(release): 1.13.4 [`bbf659e`](https://git.odit.services/lfk/frontend/commit/bbf659e52d249732fadb659fdbd24a89d2e8ec42)
|
||||
- chore(deps): remove unused [`3842d8b`](https://git.odit.services/lfk/frontend/commit/3842d8b1048ce12f0f70bf3d0530590470f0d200)
|
||||
- fix(donationcreate): clearing [`9298a0d`](https://git.odit.services/lfk/frontend/commit/9298a0dc922ee5ed5b7c9017c865ad4b68fca3c8)
|
||||
- feat(donationcreate): autofocus runner input on page load [`b9e2e65`](https://git.odit.services/lfk/frontend/commit/b9e2e653310c686bc06b9f27c38b49e9c6a3eaef)
|
||||
- fix(DonationCreate): remove duplicate spaces from getRunnerLabel [`30a26ef`](https://git.odit.services/lfk/frontend/commit/30a26ef3ed55d072cd9bf2aea1b200fadc2a05f1)
|
||||
- fix(donationcreate): improved resetAll [`7d9314f`](https://git.odit.services/lfk/frontend/commit/7d9314f05c58c1b50901f3797c0b461c4c79e5d2)
|
||||
- fix(DeleteDonationModal): cannot overflow [`ca066aa`](https://git.odit.services/lfk/frontend/commit/ca066aa7a7a8d7c46e0f59370b06636faf5736ca)
|
||||
- feat(donationcreate): full width [`b0063cd`](https://git.odit.services/lfk/frontend/commit/b0063cdead5f71c334c36e5587a58e957825dbcd)
|
||||
- feat(donationcreate): add runner id to select [`27e7bbb`](https://git.odit.services/lfk/frontend/commit/27e7bbb9d142fbea659e89fb2335cc6c567d14ce)
|
||||
|
||||
#### [1.13.3](https://git.odit.services/lfk/frontend/compare/1.13.2...1.13.3)
|
||||
|
||||
> 19 May 2025
|
||||
|
||||
- chore(release): 1.13.3 [`2139b19`](https://git.odit.services/lfk/frontend/commit/2139b197ba672275e2a0b5ffbcf7fa43f80874e6)
|
||||
- Refactor code structure for improved readability and maintainability [`e3c6d5a`](https://git.odit.services/lfk/frontend/commit/e3c6d5a5c0eaac2c91432b0be37d6fa11e57f644)
|
||||
- refactor(donation): Refactor donor selection and add new donor creation functionality [`8c3f009`](https://git.odit.services/lfk/frontend/commit/8c3f0092d2735b1c85976f4e6955780b1035f68a)
|
||||
- fix(donation): Ensure all selections are cleared on reset [`4e1a944`](https://git.odit.services/lfk/frontend/commit/4e1a944a2d7d0d0666fb8d2181a9941d0f11957f)
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
<body>
|
||||
<span style="display: none; visibility: hidden" id="buildinfo"
|
||||
>RELEASE_INFO-1.14.2-RELEASE_INFO</span
|
||||
>RELEASE_INFO-1.13.3-RELEASE_INFO</span
|
||||
>
|
||||
<noscript>You need to enable JavaScript to run this app.</noscript>
|
||||
<script src="/env.js"></script>
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@odit/lfk-frontend",
|
||||
"version": "1.14.2",
|
||||
"version": "1.13.3",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"i18n-order": "node order.js",
|
||||
|
@ -180,7 +180,7 @@
|
||||
modal_open = false;
|
||||
}}
|
||||
type="button"
|
||||
class="cancel_modal_button"
|
||||
class="w-full justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 hidden lg:block"
|
||||
>
|
||||
{$_("cancel")}
|
||||
</button>
|
||||
|
@ -189,7 +189,7 @@
|
||||
edit_modal_open = false;
|
||||
}}
|
||||
type="button"
|
||||
class="cancel_modal_button"
|
||||
class="w-full justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 hidden lg:block"
|
||||
>
|
||||
{$_("cancel")}
|
||||
</button>
|
||||
|
@ -103,7 +103,7 @@
|
||||
<button
|
||||
on:click={submit}
|
||||
type="button"
|
||||
class="confirm_deletion_button"
|
||||
class="w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-red-600 text-base font-medium text-white hover:bg-red-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500"
|
||||
>
|
||||
{$_("delete")}
|
||||
</button>
|
||||
@ -112,7 +112,7 @@
|
||||
modal_open = false;
|
||||
}}
|
||||
type="button"
|
||||
class="cancel_modal_button"
|
||||
class="w-full justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 hidden lg:block"
|
||||
>
|
||||
{$_("cancel")}
|
||||
</button>
|
||||
|
@ -469,7 +469,7 @@
|
||||
modal_open = false;
|
||||
}}
|
||||
type="button"
|
||||
class="cancel_modal_button"
|
||||
class="w-full justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 hidden lg:block"
|
||||
>
|
||||
{$_("cancel")}
|
||||
</button>
|
||||
|
@ -194,7 +194,7 @@
|
||||
payment_modal_open = false;
|
||||
}}
|
||||
type="button"
|
||||
class="cancel_modal_button"
|
||||
class="w-full justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 hidden lg:block"
|
||||
>
|
||||
{$_("cancel")}
|
||||
</button>
|
||||
|
@ -81,7 +81,7 @@
|
||||
/></svg
|
||||
>
|
||||
</div>
|
||||
<div class="mt-3 sm:text-left max-h-[75vh]">
|
||||
<div class="mt-3 sm:text-left max-h-[75vh] overflow-y-auto">
|
||||
<h3 class="text-lg leading-6 font-medium text-gray-900">
|
||||
{$_("please-confirm-the-deletion-of-donation")}
|
||||
</h3>
|
||||
@ -102,7 +102,7 @@
|
||||
<button
|
||||
on:click={submit}
|
||||
type="button"
|
||||
class="confirm_deletion_button"
|
||||
class="w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-red-600 text-base font-medium text-white hover:bg-red-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500"
|
||||
>
|
||||
{$_("delete")}
|
||||
</button>
|
||||
@ -111,7 +111,7 @@
|
||||
modal_open = false;
|
||||
}}
|
||||
type="button"
|
||||
class="cancel_modal_button"
|
||||
class="w-full justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 hidden lg:block"
|
||||
>
|
||||
{$_("cancel")}
|
||||
</button>
|
||||
|
@ -1,28 +1,26 @@
|
||||
<script>
|
||||
import { _ } from "svelte-i18n";
|
||||
import TableActions from "../shared/TableActions.svelte";
|
||||
import { _ } from "svelte-i18n";
|
||||
import TableActions from "../shared/TableActions.svelte";
|
||||
|
||||
export let detailsLink;
|
||||
export let detailsAction;
|
||||
export let deleteEnabled;
|
||||
export let deleteAction;
|
||||
export let paymentAction;
|
||||
export let detailsLink;
|
||||
export let detailsAction;
|
||||
export let deleteEnabled;
|
||||
export let deleteAction;
|
||||
export let paymentAction;
|
||||
</script>
|
||||
|
||||
{#if paymentAction}
|
||||
<button
|
||||
on:click={paymentAction}
|
||||
class="text-[#025a21] cursor-pointer hover:text-green-900 mr-4"
|
||||
>{$_("enter-payment")}</button
|
||||
>
|
||||
<button
|
||||
on:click={paymentAction}
|
||||
class="text-[#025a21] hover:text-green-900 mr-4">{$_("enter-payment")}</button
|
||||
>
|
||||
{:else}
|
||||
<span class="inline-block opacity-0 cursor-default mr-4" style=""
|
||||
>{$_("enter-payment")}</span
|
||||
>
|
||||
<span class="inline-block opacity-0 cursor-default mr-4" style="">{$_("enter-payment")}</span>
|
||||
|
||||
{/if}
|
||||
<TableActions
|
||||
bind:detailsAction
|
||||
bind:detailsLink
|
||||
bind:deleteAction
|
||||
bind:deleteEnabled
|
||||
bind:detailsAction
|
||||
bind:detailsLink
|
||||
bind:deleteAction
|
||||
bind:deleteEnabled
|
||||
/>
|
||||
|
@ -247,6 +247,14 @@
|
||||
<thead class="border-b border-gray-400">
|
||||
{#each $table.getHeaderGroups() as headerGroup}
|
||||
<tr class="select-none">
|
||||
<th class="inset-y-0 left-0 px-4 py-2 text-left w-px">
|
||||
<InputElement
|
||||
type="checkbox"
|
||||
checked={$table.getIsAllRowsSelected()}
|
||||
indeterminate={$table.getIsSomeRowsSelected()}
|
||||
on:change={() => $table.toggleAllRowsSelected()}
|
||||
/>
|
||||
</th>
|
||||
{#each headerGroup.headers as header}
|
||||
<TableHeader {header} />
|
||||
{/each}
|
||||
@ -256,6 +264,13 @@
|
||||
<tbody>
|
||||
{#each $table.getRowModel().rows as row}
|
||||
<tr class="odd:bg-white even:bg-gray-100">
|
||||
<td class="inset-y-0 left-0 px-4 py-2 text-center w-px">
|
||||
<InputElement
|
||||
type="checkbox"
|
||||
checked={row.getIsSelected()}
|
||||
on:change={() => row.toggleSelected()}
|
||||
/>
|
||||
</td>
|
||||
{#each row.getVisibleCells() as cell}
|
||||
<td>
|
||||
<svelte:component
|
||||
|
@ -433,7 +433,7 @@
|
||||
modal_open = false;
|
||||
}}
|
||||
type="button"
|
||||
class="cancel_modal_button"
|
||||
class="w-full justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 hidden lg:block"
|
||||
>
|
||||
{$_("cancel")}
|
||||
</button>
|
||||
|
@ -72,14 +72,14 @@
|
||||
<button
|
||||
on:click={deleteDonor}
|
||||
type="button"
|
||||
class="confirm_deletion_button"
|
||||
class="w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-red-600 text-base font-medium text-white hover:bg-red-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500"
|
||||
>
|
||||
{$_("confirm-delete-donor-with-all-donations")}
|
||||
</button>
|
||||
<button
|
||||
on:click={cancelDelete}
|
||||
type="button"
|
||||
class="cancel_modal_button"
|
||||
class="w-full justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 hidden lg:block"
|
||||
>
|
||||
{$_("cancel-keep-donor")}
|
||||
</button>
|
||||
|
@ -174,7 +174,7 @@
|
||||
modal_open = false;
|
||||
}}
|
||||
type="button"
|
||||
class="cancel_modal_button"
|
||||
class="w-full justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 hidden lg:block"
|
||||
>
|
||||
{$_("cancel")}
|
||||
</button>
|
||||
|
@ -294,7 +294,7 @@
|
||||
modal_open = false;
|
||||
}}
|
||||
type="button"
|
||||
class="cancel_modal_button"
|
||||
class="w-full justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 hidden lg:block"
|
||||
>
|
||||
{$_("cancel")}
|
||||
</button>
|
||||
|
@ -86,14 +86,14 @@
|
||||
<button
|
||||
on:click={deleteOrg}
|
||||
type="button"
|
||||
class="confirm_deletion_button"
|
||||
class="w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-red-600 text-base font-medium text-white hover:bg-red-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500"
|
||||
>
|
||||
{$_("confirm-delete-organization-and-associated-teams-runners")}
|
||||
</button>
|
||||
<button
|
||||
on:click={cancelDelete}
|
||||
type="button"
|
||||
class="cancel_modal_button"
|
||||
class="w-full justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 hidden lg:block"
|
||||
>
|
||||
{$_("cancel-keep-organization")}
|
||||
</button>
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
class DocumentServer {
|
||||
baseUrl: string;
|
||||
apiKey: string;
|
||||
@ -13,19 +12,19 @@ class DocumentServer {
|
||||
|
||||
for (let i = 0; i < cards.length; i++) {
|
||||
const card = {
|
||||
id: parseInt(cards[i].id),
|
||||
id: cards[i].id,
|
||||
enabled: cards[i].enabled,
|
||||
code: cards[i].code,
|
||||
runner: {
|
||||
id: parseInt(cards[i]?.runner?.id),
|
||||
id: cards[i]?.runner?.id,
|
||||
first_name: cards[i]?.runner?.firstname,
|
||||
middle_name: cards[i]?.runner?.middlename,
|
||||
last_name: cards[i]?.runner?.lastname,
|
||||
group: {
|
||||
id: parseInt(cards[i]?.runner?.group?.id),
|
||||
id: cards[i]?.runner?.group.id,
|
||||
name: cards[i]?.runner?.group.name,
|
||||
parent_group: {
|
||||
id: parseInt(cards[i]?.runner?.group?.parentGroup?.id),
|
||||
id: cards[i]?.runner?.group?.parentGroup?.id,
|
||||
name: cards[i]?.runner?.group?.parentGroup?.name,
|
||||
},
|
||||
},
|
||||
@ -58,15 +57,15 @@ class DocumentServer {
|
||||
for (let i = 0; i < runners.length; i++) {
|
||||
console.log(runners[i]);
|
||||
const card = {
|
||||
id: parseInt(runners[i].id),
|
||||
id: runners[i].id,
|
||||
first_name: runners[i].firstname,
|
||||
middle_name: runners[i].middlename,
|
||||
last_name: runners[i].lastname,
|
||||
group: {
|
||||
id: parseInt(runners[i].group.id),
|
||||
id: runners[i].group.id,
|
||||
name: runners[i].group.name,
|
||||
parent_group: {
|
||||
id: parseInt(runners[i]?.group?.parentGroup?.id),
|
||||
id: runners[i]?.group?.parentGroup?.id,
|
||||
name: runners[i]?.group?.parentGroup?.name,
|
||||
},
|
||||
},
|
||||
@ -97,28 +96,28 @@ class DocumentServer {
|
||||
|
||||
for (let i = 0; i < runners.length; i++) {
|
||||
const certificate = {
|
||||
id: parseInt(runners[i].id),
|
||||
id: runners[i].id,
|
||||
first_name: runners[i].firstname,
|
||||
middle_name: runners[i].middlename,
|
||||
last_name: runners[i].lastname,
|
||||
self_service_link: runners[i].selfserviceLink,
|
||||
group: {
|
||||
id: parseInt(runners[i].group.id),
|
||||
id: runners[i].group.id,
|
||||
name: runners[i].group.name,
|
||||
parent_group: {
|
||||
id: parseInt(runners[i]?.group?.parentGroup?.id),
|
||||
id: runners[i]?.group?.parentGroup?.id,
|
||||
name: runners[i]?.group?.parentGroup?.name,
|
||||
},
|
||||
},
|
||||
distance: parseInt(runners[i].distance),
|
||||
distance: runners[i].distance,
|
||||
distance_donations: runners[i].distanceDonations.map(
|
||||
(distanceDonation: any) => {
|
||||
return {
|
||||
id: distanceDonation.id,
|
||||
amount: parseInt(distanceDonation.amount),
|
||||
amount_per_distance: parseInt(distanceDonation.amountPerDistance),
|
||||
amount: distanceDonation.amount,
|
||||
amount_per_distance: distanceDonation.amountPerDistance,
|
||||
donor: {
|
||||
id: parseInt(distanceDonation.donor.id),
|
||||
id: distanceDonation.donor.id,
|
||||
first_name: distanceDonation.donor.firstname,
|
||||
middle_name: distanceDonation.donor.middlename,
|
||||
last_name: distanceDonation.donor.lastname,
|
||||
|
@ -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,15 +50,7 @@
|
||||
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);
|
||||
}
|
||||
certificateRunners.push(linkRunner);
|
||||
}
|
||||
documentServer
|
||||
.generateCertificates(certificateRunners, locale)
|
||||
@ -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,15 +80,7 @@
|
||||
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);
|
||||
}
|
||||
certificateRunners.push(runner);
|
||||
}
|
||||
documentServer
|
||||
.generateCertificates(certificateRunners, locale)
|
||||
@ -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,15 +114,7 @@
|
||||
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);
|
||||
}
|
||||
certificateRunners.push(runner);
|
||||
}
|
||||
await documentServer
|
||||
.generateCertificates(certificateRunners, locale)
|
||||
@ -185,36 +161,20 @@
|
||||
</script>
|
||||
|
||||
{#if certificates_show}
|
||||
<button
|
||||
on:click={() => {
|
||||
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"
|
||||
>
|
||||
{$_("generate-runner-certificates")}: DE
|
||||
</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);
|
||||
}}
|
||||
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>
|
||||
<button
|
||||
on:click={() => {
|
||||
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"
|
||||
>
|
||||
{$_("generate-runner-certificates")}: DE
|
||||
</button>
|
||||
<button
|
||||
on:click={() => {
|
||||
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>
|
||||
{/if}
|
||||
|
@ -338,7 +338,7 @@
|
||||
modal_open = false;
|
||||
}}
|
||||
type="button"
|
||||
class="cancel_modal_button"
|
||||
class="w-full justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 hidden lg:block"
|
||||
>
|
||||
{$_("cancel")}
|
||||
</button>
|
||||
|
@ -90,7 +90,7 @@
|
||||
<button
|
||||
on:click={submit}
|
||||
type="button"
|
||||
class="confirm_deletion_button"
|
||||
class="w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-red-600 text-base font-medium text-white hover:bg-red-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500"
|
||||
>
|
||||
{$_("delete")}
|
||||
</button>
|
||||
@ -99,7 +99,7 @@
|
||||
modal_open = false;
|
||||
}}
|
||||
type="button"
|
||||
class="cancel_modal_button"
|
||||
class="w-full justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 hidden lg:block"
|
||||
>
|
||||
{$_("cancel")}
|
||||
</button>
|
||||
|
@ -261,7 +261,7 @@
|
||||
cancelModal();
|
||||
}}
|
||||
type="button"
|
||||
class="cancel_modal_button"
|
||||
class="w-full justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 hidden lg:block"
|
||||
>
|
||||
{$_("cancel")}
|
||||
</button>
|
||||
@ -375,7 +375,7 @@
|
||||
cancelModal();
|
||||
}}
|
||||
type="button"
|
||||
class="confirm_deletion_button"
|
||||
class="w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-red-600 text-base font-medium text-white hover:bg-red-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500"
|
||||
>
|
||||
{$_("cancel")}
|
||||
</button>
|
||||
|
@ -195,7 +195,7 @@
|
||||
modal_open = false;
|
||||
}}
|
||||
type="button"
|
||||
class="cancel_modal_button"
|
||||
class="w-full justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 hidden lg:block"
|
||||
>
|
||||
{$_("cancel")}
|
||||
</button>
|
||||
|
@ -90,7 +90,7 @@
|
||||
<button
|
||||
on:click={submit}
|
||||
type="button"
|
||||
class="confirm_deletion_button"
|
||||
class="w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-red-600 text-base font-medium text-white hover:bg-red-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500"
|
||||
>
|
||||
{$_("delete")}
|
||||
</button>
|
||||
@ -99,7 +99,7 @@
|
||||
modal_open = false;
|
||||
}}
|
||||
type="button"
|
||||
class="cancel_modal_button"
|
||||
class="w-full justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 hidden lg:block"
|
||||
>
|
||||
{$_("cancel")}
|
||||
</button>
|
||||
|
@ -203,7 +203,7 @@
|
||||
modal_open = false;
|
||||
}}
|
||||
type="button"
|
||||
class="cancel_modal_button"
|
||||
class="w-full justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 hidden lg:block"
|
||||
>
|
||||
{$_("cancel")}
|
||||
</button>
|
||||
|
@ -82,14 +82,14 @@
|
||||
<button
|
||||
on:click={deleteStation}
|
||||
type="button"
|
||||
class="confirm_deletion_button"
|
||||
class="w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-red-600 text-base font-medium text-white hover:bg-red-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500"
|
||||
>
|
||||
{$_("confirm-delete-station-with-all-scans")}
|
||||
</button>
|
||||
<button
|
||||
on:click={cancelDelete}
|
||||
type="button"
|
||||
class="cancel_modal_button"
|
||||
class="w-full justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 hidden lg:block"
|
||||
>
|
||||
{$_("cancel-keep-station")}
|
||||
</button>
|
||||
|
@ -85,14 +85,14 @@
|
||||
<button
|
||||
on:click={deleteMe}
|
||||
type="button"
|
||||
class="confirm_deletion_button"
|
||||
class="w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-red-600 text-base font-medium text-white hover:bg-red-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500"
|
||||
>
|
||||
{$_("confirm-delete-my-user-profile")}
|
||||
</button>
|
||||
<button
|
||||
on:click={cancelDelete}
|
||||
type="button"
|
||||
class="cancel_modal_button"
|
||||
class="w-full justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 hidden lg:block"
|
||||
>
|
||||
{$_("cancel-keep-my-profile")}
|
||||
</button>
|
||||
|
@ -148,7 +148,7 @@
|
||||
modal_open = false;
|
||||
}}
|
||||
type="button"
|
||||
class="cancel_modal_button"
|
||||
class="w-full justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 hidden lg:block"
|
||||
>
|
||||
{$_("cancel")}
|
||||
</button>
|
||||
|
@ -81,14 +81,14 @@
|
||||
<button
|
||||
on:click={deleteClient}
|
||||
type="button"
|
||||
class="confirm_deletion_button"
|
||||
class="w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-red-600 text-base font-medium text-white hover:bg-red-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500"
|
||||
>
|
||||
{$_("confirm-delete-statsclient")}
|
||||
</button>
|
||||
<button
|
||||
on:click={cancelDelete}
|
||||
type="button"
|
||||
class="cancel_modal_button"
|
||||
class="w-full justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 hidden lg:block"
|
||||
>
|
||||
{$_("cancel-keep-statsclient")}
|
||||
</button>
|
||||
|
@ -199,7 +199,7 @@
|
||||
modal_open = false;
|
||||
}}
|
||||
type="button"
|
||||
class="cancel_modal_button"
|
||||
class="w-full justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 hidden lg:block"
|
||||
>
|
||||
{$_("cancel")}
|
||||
</button>
|
||||
|
@ -85,14 +85,14 @@
|
||||
<button
|
||||
on:click={deleteTeam}
|
||||
type="button"
|
||||
class="confirm_deletion_button"
|
||||
class="w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-red-600 text-base font-medium text-white hover:bg-red-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500"
|
||||
>
|
||||
{$_("confirm-delete-team-and-associated-runners")}
|
||||
</button>
|
||||
<button
|
||||
on:click={cancelDelete}
|
||||
type="button"
|
||||
class="cancel_modal_button"
|
||||
class="w-full justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 hidden lg:block"
|
||||
>
|
||||
{$_("cancel-keep-team")}
|
||||
</button>
|
||||
|
@ -230,7 +230,7 @@
|
||||
modal_open = false;
|
||||
}}
|
||||
type="button"
|
||||
class="cancel_modal_button"
|
||||
class="w-full justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 hidden lg:block"
|
||||
>
|
||||
{$_("cancel")}
|
||||
</button>
|
||||
|
@ -287,7 +287,7 @@
|
||||
modal_open = false;
|
||||
}}
|
||||
type="button"
|
||||
class="cancel_modal_button"
|
||||
class="w-full justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 hidden lg:block"
|
||||
>
|
||||
{$_("cancel")}
|
||||
</button>
|
||||
|
@ -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)",
|
||||
|
@ -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)",
|
||||
|
@ -31,9 +31,3 @@
|
||||
.donation_active_tab {
|
||||
@apply min-w-0 flex-1 bg-blue-400 text-white first:border-s-0 border-s border-b-2 border-neutral-200 py-4 px-4 text-sm font-medium text-center overflow-hidden cursor-pointer focus:outline-hidden;
|
||||
}
|
||||
.confirm_deletion_button {
|
||||
@apply w-full cursor-pointer inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-red-600 text-base font-medium text-white hover:bg-red-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500;
|
||||
}
|
||||
.cancel_modal_button {
|
||||
@apply w-full cursor-pointer justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 hidden lg:block;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user