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