Skip to content

Commit

Permalink
Add login and remove created from admin user table
Browse files Browse the repository at this point in the history
  • Loading branch information
myieye committed Nov 30, 2023
1 parent c6a3a48 commit 34679d7
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion frontend/src/lib/i18n/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"admin_dashboard": {
"title": "Admin Dashboard",
"column_code": "Code",
"column_created": "Created",
"column_email": "Email",
"column_login": "Login",
"column_last_change": "Last Change",
"column_migrated": "Migrated",
"column_name": "Name",
Expand Down
11 changes: 6 additions & 5 deletions frontend/src/routes/(authenticated)/admin/+page.svelte
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<script lang="ts">
import { Badge } from '$lib/components/Badges';
import FormatDate from '$lib/components/FormatDate.svelte';
import Input from '$lib/forms/Input.svelte';
import t from '$lib/i18n';
import type { PageData } from './$types';
Expand Down Expand Up @@ -103,16 +102,21 @@
<th>
{$t('admin_dashboard.column_name')}<span class="i-mdi-sort-ascending text-xl align-[-5px] ml-2" />
</th>
<th>{$t('admin_dashboard.column_login')}</th>
<th>{$t('admin_dashboard.column_email')}</th>
<th>{$t('admin_dashboard.column_role')}</th>
<th>{$t('admin_dashboard.column_created')}</th>
<th />
</tr>
</thead>
<tbody>
{#each shownUsers as user}
<tr>
<td>{user.name}</td>
<td>
{#if user.username}
{user.username}
{/if}
</td>
<td>
<span class="inline-flex items-center gap-2 text-left">
{user.email}
Expand All @@ -128,9 +132,6 @@
<td class:text-accent={user.isAdmin}>
{user.isAdmin ? $t('user_types.admin') : $t('user_types.user')}
</td>
<td>
<FormatDate date={user.createdDate} />
</td>
<td class="p-0">
<Dropdown let:close>
<!-- svelte-ignore a11y-label-has-associated-control -->
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/routes/(authenticated)/admin/+page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ export async function load(event: PageLoadEvent) {
id
name
email
username
isAdmin
createdDate
emailVerified
projects {
id
Expand Down

0 comments on commit 34679d7

Please sign in to comment.