started working on user edit form

This commit is contained in:
2025-07-02 16:13:17 +02:00
parent 372cce43fa
commit 10c24dd93d
4 changed files with 30 additions and 3 deletions

View File

@@ -1,7 +1,11 @@
<script>
import { onMount } from 'svelte';
import { t } from '../../translations.svelte.js';
import { useTinyRouter } from 'svelte-tiny-router';
import { user } from '../../user.svelte.js';
const router = useTinyRouter();
let users = $state([]);
onMount(async () => {
@@ -34,11 +38,12 @@
<td>{u.email}</td>
<td>{u.language}</td>
<td>
Check permissions, add button here
{#if user.permissions.includes('UPDATE_USERS')}
<button onclick={() => router.navigate(`/user/${u.id}/edit`)}>{t('user.edit')}</button>
{/if}
</td>
</tr>
{/each}
</tbody>
</table>
</fieldset>