diff --git a/src/components/contacts/ContactsOverview.svelte b/src/components/contacts/ContactsOverview.svelte index 23088c87..404cf76e 100644 --- a/src/components/contacts/ContactsOverview.svelte +++ b/src/components/contacts/ContactsOverview.svelte @@ -1,198 +1,198 @@ {#if store.state.jwtinfo.userdetails.permissions.includes("TEAM:GET")} - {#await promise} - - {:then} - {#if current_contacts.length === 0} - - {:else} - -
- - - - - - - - - - - {#each current_contacts as t} - {#if Object.values(t) - .toString() - .toLowerCase() - .includes(searchvalue)} - - - - - {#if active_deletes[t.id] === true} - - {:else} - - {/if} - - {/if} - {/each} - -
- {$_("name")} - - {$_("groups")} - - {$_("address")} - - {$_("action")} -
-
-
-
- {t.firstname} - {t.middlename || ""} - {t.lastname} -
-
-
-
-
-
-
- {#if t.groups.length > 0} - {#each t.groups as g} - {#if g.responseType === "RUNNERORGANIZATION"} - {g.name} - {:else} - {g.parentGroup.name} - > - {g.name} - {/if} - {/each} - {:else} - {$_("contact-is-not-a-member-in-any-group")} - {/if} -
-
-
-
-
-
-
- {#if t.address.address1 !== null} - {t.address.address1}
- {t.address.address2 || ""}
- {t.address.postalcode} - {t.address.city} - {t.address.country} - {/if} -
-
-
-
- - - - {$_("details")} - {#if store.state.jwtinfo.userdetails.permissions.includes("TEAM:DELETE")} - - {/if} -
-
- {/if} - {:catch error} -
- - {$_("general_promise_error")} - {error} - -
- {/await} + {#await promise} + + {:then} + {#if current_contacts.length === 0} + + {:else} + +
+ + + + + + + + + + + {#each current_contacts as t} + {#if Object.values(t) + .toString() + .toLowerCase() + .includes(searchvalue)} + + + + + {#if active_deletes[t.id] === true} + + {:else} + + {/if} + + {/if} + {/each} + +
+ {$_("name")} + + {$_("groups")} + + {$_("address")} + + {$_("action")} +
+
+
+
+ {t.firstname} + {t.middlename || ""} + {t.lastname} +
+
+
+
+
+
+ {#if t.groups.length > 0} + {#each t.groups as g} + {#if g.responseType === "RUNNERORGANIZATION"} + {g.name} + {:else} + {g.parentGroup.name} + > + {g.name} + {/if} + {/each} + {:else} + {$_("contact-is-not-a-member-in-any-group")} + {/if} +
+
+
+
+
+
+ {#if t.address.address1 !== null} + {t.address.address1}
+ {t.address.address2 || ""}
+ {t.address.postalcode} + {t.address.city} + {t.address.country} + {/if} +
+
+
+
+ + + + {$_("details")} + {#if store.state.jwtinfo.userdetails.permissions.includes("TEAM:DELETE")} + + {/if} +
+
+ {/if} + {:catch error} +
+ + {$_("general_promise_error")} + {error} + +
+ {/await} {/if} diff --git a/src/components/donations/DonationDonor.svelte b/src/components/donations/DonationDonor.svelte index a134053b..29b61340 100644 --- a/src/components/donations/DonationDonor.svelte +++ b/src/components/donations/DonationDonor.svelte @@ -9,7 +9,7 @@
{donor.firstname} {#if donor.middlename}{donor.middlename}{/if} {donor.lastname} {runner.firstname} {#if runner.middlename}{runner.middlename}{/if} {runner.lastname} - import { _ } from "svelte-i18n"; - import GenerateSponsoringContracts from "../pdf_generation/GenerateSponsoringContracts.svelte"; - let modal_open = false; - let delete_org = {}; - import { RunnerOrganizationService } from "@odit/lfk-client-js"; - import store from "../../store"; - import OrgsEmptyState from "./OrgsEmptyState.svelte"; - import ConfirmOrgDeletion from "./ConfirmOrgDeletion.svelte"; - import GenerateRunnerCards from "../pdf_generation/GenerateRunnerCards.svelte"; - import GenerateRunnerCertificates from "../pdf_generation/GenerateRunnerCertificates.svelte"; - import toast from "svelte-french-toast"; - $: searchvalue = ""; - $: active_deletes = []; - $: sponsoring_contracts_show = current_organizations.some( - (r) => r.is_selected === true - ); - $: cards_show = current_organizations.some((r) => r.is_selected === true); - $: generate_orgs = current_organizations.filter( - (r) => r.is_selected === true - ); - $: certificates_show = current_organizations.some( - (r) => r.is_selected === true - ); - export let current_organizations = []; + import { _ } from "svelte-i18n"; + import GenerateSponsoringContracts from "../pdf_generation/GenerateSponsoringContracts.svelte"; + let modal_open = false; + let delete_org = {}; + import { RunnerOrganizationService } from "@odit/lfk-client-js"; + import store from "../../store"; + import OrgsEmptyState from "./OrgsEmptyState.svelte"; + import ConfirmOrgDeletion from "./ConfirmOrgDeletion.svelte"; + import GenerateRunnerCards from "../pdf_generation/GenerateRunnerCards.svelte"; + import GenerateRunnerCertificates from "../pdf_generation/GenerateRunnerCertificates.svelte"; + import toast from "svelte-french-toast"; + $: searchvalue = ""; + $: active_deletes = []; + $: sponsoring_contracts_show = current_organizations.some( + (r) => r.is_selected === true + ); + $: cards_show = current_organizations.some((r) => r.is_selected === true); + $: generate_orgs = current_organizations.filter( + (r) => r.is_selected === true + ); + $: certificates_show = current_organizations.some( + (r) => r.is_selected === true + ); + export let current_organizations = []; - const promise = - RunnerOrganizationService.runnerOrganizationControllerGetAll().then( - (val) => { - current_organizations = val; - } - ); + const promise = + RunnerOrganizationService.runnerOrganizationControllerGetAll().then( + (val) => { + current_organizations = val; + } + ); { - modal_open = false; - active_deletes[event.detail.id] = false; - }} - bind:modal_open - bind:delete_org + on:cancelDelete={(event) => { + modal_open = false; + active_deletes[event.detail.id] = false; + }} + bind:modal_open + bind:delete_org /> {#if store.state.jwtinfo.userdetails.permissions.includes("ORGANIZATION:GET")} - {#await promise} - - {:then} - {#if current_organizations.length === 0} - - {:else} - -
- - - -
-
- - - - - - - - - - - - {#each current_organizations as o} - {#if Object.values(o) - .toString() - .toLowerCase() - .includes(searchvalue)} - - - - - - {#if active_deletes[o.id] === true} - - {:else} - - {/if} - - {/if} - {/each} - -
- - - {$_("name")} - - {$_("address")} - - {$_("contact")} - - {$_("action")} -
- - -
-
-
- {o.name} -
-
-
-
-
-
-
- {#if o.address.address1 !== null} - {o.address.address1}
- - {o.address.postalcode} - {o.address.city} - {o.address.country} - {/if} -
-
-
-
-
-
-
- {#if o.contact} - {o.contact.firstname} - {o.contact.middlename || ""} - {o.contact.lastname} - {:else}{$_("no-contact-specified")}{/if} -
-
-
-
- - - - {$_("details")} - {#if store.state.jwtinfo.userdetails.permissions.includes("ORGANIZATION:DELETE")} - - {/if} -
-
- {/if} - {:catch error} -
- - {$_("general_promise_error")} - {error} - -
- {/await} + {#await promise} + + {:then} + {#if current_organizations.length === 0} + + {:else} + +
+ + + +
+
+ + + + + + + + + + + + {#each current_organizations as o} + {#if Object.values(o) + .toString() + .toLowerCase() + .includes(searchvalue)} + + + + + + {#if active_deletes[o.id] === true} + + {:else} + + {/if} + + {/if} + {/each} + +
+ + + {$_("name")} + + {$_("address")} + + {$_("contact")} + + {$_("action")} +
+ + +
+
+ {o.name} +
+
+
+
+
+ {#if o.address.address1 !== null} + {o.address.address1}
+ + {o.address.postalcode} + {o.address.city} + {o.address.country} + {/if} +
+
+
+
+
+ {#if o.contact} + {o.contact.firstname} + {o.contact.middlename || ""} + {o.contact.lastname} + {:else}{$_("no-contact-specified")}{/if} +
+
+
+ + + + {$_("details")} + {#if store.state.jwtinfo.userdetails.permissions.includes("ORGANIZATION:DELETE")} + + {/if} +
+
+ {/if} + {:catch error} +
+ + {$_("general_promise_error")} + {error} + +
+ {/await} {/if} diff --git a/src/components/scans/ScanDetail.svelte b/src/components/scans/ScanDetail.svelte index ae2381f3..36dc880f 100644 --- a/src/components/scans/ScanDetail.svelte +++ b/src/components/scans/ScanDetail.svelte @@ -218,7 +218,7 @@ {editable.track.name}
diff --git a/src/components/scanstations/ScanStations.svelte b/src/components/scanstations/ScanStations.svelte index 3f829a1f..d50e1179 100644 --- a/src/components/scanstations/ScanStations.svelte +++ b/src/components/scanstations/ScanStations.svelte @@ -111,7 +111,7 @@
{s.track.name || s.track.distance + "m"} diff --git a/src/components/teams/TeamsOverview.svelte b/src/components/teams/TeamsOverview.svelte index d14ae26d..8b7368b7 100644 --- a/src/components/teams/TeamsOverview.svelte +++ b/src/components/teams/TeamsOverview.svelte @@ -1,247 +1,241 @@ { - modal_open = false; - active_deletes[event.detail.id] = false; - }} - bind:modal_open - bind:delete_team + on:cancelDelete={(event) => { + modal_open = false; + active_deletes[event.detail.id] = false; + }} + bind:modal_open + bind:delete_team /> {#if store.state.jwtinfo.userdetails.permissions.includes("TEAM:GET")} - {#await teams_promise} - - {:then} - {#if current_teams.length === 0} - - {:else} - -
- - - -
-
- - - - - - - - - - - - {#each current_teams as t} - {#if Object.values(t) - .toString() - .toLowerCase() - .includes(searchvalue)} - - - - - - {#if active_deletes[t.id] === true} - - {:else} - - {/if} - - {/if} - {/each} - -
- - - {$_("name")} - - {$_("organization")} - - {$_("contact")} - - {$_("action")} -
- - -
-
-
- {t.name} -
-
-
-
-
-
-
- {#if t.parentGroup} - {t.parentGroup.name} - {:else}{$_("no-organization-specified")}{/if} -
-
-
-
-
-
-
- {#if t.contact} - {t.contact.firstname} - {t.contact.middlename || ""} - {t.contact.lastname} - {:else}{$_("no-contact-specified")}{/if} -
-
-
-
- - - - {$_("details")} - {#if store.state.jwtinfo.userdetails.permissions.includes("TEAM:DELETE")} - - {/if} -
-
- {/if} - {:catch error} -
- - {$_("general_promise_error")} - {error} - -
- {/await} + {#await teams_promise} + + {:then} + {#if current_teams.length === 0} + + {:else} + +
+ + + +
+
+ + + + + + + + + + + + {#each current_teams as t} + {#if Object.values(t) + .toString() + .toLowerCase() + .includes(searchvalue)} + + + + + + {#if active_deletes[t.id] === true} + + {:else} + + {/if} + + {/if} + {/each} + +
+ + + {$_("name")} + + {$_("organization")} + + {$_("contact")} + + {$_("action")} +
+ + +
+
+ {t.name} +
+
+
+
+
+ {#if t.parentGroup} + {t.parentGroup.name} + {:else}{$_("no-organization-specified")}{/if} +
+
+
+
+
+ {#if t.contact} + {t.contact.firstname} + {t.contact.middlename || ""} + {t.contact.lastname} + {:else}{$_("no-contact-specified")}{/if} +
+
+
+ + + + {$_("details")} + {#if store.state.jwtinfo.userdetails.permissions.includes("TEAM:DELETE")} + + {/if} +
+
+ {/if} + {:catch error} +
+ + {$_("general_promise_error")} + {error} + +
+ {/await} {/if} diff --git a/src/components/users/UsersOverview.svelte b/src/components/users/UsersOverview.svelte index bd869756..6ef52b95 100644 --- a/src/components/users/UsersOverview.svelte +++ b/src/components/users/UsersOverview.svelte @@ -115,11 +115,11 @@ > {/if} - + {#each u.groups as g} {g.name} {/each}