diff --git a/src/components/dashboard/Dashboard.svelte b/src/components/dashboard/Dashboard.svelte index d3945493..4b282666 100644 --- a/src/components/dashboard/Dashboard.svelte +++ b/src/components/dashboard/Dashboard.svelte @@ -12,282 +12,196 @@ } + + - {#if navOpen} - - - - Lauf für Kaya! Admin + + + + Lauf für Kaya! Admin + + + + + + + {$_('dashboard-title')} - + {#if store.state.jwtinfo.userdetails.permissions.includes('ORGANIZATION:GET')} + href="/orgs/"> + viewBox="0 0 24 24" + width="24" + height="24"> - - {$_('dashboard-title')} + d="M17 19h2v-8h-6v8h2v-6h2v6zM3 19V4a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v5h2v10h1v2H2v-2h1zm4-8v2h2v-2H7zm0 4v2h2v-2H7zm0-8v2h2V7H7z" /> + {$_('orgs')} - {#if store.state.jwtinfo.userdetails.permissions.includes('ORGANIZATION:GET')} - - - - {$_('orgs')} - - {/if} - {#if store.state.jwtinfo.userdetails.permissions.includes('USER:GET')} - - - - {$_('users')} - - {/if} - {#if store.state.jwtinfo.userdetails.permissions.includes('USERGROUP:GET')} - - - {$_('user-groups')} - - {/if} - {#if store.state.jwtinfo.userdetails.permissions.includes('RUNNER:GET')} - - - - {$_('runners')} - - {/if} - {#if store.state.jwtinfo.userdetails.permissions.includes('TEAM:GET')} - - - {$_('teams')} - - {/if} - {#if store.state.jwtinfo.userdetails.permissions.includes('DONOR:GET')} - - - - {$_('donors')} - - {/if} - {#if store.state.jwtinfo.userdetails.permissions.includes('DONATION:GET')} - - - - {$_('donations')} - - {/if} - {#if store.state.jwtinfo.userdetails.permissions.includes('TRACK:GET')} - - - {$_('tracks')} - - {/if} - {#if store.state.jwtinfo.userdetails.permissions.includes('CARD:GET')} - - - - - {$_('cards')} - - {/if} - {#if store.state.jwtinfo.userdetails.permissions.includes('SCAN:GET')} - - - - Scans - - {/if} - {#if store.state.jwtinfo.userdetails.permissions.includes('CONTACT:GET')} - - - - {$_('contacts')} - - {/if} - {#if store.state.jwtinfo.userdetails.permissions.includes('STATION:GET')} - - - - {$_('scanstations')} - - {/if} + {/if} + {#if store.state.jwtinfo.userdetails.permissions.includes('USER:GET')} + href="/users/"> + width="24" + height="24" + class="flex-shrink-0 w-5 h-5 mr-2 text-gray-400 transition group-hover:text-gray-600" + fill="currentColor" + viewBox="0 0 24 24"> - - {$_('settings')} + d="M12 14v8H4a8 8 0 018-8zm0-1a6 6 0 110-12 6 6 0 010 12zm2.6 5.81a3.51 3.51 0 010-1.62l-1-.57 1-1.74 1 .58a3.5 3.5 0 011.4-.82V13.5h2v1.15a3.5 3.5 0 011.4.8l1-.57 1 1.74-1 .57a3.51 3.51 0 010 1.62l1 .57-1 1.74-1-.58a3.5 3.5 0 01-1.4.82v1.14h-2v-1.15a3.5 3.5 0 01-1.4-.8l-1 .57-1-1.74 1-.57zM18 17a1 1 0 100 2 1 1 0 000-2z" /> + {$_('users')} + {/if} + {#if store.state.jwtinfo.userdetails.permissions.includes('USERGROUP:GET')} + href="/groups/"> - - {$_('about')} + viewBox="0 0 640 512"> + {$_('user-groups')} - { - AuthService.authControllerLogout(); - logout(); - }}> + href="/runners/"> + + + {$_('runners')} + + {/if} + {#if store.state.jwtinfo.userdetails.permissions.includes('TEAM:GET')} + + + {$_('teams')} + + {/if} + {#if store.state.jwtinfo.userdetails.permissions.includes('DONOR:GET')} + + + + {$_('donors')} + + {/if} + {#if store.state.jwtinfo.userdetails.permissions.includes('DONATION:GET')} + + + + {$_('donations')} + + {/if} + {#if store.state.jwtinfo.userdetails.permissions.includes('TRACK:GET')} + + + {$_('tracks')} + + {/if} + {#if store.state.jwtinfo.userdetails.permissions.includes('CARD:GET')} + + + + + {$_('cards')} + + {/if} + {#if store.state.jwtinfo.userdetails.permissions.includes('SCAN:GET')} + - {$_('logout')} - - - - {/if} + fill="currentColor" + d="M2 4h2v16H2V4zm4 0h1v16H6V4zm2 0h2v16H8V4zm3 0h2v16h-2V4zm3 0h2v16h-2V4zm3 0h1v16h-1V4zm2 0h3v16h-3V4z" /> + Scans + + {/if} + {#if store.state.jwtinfo.userdetails.permissions.includes('CONTACT:GET')} + + + + {$_('contacts')} + + {/if} + {#if store.state.jwtinfo.userdetails.permissions.includes('STATION:GET')} + + + + {$_('scanstations')} + + {/if} + + + + + {$_('settings')} + + + + + {$_('about')} + + { + AuthService.authControllerLogout(); + logout(); + }}> + + + {$_('logout')} + + +