From 77748a951b05c6d07f66f687501778b7e73f5817 Mon Sep 17 00:00:00 2001 From: vabene1111 Date: Wed, 23 Oct 2024 18:23:48 +0200 Subject: [PATCH] various improvements for shopping line item dialog --- .../dialogs/ShoppingLineItemDialog.vue | 91 +++++++++++-------- .../components/dialogs/VClosableCardTitle.vue | 6 +- .../model_editors/ShoppingListEntryEditor.vue | 62 +++++++++++++ .../composables/useModelEditorFunctions.ts | 4 +- vue3/src/locales/ar.json | 1 + vue3/src/locales/bg.json | 1 + vue3/src/locales/ca.json | 1 + vue3/src/locales/cs.json | 1 + vue3/src/locales/da.json | 1 + vue3/src/locales/de.json | 1 + vue3/src/locales/el.json | 1 + vue3/src/locales/en.json | 1 + vue3/src/locales/es.json | 1 + vue3/src/locales/fi.json | 1 + vue3/src/locales/fr.json | 1 + vue3/src/locales/he.json | 1 + vue3/src/locales/hu.json | 1 + vue3/src/locales/hy.json | 1 + vue3/src/locales/id.json | 1 + vue3/src/locales/is.json | 1 + vue3/src/locales/it.json | 1 + vue3/src/locales/lt.json | 1 + vue3/src/locales/nb_NO.json | 1 + vue3/src/locales/nl.json | 1 + vue3/src/locales/pl.json | 1 + vue3/src/locales/pt.json | 1 + vue3/src/locales/pt_BR.json | 1 + vue3/src/locales/ro.json | 1 + vue3/src/locales/ru.json | 1 + vue3/src/locales/sl.json | 1 + vue3/src/locales/sv.json | 1 + vue3/src/locales/tr.json | 1 + vue3/src/locales/uk.json | 1 + vue3/src/locales/zh_Hans.json | 1 + vue3/src/locales/zh_Hant.json | 1 + vue3/src/types/Models.ts | 25 ++++- vue3/src/utils/utils.ts | 18 ++++ 37 files changed, 193 insertions(+), 44 deletions(-) create mode 100644 vue3/src/components/model_editors/ShoppingListEntryEditor.vue create mode 100644 vue3/src/utils/utils.ts diff --git a/vue3/src/components/dialogs/ShoppingLineItemDialog.vue b/vue3/src/components/dialogs/ShoppingLineItemDialog.vue index b148fa99fe..c57eccbec9 100644 --- a/vue3/src/components/dialogs/ShoppingLineItemDialog.vue +++ b/vue3/src/components/dialogs/ShoppingLineItemDialog.vue @@ -1,73 +1,85 @@ @@ -79,7 +91,13 @@ import {ShoppingListEntry} from "@/openapi"; import ModelSelect from "@/components/inputs/ModelSelect.vue"; import {IShoppingList, IShoppingListFood} from "@/types/Shopping"; import VClosableCardTitle from "@/components/dialogs/VClosableCardTitle.vue"; +import {VNumberInput} from "vuetify/labs/VNumberInput"; import {DateTime} from "luxon"; +import {useDisplay} from "vuetify"; +import ModelEditDialog from "@/components/dialogs/ModelEditDialog.vue"; +import {useShoppingStore} from "@/stores/ShoppingStore"; + +const {mobile} = useDisplay() const showDialog = defineModel() @@ -91,4 +109,5 @@ const props = defineProps({ \ No newline at end of file diff --git a/vue3/src/components/dialogs/VClosableCardTitle.vue b/vue3/src/components/dialogs/VClosableCardTitle.vue index 2cf346d9cc..3cb8028916 100644 --- a/vue3/src/components/dialogs/VClosableCardTitle.vue +++ b/vue3/src/components/dialogs/VClosableCardTitle.vue @@ -1,13 +1,13 @@