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:
@@ -585,7 +585,6 @@ onMounted(setupPage)
|
||||
:columns="normalizeTableColumns(accountColumns)"
|
||||
:loading="loading"
|
||||
:on-select="openAccount"
|
||||
:empty="{ icon: 'i-heroicons-circle-stack-20-solid', label: 'Keine Buchungskonten im ausgewählten Zeitraum' }"
|
||||
>
|
||||
<template #label-cell="{ row }">
|
||||
<div class="truncate font-medium">{{ row.original.label }}</div>
|
||||
@@ -606,6 +605,9 @@ onMounted(setupPage)
|
||||
<template #gross-cell="{ row }">
|
||||
<div class="text-right font-medium tabular-nums">{{ useCurrency(row.original.gross) }}</div>
|
||||
</template>
|
||||
<template #empty>
|
||||
<TableEmptyState label="Keine Buchungskonten im ausgewählten Zeitraum" />
|
||||
</template>
|
||||
</UTable>
|
||||
</div>
|
||||
</UCard>
|
||||
@@ -624,7 +626,6 @@ onMounted(setupPage)
|
||||
:columns="normalizeTableColumns(ownAccountColumns)"
|
||||
:loading="loading"
|
||||
:on-select="openOwnAccount"
|
||||
:empty="{ icon: 'i-heroicons-circle-stack-20-solid', label: 'Keine eigenen Buchungen im ausgewählten Zeitraum' }"
|
||||
>
|
||||
<template #label-cell="{ row }">
|
||||
<div class="truncate font-medium">{{ row.original.label }}</div>
|
||||
@@ -647,6 +648,9 @@ onMounted(setupPage)
|
||||
{{ useCurrency(row.original.balance) }}
|
||||
</div>
|
||||
</template>
|
||||
<template #empty>
|
||||
<TableEmptyState label="Keine eigenen Buchungen im ausgewählten Zeitraum" />
|
||||
</template>
|
||||
</UTable>
|
||||
</div>
|
||||
</UCard>
|
||||
@@ -664,11 +668,13 @@ onMounted(setupPage)
|
||||
:data="depreciationRows"
|
||||
:columns="normalizeTableColumns(depreciationColumns)"
|
||||
:loading="loading"
|
||||
:empty="{ icon: 'i-heroicons-circle-stack-20-solid', label: 'Keine Abschreibungen im ausgewählten Zeitraum' }"
|
||||
>
|
||||
<template #amount-cell="{ row }">
|
||||
<div class="text-right text-amber-600 dark:text-amber-400 tabular-nums">{{ useCurrency(row.original.amount) }}</div>
|
||||
</template>
|
||||
<template #empty>
|
||||
<TableEmptyState label="Keine Abschreibungen im ausgewählten Zeitraum" />
|
||||
</template>
|
||||
</UTable>
|
||||
</UCard>
|
||||
</UDashboardPanelContent>
|
||||
|
||||
@@ -117,7 +117,6 @@ onMounted(loadCashbooks)
|
||||
class="w-full"
|
||||
:ui="{ divide: 'divide-gray-200 dark:divide-gray-800' }"
|
||||
:on-select="(row) => router.push(`/accounting/cashbooks/${row.original?.id || row.id}`)"
|
||||
:empty="{ icon: 'i-heroicons-banknotes', label: 'Keine Kassenbücher angelegt' }"
|
||||
>
|
||||
<template #datevNumber-cell="{ row }">
|
||||
<span class="font-mono">{{ row.original.datevNumber }}</span>
|
||||
@@ -128,6 +127,9 @@ onMounted(loadCashbooks)
|
||||
<template #syncedAt-cell="{ row }">
|
||||
{{ row.original.createdAt ? new Date(row.original.createdAt).toLocaleDateString("de-DE") : "-" }}
|
||||
</template>
|
||||
<template #empty>
|
||||
<TableEmptyState label="Keine Kassenbücher angelegt" icon="i-heroicons-banknotes" />
|
||||
</template>
|
||||
</UTable>
|
||||
|
||||
<UModal v-model:open="createCashbookModalOpen">
|
||||
|
||||
@@ -255,7 +255,6 @@ onMounted(loadData)
|
||||
:columns="normalizeTableColumns(columns)"
|
||||
:data="periods"
|
||||
:loading="loading"
|
||||
:empty="{ icon: 'i-heroicons-calculator', label: 'Keine Daten für die USt-Auswertung vorhanden' }"
|
||||
>
|
||||
<template #label-cell="{ row }">
|
||||
<div class="flex items-center gap-2">
|
||||
@@ -281,6 +280,9 @@ onMounted(loadData)
|
||||
<template #documents-cell="{ row }">
|
||||
{{ row.original.outputCount }} / {{ row.original.inputCount }}
|
||||
</template>
|
||||
<template #empty>
|
||||
<TableEmptyState label="Keine Daten für die USt-Auswertung vorhanden" icon="i-heroicons-calculator" />
|
||||
</template>
|
||||
</UTable>
|
||||
</UCard>
|
||||
</UDashboardPanelContent>
|
||||
|
||||
Reference in New Issue
Block a user