Added topm id and row number and ui changes.

This commit is contained in:
2026-02-07 19:08:13 +01:00
parent 05b073812c
commit 088734f237
11 changed files with 176 additions and 74 deletions
+72 -53
View File
@@ -22,6 +22,7 @@
let ingredients: Ref<string | null> = ref<string | null>(JSON.parse(JSON.stringify(props.variant.ingredients)));
let label: Ref<Label | null> = ref<Label | null>(JSON.parse(JSON.stringify(props.variant.label)));
let variant_description: Ref<string | null> = ref<string | null>(JSON.parse(JSON.stringify(props.variant.variant_description)));
let topm_row: Ref<string | null> = ref<string | null>(JSON.parse(JSON.stringify(props.variant.topm_row)));
function toggleEdit() {
if (edit.value) {
@@ -43,13 +44,14 @@
unit.value = JSON.parse(JSON.stringify(props.variant.unit));
description.value = JSON.parse(JSON.stringify(props.variant.description));
ingredients.value = JSON.parse(JSON.stringify(props.variant.ingredients));
topm_row.value = JSON.parse(JSON.stringify(props.variant.topm_row));
}
async function updateVariant() {
if (weight.value != null && unit.value != null) {
let updateVariant: Variant = new Variant(props.variant.id, weight.value,
ean.value, name.value, description.value, ingredients.value,
unit.value, label.value, variant_description.value);
unit.value, label.value, variant_description.value, topm_row.value);
await store.updateVariant(updateVariant);
@@ -135,11 +137,17 @@
<v-divider/>
<v-card-text>
<v-row
align="start"
>
<v-col cols="2">
<v-row>
<v-row no-gutters>
<v-col cols="2" style="padding: 5px;">
<v-row no-gutters>
<v-text-field
v-model.trim="topm_row"
label="TopM Zeile"
:readonly="!edit"
:clearable="edit"
/>
</v-row>
<v-row no-gutters>
<v-select
v-model="label"
:items="store.labels"
@@ -149,17 +157,16 @@
item-title="name"
:clearable="edit"
no-data-text="Keine Etiketten Typen angelegt"
/>
</v-row>
<v-row>
<v-row no-gutters>
<v-text-field
v-model.trim="weight"
label="Gewicht"
:readonly="!edit"
/>
</v-row>
<v-row>
<v-row no-gutters>
<v-select
v-model="unit"
:items="store.units"
@@ -169,54 +176,66 @@
</v-row>
</v-col>
<v-col cols="5">
<v-text-field
v-model.trim="name"
:readonly="!edit"
label="Produkt Bezeichnung"
/>
<v-col cols="5" style="padding: 5px;">
<v-row no-gutters>
<v-text-field
v-model.trim="name"
:readonly="!edit"
label="Produkt Bezeichnung"
:clearable="edit"
/>
</v-row>
<v-textarea
v-model.trim="description"
:tile=true
label="Beschreibung"
counter
:persistentCounter=true
rows="6"
no-resize
:readonly="!edit"
:placeholder="(store.article != null)? ((store.article.ingredients != null)? store.article.ingredients : undefined) : undefined"
persistent-placeholder
>
<template v-slot:counter="{ counter }">
<span>{{ counter }} von {{ store.ingredientsMaxChars }} Zeichen.</span>
</template>
</v-textarea>
<v-row no-gutters>
<v-textarea
v-model.trim="description"
:tile=true
label="Beschreibung"
counter
:persistentCounter=true
rows="6"
no-resize
:readonly="!edit"
:placeholder="(store.article != null)? ((store.article.ingredients != null)? store.article.description : undefined) : undefined"
persistent-placeholder
:clearable="edit"
>
<template v-slot:counter="{ counter }">
<span>{{ counter }} von {{ store.ingredientsMaxChars }} Zeichen.</span>
</template>
</v-textarea>
</v-row>
</v-col>
<v-col cols="5">
<v-text-field
v-model.trim="ean"
label="EAN"
:readonly="!edit"
/>
<v-col cols="5" style="padding: 5px;">
<v-row no-gutters>
<v-text-field
v-model.trim="ean"
label="EAN"
:readonly="!edit"
:clearable="edit"
/>
</v-row>
<v-textarea
v-model.trim="ingredients"
:tile=true
label="Zutaten"
counter
:persistentCounter=true
rows="6"
no-resize
:readonly="!edit"
:placeholder="(store.article != null)? ((store.article.ingredients != null)? store.article.ingredients : undefined) : undefined"
persistent-placeholder
>
<template v-slot:counter="{ counter }">
<span>{{ counter }} von {{ store.ingredientsMaxChars }} Zeichen.</span>
</template>
</v-textarea>
<v-row no-gutters>
<v-textarea
v-model.trim="ingredients"
:tile=true
label="Zutaten"
counter
:persistentCounter=true
rows="6"
no-resize
:readonly="!edit"
:placeholder="(store.article != null)? ((store.article.ingredients != null)? store.article.ingredients : undefined) : undefined"
persistent-placeholder
:clearable="edit"
>
<template v-slot:counter="{ counter }">
<span>{{ counter }} von {{ store.ingredientsMaxChars }} Zeichen.</span>
</template>
</v-textarea>
</v-row>
</v-col>
</v-row>
</v-card-text>