diff --git a/src/App.svelte b/src/App.svelte index 3e30b8ad..251f083e 100644 --- a/src/App.svelte +++ b/src/App.svelte @@ -69,6 +69,7 @@ import Donations from "./components/donations/Donations.svelte"; import DonationDetail from "./components/donations/DonationDetail.svelte"; import GroupDetail from "./components/groups/GroupDetail.svelte"; +import ScanStationsOverview from "./components/scanstations/ScanStationsOverview.svelte"; store.init(); registerSW(); @@ -180,6 +181,12 @@ + + + + + + diff --git a/src/components/scanstations/ScanStations.svelte b/src/components/scanstations/ScanStations.svelte new file mode 100644 index 00000000..11905d88 --- /dev/null +++ b/src/components/scanstations/ScanStations.svelte @@ -0,0 +1,29 @@ + + +
+ + Scanstations + {#if store.state.jwtinfo.userdetails.permissions.includes('CONTACT:CREATE')} + + {/if} + + +
+ + diff --git a/src/components/scanstations/ScanStationsEmptyState.svelte b/src/components/scanstations/ScanStationsEmptyState.svelte new file mode 100644 index 00000000..39ced265 --- /dev/null +++ b/src/components/scanstations/ScanStationsEmptyState.svelte @@ -0,0 +1,17 @@ + + +
+

+ + You don't have any scanstations yet.
+ Add the first scanstation +

+
+ + diff --git a/src/components/scanstations/ScanStationsOverview.svelte b/src/components/scanstations/ScanStationsOverview.svelte new file mode 100644 index 00000000..9d27551d --- /dev/null +++ b/src/components/scanstations/ScanStationsOverview.svelte @@ -0,0 +1,177 @@ + + +{#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} +{/if} diff --git a/src/components/scanstations/scanstations_empty.svg b/src/components/scanstations/scanstations_empty.svg new file mode 100644 index 00000000..e0b01c81 --- /dev/null +++ b/src/components/scanstations/scanstations_empty.svg @@ -0,0 +1 @@ + \ No newline at end of file