Added additional name filed to article.

This commit is contained in:
2026-02-25 15:49:42 +01:00
parent ba5ebc3524
commit 75a178cbf4
7 changed files with 46 additions and 5 deletions
@@ -176,6 +176,18 @@
</v-col>
<v-col cols="5" style="padding: 5px;">
<v-row no-gutters>
<v-text-field
v-model.trim="store.articleEdit.additional_name"
label="Siegel Text"
:placeholder="store.articleEdit.name"
:hint="store.articleEdit.name"
persistent-placeholder
:persistent-hint="store.articleEdit.additional_name != null"
:readonly="!edit"
:clearable="edit"
/>
</v-row>
<v-row no-gutters>
<v-text-field
v-model.trim="store.articleEdit.bio_info"
@@ -21,6 +21,7 @@
let allergens_text: Ref<string | null> = ref<string | null>(null);
let bio_info: Ref<string | null> = ref<string | null>(null);
let topm_id: Ref<string | null> = ref<string | null>(null);
let additional_name: Ref<string | null> = ref<string | null>(null);
async function create() {
if (name.value != null && name.value.trim().length > 0 &&
@@ -36,7 +37,7 @@
const article: Article = new Article(0, name.value, bio.value, origin.value, description.value,
ingredients.value, default_unit.value, [],
mhd.value, bio_origin.value, allergens_text.value, bio_info.value, topm_id.value);
mhd.value, bio_origin.value, allergens_text.value, bio_info.value, topm_id.value, additional_name.value);
await store.createArticle(article);
@@ -60,6 +61,7 @@
allergens_text.value = null;
bio_info.value = null;
topm_id.value = null;
additional_name.value = null;
loading.value = false;
}
@@ -108,6 +110,15 @@
autofocus
/>
<v-text-field
v-model.trim="additional_name"
label="Siegel Text"
:placeholder="name"
:hint="name"
persistent-placeholder
:persistent-hint="additional_name != null"
/>
<v-row>
<v-col cols="2">
<v-checkbox
@@ -183,6 +183,10 @@
:readonly="!edit"
label="Produkt Bezeichnung"
:clearable="edit"
:placeholder="store.articleEdit.name"
:hint="store.articleEdit.name"
persistent-placeholder
:persistent-hint="store.articleEdit.additional_name != null"
/>
</v-row>
+3 -1
View File
@@ -16,11 +16,12 @@ export class Article {
allergens_text: string | null;
bio_info: string | null;
topm_id: string | null;
additional_name: string | null;
constructor(id: number, name: string, bio: boolean, origin: Origin, description: string | null,
ingredients: string | null, default_unit: Unit, variants: Array<Variant> | null,
mhd: string | null, bio_origin: string | null, allergens_text: string | null,
bio_info: string | null, topm_id: string | null) {
bio_info: string | null, topm_id: string | null, additional_name: string | null) {
this.id = id;
this.name = name;
this.bio = bio;
@@ -40,5 +41,6 @@ export class Article {
this.allergens_text = allergens_text;
this.bio_info = bio_info;
this.topm_id = topm_id;
this.additional_name = additional_name;
}
}