Many Changes

This commit is contained in:
2024-01-04 12:27:46 +01:00
parent 57e856c71c
commit 991cac18f2
31 changed files with 1504 additions and 297 deletions

View File

@@ -18,6 +18,12 @@
@select="selectItem"
:empty-state="{ icon: 'i-heroicons-circle-stack-20-solid', label: 'Noch keine Einträge' }"
>
<template #stock-data="{row}">
{{`${dataStore.getStockByProductId(row.id)} ${(dataStore.units.find(unit => unit.id === row.unit) ? dataStore.units.find(unit => unit.id === row.unit).name : "")}`}}
</template>
<template #purchasePrice-data="{row}">
{{row.purchasePrice ? Number(row.purchasePrice).toFixed(2) + " €" : ""}}
</template>
<template #tags-data="{row}">
<UBadge
v-if="row.tags.length > 0"
@@ -48,24 +54,33 @@ const router = useRouter()
const itemColumns = [
{
key: "id",
label: "Id"
key: "stock",
label: "Bestand"
},
{
key: "name",
label: "Name"
label: "Name",
sortable: true
},
{
key: "manufacturer",
label: "Hersteller",
sortable: true
},
{
key: "unit",
label: "Einheit"
label: "Einheit",
sortable: true
},
{
key: "purchasePrice",
label: "Einkaufspreis",
sortable: true
},
{
key: "tags",
label: "Tags"
label: "Tags",
sortable: true
}
]