Vereinheitliche Empty States in Tabellen
This commit is contained in:
@@ -267,13 +267,8 @@ const selectItem = (item) => {
|
|||||||
:ui="{ divide: 'divide-gray-200 dark:divide-gray-800' }"
|
:ui="{ divide: 'divide-gray-200 dark:divide-gray-800' }"
|
||||||
:on-select="(row) => selectItem(row.original)"
|
:on-select="(row) => selectItem(row.original)"
|
||||||
style="height: 70vh"
|
style="height: 70vh"
|
||||||
|
:empty="{ icon: 'i-heroicons-circle-stack-20-solid', label: 'Keine Belege anzuzeigen' }"
|
||||||
>
|
>
|
||||||
<template #empty>
|
|
||||||
<div class="flex flex-col items-center justify-center py-8 text-center text-sm text-muted">
|
|
||||||
<UIcon name="i-heroicons-circle-stack-20-solid" class="mb-2 size-5" />
|
|
||||||
<span>Keine Belege anzuzeigen</span>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<template #type-cell="{ row }">
|
<template #type-cell="{ row }">
|
||||||
{{ dataStore.documentTypesForCreation[row.original.type].labelSingle }}
|
{{ dataStore.documentTypesForCreation[row.original.type].labelSingle }}
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -254,14 +254,8 @@ const selectAllocation = (allocationLike) => {
|
|||||||
:columns="normalizeTableColumns(columns)"
|
:columns="normalizeTableColumns(columns)"
|
||||||
:on-select="selectAllocation"
|
:on-select="selectAllocation"
|
||||||
class="w-full"
|
class="w-full"
|
||||||
|
:empty="{ icon: 'i-heroicons-circle-stack-20-solid', label: 'Keine Buchungen im ausgewählten Zeitraum' }"
|
||||||
>
|
>
|
||||||
<template #empty>
|
|
||||||
<div class="flex flex-col items-center justify-center py-10 text-center">
|
|
||||||
<UIcon name="i-heroicons-circle-stack-20-solid" class="mb-2 h-10 w-10 text-gray-400" />
|
|
||||||
<p class="font-medium">Keine Buchungen im ausgewählten Zeitraum</p>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<template #amount-cell="{ row }">
|
<template #amount-cell="{ row }">
|
||||||
<span class="text-right text-error" v-if="row.original.amount < 0 || row.original.color === 'red'">{{ useCurrency(row.original.amount) }}</span>
|
<span class="text-right text-error" v-if="row.original.amount < 0 || row.original.color === 'red'">{{ useCurrency(row.original.amount) }}</span>
|
||||||
<span class="text-right text-primary-500" v-else-if="row.original.amount > 0 || row.original.color === 'green'">{{ useCurrency(row.original.amount) }}</span>
|
<span class="text-right text-primary-500" v-else-if="row.original.amount > 0 || row.original.color === 'green'">{{ useCurrency(row.original.amount) }}</span>
|
||||||
|
|||||||
@@ -69,13 +69,8 @@ const columns = [
|
|||||||
class="mt-3"
|
class="mt-3"
|
||||||
:columns="normalizeTableColumns(columns)"
|
:columns="normalizeTableColumns(columns)"
|
||||||
:data="props.item.times"
|
:data="props.item.times"
|
||||||
|
:empty="{ icon: 'i-heroicons-circle-stack-20-solid', label: 'Noch keine Einträge' }"
|
||||||
>
|
>
|
||||||
<template #empty>
|
|
||||||
<div class="flex flex-col items-center justify-center py-8 text-center text-sm text-muted">
|
|
||||||
<UIcon name="i-heroicons-circle-stack-20-solid" class="mb-2 size-5" />
|
|
||||||
<span>Noch keine Einträge</span>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<template #state-cell="{ row }">
|
<template #state-cell="{ row }">
|
||||||
<span
|
<span
|
||||||
v-if="row.original.state === 'Entwurf'"
|
v-if="row.original.state === 'Entwurf'"
|
||||||
|
|||||||
@@ -22,14 +22,11 @@ setupPage()
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<UTable
|
<UTable
|
||||||
v-if="openTasks.length > 0"
|
|
||||||
:data="openTasks"
|
:data="openTasks"
|
||||||
:columns="normalizeTableColumns([{key:'name',label:'Name'},{key:'categorie',label:'Kategorie'}])"
|
:columns="normalizeTableColumns([{key:'name',label:'Name'},{key:'categorie',label:'Kategorie'}])"
|
||||||
:on-select="(i) => router.push(`/tasks/show/${i.id}`)"
|
:on-select="(i) => router.push(`/tasks/show/${i.id}`)"
|
||||||
|
:empty="{ icon: 'i-heroicons-circle-stack-20-solid', label: 'Keine offenen Aufgaben' }"
|
||||||
/>
|
/>
|
||||||
<div v-else>
|
|
||||||
<p class="text-center font-bold">Keine offenen Aufgaben</p>
|
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|||||||
@@ -585,14 +585,8 @@ onMounted(setupPage)
|
|||||||
:columns="normalizeTableColumns(accountColumns)"
|
:columns="normalizeTableColumns(accountColumns)"
|
||||||
:loading="loading"
|
:loading="loading"
|
||||||
:on-select="openAccount"
|
:on-select="openAccount"
|
||||||
|
:empty="{ icon: 'i-heroicons-circle-stack-20-solid', label: 'Keine Buchungskonten im ausgewählten Zeitraum' }"
|
||||||
>
|
>
|
||||||
<template #empty>
|
|
||||||
<div class="flex flex-col items-center justify-center py-10 text-center">
|
|
||||||
<UIcon name="i-heroicons-circle-stack-20-solid" class="mb-2 h-10 w-10 text-gray-400" />
|
|
||||||
<p class="font-medium">Keine Buchungskonten im ausgewaehlten Zeitraum</p>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<template #label-cell="{ row }">
|
<template #label-cell="{ row }">
|
||||||
<div class="truncate font-medium">{{ row.original.label }}</div>
|
<div class="truncate font-medium">{{ row.original.label }}</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -630,14 +624,8 @@ onMounted(setupPage)
|
|||||||
:columns="normalizeTableColumns(ownAccountColumns)"
|
:columns="normalizeTableColumns(ownAccountColumns)"
|
||||||
:loading="loading"
|
:loading="loading"
|
||||||
:on-select="openOwnAccount"
|
:on-select="openOwnAccount"
|
||||||
|
:empty="{ icon: 'i-heroicons-circle-stack-20-solid', label: 'Keine eigenen Buchungen im ausgewählten Zeitraum' }"
|
||||||
>
|
>
|
||||||
<template #empty>
|
|
||||||
<div class="flex flex-col items-center justify-center py-10 text-center">
|
|
||||||
<UIcon name="i-heroicons-circle-stack-20-solid" class="mb-2 h-10 w-10 text-gray-400" />
|
|
||||||
<p class="font-medium">Keine eigenen Buchungen im ausgewaehlten Zeitraum</p>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<template #label-cell="{ row }">
|
<template #label-cell="{ row }">
|
||||||
<div class="truncate font-medium">{{ row.original.label }}</div>
|
<div class="truncate font-medium">{{ row.original.label }}</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -676,6 +664,7 @@ onMounted(setupPage)
|
|||||||
:data="depreciationRows"
|
:data="depreciationRows"
|
||||||
:columns="normalizeTableColumns(depreciationColumns)"
|
:columns="normalizeTableColumns(depreciationColumns)"
|
||||||
:loading="loading"
|
:loading="loading"
|
||||||
|
:empty="{ icon: 'i-heroicons-circle-stack-20-solid', label: 'Keine Abschreibungen im ausgewählten Zeitraum' }"
|
||||||
>
|
>
|
||||||
<template #amount-cell="{ row }">
|
<template #amount-cell="{ row }">
|
||||||
<div class="text-right text-amber-600 dark:text-amber-400 tabular-nums">{{ useCurrency(row.original.amount) }}</div>
|
<div class="text-right text-amber-600 dark:text-amber-400 tabular-nums">{{ useCurrency(row.original.amount) }}</div>
|
||||||
|
|||||||
@@ -197,6 +197,7 @@ onMounted(async () => {
|
|||||||
])"
|
])"
|
||||||
:on-select="(row) => router.push(`/administration/users/${row.original?.id || row.id}`)"
|
:on-select="(row) => router.push(`/administration/users/${row.original?.id || row.id}`)"
|
||||||
class="mt-4"
|
class="mt-4"
|
||||||
|
:empty="{ icon: 'i-heroicons-circle-stack-20-solid', label: 'Keine zugeordneten Benutzer gefunden' }"
|
||||||
/>
|
/>
|
||||||
</UCard>
|
</UCard>
|
||||||
|
|
||||||
|
|||||||
@@ -211,6 +211,7 @@
|
|||||||
:get-row-id="(row) => row.id"
|
:get-row-id="(row) => row.id"
|
||||||
:ui="{ th: { base: 'whitespace-nowrap' } }"
|
:ui="{ th: { base: 'whitespace-nowrap' } }"
|
||||||
:on-select="toggleExecutionRow"
|
:on-select="toggleExecutionRow"
|
||||||
|
:empty="{ icon: 'i-heroicons-circle-stack-20-solid', label: 'Keine Belege anzuzeigen' }"
|
||||||
>
|
>
|
||||||
<template #select-header="{ table }">
|
<template #select-header="{ table }">
|
||||||
<div class="flex justify-center" @click.stop>
|
<div class="flex justify-center" @click.stop>
|
||||||
|
|||||||
@@ -35,13 +35,14 @@ const createExport = async () => {
|
|||||||
</template>
|
</template>
|
||||||
</UDashboardNavbar>
|
</UDashboardNavbar>
|
||||||
<UTable
|
<UTable
|
||||||
v-if="createddocuments.length > 0"
|
|
||||||
:loading="true"
|
:loading="true"
|
||||||
v-model="selected"
|
v-model="selected"
|
||||||
:loading-state="{ icon: 'i-heroicons-arrow-path-20-solid', label: 'Loading...' }"
|
:loading-state="{ icon: 'i-heroicons-arrow-path-20-solid', label: 'Loading...' }"
|
||||||
:data="createddocuments" />
|
:data="createddocuments"
|
||||||
|
:empty="{ icon: 'i-heroicons-circle-stack-20-solid', label: 'Keine SEPA-Belege anzuzeigen' }"
|
||||||
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -154,6 +154,7 @@ const createExport = async () => {
|
|||||||
{ key: 'type', label: 'Typ' },
|
{ key: 'type', label: 'Typ' },
|
||||||
{ key: 'download', label: 'Download' },
|
{ key: 'download', label: 'Download' },
|
||||||
])"
|
])"
|
||||||
|
:empty="{ icon: 'i-heroicons-circle-stack-20-solid', label: 'Keine Exporte anzuzeigen' }"
|
||||||
>
|
>
|
||||||
<template #created_at-cell="{row}">
|
<template #created_at-cell="{row}">
|
||||||
{{dayjs(row.original.created_at).format("DD.MM.YYYY HH:mm")}}
|
{{dayjs(row.original.created_at).format("DD.MM.YYYY HH:mm")}}
|
||||||
|
|||||||
@@ -203,6 +203,7 @@ setupPage()
|
|||||||
label: 'Saldo'
|
label: 'Saldo'
|
||||||
},
|
},
|
||||||
])"
|
])"
|
||||||
|
:empty="{ icon: 'i-heroicons-circle-stack-20-solid', label: 'Keine Bankkonten anzuzeigen' }"
|
||||||
>
|
>
|
||||||
<template #expired-cell="{ row }">
|
<template #expired-cell="{ row }">
|
||||||
<span v-if="row.original.expired" class="text-error-600">Ausgelaufen</span>
|
<span v-if="row.original.expired" class="text-error-600">Ausgelaufen</span>
|
||||||
|
|||||||
@@ -79,13 +79,8 @@
|
|||||||
:columns="normalizeTableColumns(columns)"
|
:columns="normalizeTableColumns(columns)"
|
||||||
:loading="pending"
|
:loading="pending"
|
||||||
:on-select="(row) => navigateTo(`/staff/profiles/${row.original?.id || row.id}`)"
|
: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>
|
/>
|
||||||
<div class="py-10 text-center text-sm text-gray-500">
|
|
||||||
Keine Mitarbeiterprofile gefunden.
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</UTable>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|||||||
@@ -461,6 +461,7 @@ onMounted(async () => {
|
|||||||
:data="filteredTasks"
|
:data="filteredTasks"
|
||||||
:columns="normalizedListColumns"
|
:columns="normalizedListColumns"
|
||||||
:on-select="(task) => openTaskViaRoute(task)"
|
:on-select="(task) => openTaskViaRoute(task)"
|
||||||
|
:empty="{ icon: 'i-heroicons-circle-stack-20-solid', label: 'Keine Aufgaben anzuzeigen' }"
|
||||||
>
|
>
|
||||||
<template #actions-cell="{ row }">
|
<template #actions-cell="{ row }">
|
||||||
<UButton
|
<UButton
|
||||||
@@ -490,11 +491,11 @@ onMounted(async () => {
|
|||||||
{{ getEntityLabel(plantOptions, row.original.plant?.id || row.original.plant) || "-" }}
|
{{ getEntityLabel(plantOptions, row.original.plant?.id || row.original.plant) || "-" }}
|
||||||
</template>
|
</template>
|
||||||
</UTable>
|
</UTable>
|
||||||
<UAlert
|
<UTable
|
||||||
v-else
|
v-else
|
||||||
icon="i-heroicons-circle-stack-20-solid"
|
:data="[]"
|
||||||
title="Keine Aufgaben anzuzeigen"
|
:columns="normalizedListColumns"
|
||||||
variant="subtle"
|
:empty="{ icon: 'i-heroicons-circle-stack-20-solid', label: 'Keine Aufgaben anzuzeigen' }"
|
||||||
/>
|
/>
|
||||||
</UDashboardPanelContent>
|
</UDashboardPanelContent>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user