KI-AGENT: Tabellen-Empty-States ohne JSON rendern
Ersetzt ungültige UTable-Empty-Props durch einen gemeinsamen Empty-State-Slot, damit leere Tabellen keine Objekt-/JSON-Ausgabe mehr anzeigen.
This commit is contained in:
@@ -79,8 +79,11 @@
|
||||
:columns="normalizeTableColumns(columns)"
|
||||
:loading="pending"
|
||||
:on-select="(row) => navigateTo(`/staff/profiles/${row.original?.id || row.id}`)"
|
||||
:empty="{ icon: 'i-heroicons-circle-stack-20-solid', label: 'Keine Mitarbeiterprofile gefunden' }"
|
||||
/>
|
||||
>
|
||||
<template #empty>
|
||||
<TableEmptyState label="Keine Mitarbeiterprofile gefunden" />
|
||||
</template>
|
||||
</UTable>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
|
||||
@@ -296,7 +296,6 @@ await setupPage()
|
||||
<UTable
|
||||
v-if="workingTimeInfo"
|
||||
:data="workingTimeInfo.spans"
|
||||
:empty="{ icon: 'i-heroicons-circle-stack-20-solid', label: 'Keine Anwesenheiten' }"
|
||||
:columns="normalizeTableColumns([
|
||||
{ key: 'status', label: 'Status' },
|
||||
{ key: 'startedAt', label: 'Start' },
|
||||
@@ -329,6 +328,9 @@ await setupPage()
|
||||
<template #type-cell="{ row }">
|
||||
{{ row.original.type.charAt(0).toUpperCase() + row.original.type.slice(1).replace('_', ' ') }}
|
||||
</template>
|
||||
<template #empty>
|
||||
<TableEmptyState label="Keine Anwesenheiten" />
|
||||
</template>
|
||||
</UTable>
|
||||
</UDashboardPanel>
|
||||
</div>
|
||||
|
||||
@@ -241,7 +241,6 @@ onMounted(async () => {
|
||||
{ key: 'type', label: 'Typ' },
|
||||
{ key: 'description', label: 'Beschreibung' },
|
||||
])"
|
||||
:empty="{ icon: 'i-heroicons-circle-stack-20-solid', label: 'Keine Zeiten anzuzeigen' }"
|
||||
>
|
||||
<template #state-cell="{ row }">
|
||||
<UBadge v-if="row.original.state === 'approved'" color="green" variant="subtle">Genehmigt</UBadge>
|
||||
@@ -285,6 +284,9 @@ onMounted(async () => {
|
||||
<span v-else-if="row.original.type === 'sick'">{{ row.original.sick_reason }}</span>
|
||||
<span v-else>{{ row.original.description }}</span>
|
||||
</template>
|
||||
<template #empty>
|
||||
<TableEmptyState label="Keine Zeiten anzuzeigen" />
|
||||
</template>
|
||||
</UTable>
|
||||
</UCard>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user