Fix Porfile Index
This commit is contained in:
@@ -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",
|
||||
|
||||
@@ -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"
|
||||
>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user