This commit is contained in:
2024-10-18 08:58:11 +02:00
parent 8dbf43b672
commit a905b1f966
9 changed files with 165 additions and 70 deletions

View File

@@ -102,7 +102,7 @@
<span v-if="row.documentDate">{{row.documentDate ? dayjs(row.documentDate).format("DD.MM.YY") : ''}}</span>
</template>
<template #dueDate-data="{row}">
<span :class="dayjs(row.dueDate).diff(dayjs()) <= 0 ? ['text-rose-500'] : '' ">{{row.dueDate ? dayjs(row.dueDate).format("DD.MM.YY") : ''}}</span>
<span v-if="row.paymentDays && ['invoices','advanceInvoices'].includes(row.type)" :class="dayjs(row.documentDate).add(row.paymentDays,'day').diff(dayjs()) <= 0 && !isPaid(row) ? ['text-rose-500'] : '' ">{{row.documentDate ? dayjs(row.documentDate).add(row.paymentDays,'day').format("DD.MM.YY") : ''}}</span>
</template>
<template #paid-data="{row}">
<div v-if="row.type === 'invoices' ||row.type === 'advanceInvoices'">
@@ -179,7 +179,7 @@ const templateColumns = [
sortable: true
},{
key: 'state',
label: "Status.",
label: "Status",
sortable: true
},
{
@@ -199,14 +199,14 @@ const templateColumns = [
},
{
key: "paid",
label: "Bezahlt:",
label: "Bezahlt",
sortable: true
},
{
key: "dueDate",
label: "Fällig:",
label: "Fällig",
sortable: true
},
}
]
const selectedColumns = ref(templateColumns)
const columns = computed(() => templateColumns.filter((column) => selectedColumns.value.includes(column)))