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
@@ -18,6 +18,7 @@
let ingredients: Ref<string | null> = ref<string | null>(null);
let label: Ref<Label | null> = ref<Label | null>(null);
let variant_description: Ref<string | null> = ref<string | null>(null);
let topm_row: Ref<string | null> = ref<string | null>(null);
if (store.article != null) {
unit.value = store.article.default_unit;
@@ -30,7 +31,9 @@
) {
loading.value = true;
const variant: Variant = new Variant(0, weight.value, ean.value, name.value, description.value, ingredients.value, unit.value, label.value, variant_description.value);
const variant: Variant = new Variant(0, weight.value, ean.value, name.value,
description.value, ingredients.value, unit.value, label.value,
variant_description.value, topm_row.value);
await store.addVariant(variant);
@@ -44,11 +47,17 @@
}
function clearVariables() {
weight.value = null;
ean.value = null;
name.value = null;
description.value = null;
ingredients.value = null;
if (store.article != null) {
weight.value = null;
ean.value = null;
name.value = null;
unit.value = store.article.default_unit;
description.value = null;
ingredients.value = null;
label.value = null;
variant_description.value = null;
topm_row.value = null;
}
loading.value = false;
}
@@ -59,7 +68,7 @@
v-model="dialog"
:scrollable="true"
width="800"
max-height="750"
max-height="850"
>
<template v-slot:activator="{ props }">
<v-btn
@@ -91,15 +100,29 @@
<v-divider/>
<v-card-text>
<v-text-field
v-model.trim="variant_description"
label="Varianten Bezeichnung"
autofocus
/>
<v-row>
<v-col cols="8">
<v-text-field
v-model.trim="variant_description"
label="Varianten Bezeichnung"
autofocus
/>
</v-col>
<v-col>
<v-text-field
v-model.trim="topm_row"
label="TopM Zeile"
:clearable="true"
/>
</v-col>
</v-row>
<v-text-field
v-model.trim="name"
label="Produkt Bezeichnung"
:clearable="true"
:placeholder="(store.article != null)? ((store.article.name != null)? store.article.name : undefined) : undefined"
persistent-placeholder
/>
<v-row>
@@ -131,16 +154,23 @@
<v-text-field
v-model.trim="ean"
label="EAN-Code"
:clearable="true"
/>
<v-textarea
v-model.trim="description"
label="Beschreibung"
:clearable="true"
:placeholder="(store.article != null)? ((store.article.description != null)? store.article.description : undefined) : undefined"
persistent-placeholder
/>
<v-textarea
v-model.trim="ingredients"
label="Zutaten"
:clearable="true"
:placeholder="(store.article != null)? ((store.article.ingredients != null)? store.article.ingredients : undefined) : undefined"
persistent-placeholder
/>
</v-card-text>