From 597e9e1ea9da7c73bdcb8ef1ae1a13dfa68ff5a3 Mon Sep 17 00:00:00 2001 From: Philipp Dormann Date: Fri, 15 Jan 2021 21:22:51 +0100 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20basic=20TeamsOverview?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ref #14 --- src/components/TeamsOverview.svelte | 96 +++++++++++------------------ src/locales/en.json | 1 + 2 files changed, 38 insertions(+), 59 deletions(-) diff --git a/src/components/TeamsOverview.svelte b/src/components/TeamsOverview.svelte index aa58ec18..d8400b8d 100644 --- a/src/components/TeamsOverview.svelte +++ b/src/components/TeamsOverview.svelte @@ -1,5 +1,5 @@ -{#if store.state.jwtinfo.userdetails.permissions.includes('USER:GET')} +{#if store.state.jwtinfo.userdetails.permissions.includes('TEAM:GET')} {#await teams_promise} {:then} {#if current_teams.length === 0} {:else} - - -
@@ -66,12 +49,12 @@ - {#each current_teams as u} - {#if Object.values(u) + {#each current_teams as t} + {#if Object.values(t) .toString() .toLowerCase() .includes(searchvalue)} - + - - {#if active_deletes[u.id] === true} + {#if active_deletes[t.id] === true}
- Status + {$_('organization')} - Groups + Contact Action @@ -79,66 +62,61 @@
- {#if u.profilePic} -
- -
- {/if}
- {u.firstname} - {u.middlename || ''} - {u.lastname} -
-
- {u.email || u.username} + {t.name}
- {#if u.enabled} - Active - {:else} - Inactive - {/if} +
+
+
+ {#if t.parentGroup} + {t.parentGroup.name} + {:else}no organization specified{/if} +
+
+
- {#each u.groups as g} - {g.name} - {/each} + +
+
+
+ {#if t.contact} + {JSON.stringify(t.contact)} + {:else}no contact specified{/if} +
+
+
Edit - {#if store.state.jwtinfo.userdetails.permissions.includes('USER:DELETE')} + {#if store.state.jwtinfo.userdetails.permissions.includes('TEAM:DELETE')} diff --git a/src/locales/en.json b/src/locales/en.json index 3c4bc96b..6bb8bc40 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -94,6 +94,7 @@ "minimum-lap-time-in-s": "minimum lap time in s", "no-license-text-could-be-found": "No license text could be found 😢", "no-tracks-added-yet": "there are no tracks added yet.", + "organization": "Organization", "organizations": "Organizations", "orgs": "Orgs", "oss_credit_description": "We use a lot of open source software on these projects, and would like to thank the following projects and contributors who help make open source great!",