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", label: "Mitarbeiter",
to: "/profiles", to: "/profiles",
icon: "i-heroicons-user-group", icon: "i-heroicons-user-group"
disabled: true
}, },
{ {
label: "Stundensätze", label: "Stundensätze",

View File

@@ -3,13 +3,21 @@
const profileStore = useProfileStore() const profileStore = useProfileStore()
const router = useRouter() 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 = [ const templateColumns = [
{ {
key: 'employeeNumber', key: 'employee_number',
label: "MA-Nummer", label: "MA-Nummer",
},{ },{
key: 'fullName', key: 'full_name',
label: "Name", label: "Name",
},{ },{
key: "email", key: "email",
@@ -26,6 +34,7 @@
<template #right> <template #right>
<UButton <UButton
@click="router.push(`/profiles/create`)" @click="router.push(`/profiles/create`)"
disabled
> >
+ Mitarbeiter + Mitarbeiter
</UButton> </UButton>
@@ -33,8 +42,7 @@
</UDashboardNavbar> </UDashboardNavbar>
<UTable <UTable
:rows="profileStore.profiles" :rows="items"
@select="(item) => router.push(`/profiles/show/${item.id}`)"
:columns="columns" :columns="columns"
> >