Changed nutritional to nutrition.

This commit is contained in:
matthias committed 2026-09-28 01:55:09 +02:00
1 parent 7986632dab
commit 3ae697d852
15 files changed
+93 -10234

No files matched your search

+1 -1
View File
@@ -96,7 +96,7 @@
<v-divider vertical/>
<Nutrition v-bind:nutrition="store.article.nutritional"/>
<Nutrition v-bind:nutrition="store.article.nutrition"/>
<v-btn
:flat="true"
@@ -2,10 +2,10 @@
import {useLabelEditorStore} from "~/store/labelEditorStore";
import type {Ref} from "vue";
import DeleteConfirm from "~/components/ui/deleteConfirm.vue";
import type {Nutritional} from "~/types/nutritional.ts";
import type {Nutrition} from "~/types/nutrition.ts";
const props = defineProps({
nutrition: {type: Object as PropType<Nutritional | null>, required: true},
nutrition: {type: Object as PropType<Nutrition | null>, required: true},
});
let store = useLabelEditorStore();
@@ -4,7 +4,7 @@
import { Variant } from "~/types/variant";
import type {Unit} from "~/types/unit";
import type {Label} from "~/types/label";
import type {Nutritional} from "~/types/nutritional.ts";
import type {Nutrition} from "~/types/nutrition.ts";
let store = useLabelEditorStore();
@@ -5,7 +5,7 @@
import DeleteConfirm from "~/components/ui/deleteConfirm.vue";
import type {Unit} from "~/types/unit";
import type {Label} from "~/types/label";
import type {Nutritional} from "~/types/nutritional.ts";
import type {Nutrition} from "~/types/nutrition.ts";
let store = useLabelEditorStore();
@@ -24,7 +24,7 @@
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)));
let nutrition: Ref<Nutritional | null> = ref<Nutritional | null>(JSON.parse(JSON.stringify(props.variant.nutritional)));
let nutrition: Ref<Nutrition | null> = ref<Nutrition | null>(JSON.parse(JSON.stringify(props.variant.nutrition)));
function toggleEdit() {
if (edit.value) {
+4 -4
View File
@@ -1,7 +1,7 @@
import type {Variant} from "~/types/variant";
import type {Origin} from "~/types/origin";
import type {Unit} from "~/types/unit";
import type {Nutritional} from "~/types/nutritional.ts";
import type {Nutrition} from "~/types/nutrition.ts";
export class Article {
readonly id: number;
@@ -18,13 +18,13 @@ export class Article {
bio_info: string | null;
topm_id: string | null;
additional_name: string | null;
nutritional: Nutritional | null;
nutrition: Nutrition | 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, additional_name: string | null,
nutritional: Nutritional | null) {
nutrition: Nutrition | null) {
this.id = id;
this.name = name;
this.bio = bio;
@@ -45,6 +45,6 @@ export class Article {
this.bio_info = bio_info;
this.topm_id = topm_id;
this.additional_name = additional_name;
this.nutritional = nutritional;
this.nutrition = nutrition;
}
}
@@ -1,4 +1,4 @@
export class Nutritional {
export class Nutrition {
id: number;
calorific_value_kj: number;
calorific_value_kcal: number;
+4 -4
View File
@@ -1,6 +1,6 @@
import type {Unit} from "~/types/unit";
import type {Label} from "~/types/label";
import type {Nutritional} from "~/types/nutritional.ts";
import type {Nutrition} from "~/types/nutrition.ts";
export class Variant {
readonly id: number;
@@ -13,12 +13,12 @@ export class Variant {
label: Label | null;
variant_description: string | null;
topm_row: string | null;
nutritional: Nutritional | null;
nutrition: Nutrition | null;
constructor(id: number, weight: string, ean: string|null, name: string|null,
description:string|null, ingredients: string|null, unit: Unit,
label: Label | null, variant_description: string | null, topm_row: string | null,
nutritional: Nutritional | null) {
nutrition: Nutrition | null) {
this.id = id;
this.weight = weight;
this.ean = ean;
@@ -29,6 +29,6 @@ export class Variant {
this.label = label;
this.variant_description = variant_description;
this.topm_row = topm_row;
this.nutritional = nutritional;
this.nutrition = nutrition;
}
}
-10146
View File
File diff suppressed because it is too large. Load diff