Fix Porfile Index

This commit is contained in:
2025-09-12 18:28:53 +02:00
parent a19aa47e34
commit 95e8da2e39
2 changed files with 13 additions and 6 deletions

View File

@@ -238,8 +238,7 @@ const links = computed(() => {
{
label: "Mitarbeiter",
to: "/profiles",
icon: "i-heroicons-user-group",
disabled: true
icon: "i-heroicons-user-group"
},
{
label: "Stundensätze",

View File

@@ -3,13 +3,21 @@
const profileStore = useProfileStore()
const router = useRouter()
const items = ref([])
const setupPage = async () => {
items.value = (await useNuxtApp().$api("/api/tenant/users")).users
items.value = items.value.map(i => i.profile)
}
setupPage()
const templateColumns = [
{
key: 'employeeNumber',
key: 'employee_number',
label: "MA-Nummer",
},{
key: 'fullName',
key: 'full_name',
label: "Name",
},{
key: "email",
@@ -26,6 +34,7 @@
<template #right>
<UButton
@click="router.push(`/profiles/create`)"
disabled
>
+ Mitarbeiter
</UButton>
@@ -33,8 +42,7 @@
</UDashboardNavbar>
<UTable
:rows="profileStore.profiles"
@select="(item) => router.push(`/profiles/show/${item.id}`)"
:rows="items"
:columns="columns"
>