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

@@ -107,10 +107,12 @@ setupPage()
{{tag}}
</UBadge>
<UDivider
class="my-2"
/>
<span v-if="currentProduct.purchasePrice">Einkaufspreis: {{Number(currentProduct.purchasePrice).toFixed(2)}} <br></span>
Bestand: {{dataStore.getStockByProductId(currentProduct.id)}} {{dataStore.units.find(unit => unit.id === currentProduct.unit) ? dataStore.units.find(unit => unit.id === currentProduct.unit).name : ""}}
<DevOnly>
@@ -193,6 +195,26 @@ setupPage()
v-model="itemInfo.ean"
/>
</UFormGroup>
<UFormGroup
label="Barcode:"
>
<UInput
v-model="itemInfo.barcode"
/>
</UFormGroup>
<UFormGroup
label="Einkaufspreis:"
>
<UInput
v-model="itemInfo.purchasePrice"
type="number"
steps="0.01"
>
<template #trailing>
<span class="text-gray-500 dark:text-gray-400 text-xs">EUR</span>
</template>
</UInput>
</UFormGroup>
<template #footer>

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
}
]