From 49c8a5a375a6e1e2bd3c0fb774e80fe0aca4063e Mon Sep 17 00:00:00 2001 From: vabene1111 Date: Sun, 1 Dec 2024 16:02:32 +0100 Subject: [PATCH] recipe editor in model editor system basics --- .../components/display/ShoppingListView.vue | 2 +- vue3/src/components/inputs/ModelSelect.vue | 3 +- .../components/model_editors/RecipeEditor.vue | 94 +++++++++++++++++++ vue3/src/locales/ar.json | 4 + vue3/src/locales/bg.json | 4 + vue3/src/locales/ca.json | 4 + vue3/src/locales/cs.json | 4 + vue3/src/locales/da.json | 4 + vue3/src/locales/de.json | 4 + vue3/src/locales/el.json | 4 + vue3/src/locales/en.json | 4 + vue3/src/locales/es.json | 4 + vue3/src/locales/fi.json | 4 + vue3/src/locales/fr.json | 4 + vue3/src/locales/he.json | 4 + vue3/src/locales/hu.json | 4 + vue3/src/locales/hy.json | 4 + vue3/src/locales/id.json | 4 + vue3/src/locales/is.json | 4 + vue3/src/locales/it.json | 4 + vue3/src/locales/lt.json | 4 + vue3/src/locales/nb_NO.json | 4 + vue3/src/locales/nl.json | 4 + vue3/src/locales/pl.json | 4 + vue3/src/locales/pt.json | 4 + vue3/src/locales/pt_BR.json | 4 + vue3/src/locales/ro.json | 4 + vue3/src/locales/ru.json | 4 + vue3/src/locales/sl.json | 4 + vue3/src/locales/sv.json | 4 + vue3/src/locales/tr.json | 4 + vue3/src/locales/uk.json | 4 + vue3/src/locales/zh_Hans.json | 4 + vue3/src/locales/zh_Hant.json | 4 + vue3/src/types/Models.ts | 60 ++++++++++-- 35 files changed, 275 insertions(+), 8 deletions(-) create mode 100644 vue3/src/components/model_editors/RecipeEditor.vue diff --git a/vue3/src/components/display/ShoppingListView.vue b/vue3/src/components/display/ShoppingListView.vue index d7c689f60..6cd09a2f0 100644 --- a/vue3/src/components/display/ShoppingListView.vue +++ b/vue3/src/components/display/ShoppingListView.vue @@ -35,7 +35,7 @@ v-model="useUserPreferenceStore().deviceSettings.shopping_show_selected_supermarket_only"> - + diff --git a/vue3/src/components/inputs/ModelSelect.vue b/vue3/src/components/inputs/ModelSelect.vue index 932146a10..b2e137ca4 100644 --- a/vue3/src/components/inputs/ModelSelect.vue +++ b/vue3/src/components/inputs/ModelSelect.vue @@ -30,7 +30,7 @@ :noResultsText="$t('No_Results')" :loading="loading" @open="multiselect.refreshOptions()" - append-to-body + :append-to-body="appendToBody" :classes="{ dropdown: 'multiselect-dropdown z-3000', }" @@ -63,6 +63,7 @@ const props = defineProps({ canClear: {type: Boolean, default: true}, mode: {type: String as PropType<'single' | 'multiple' | 'tags'>, default: 'single'}, + appendToBody: {type: Boolean, default: false}, allowCreate: {type: Boolean, default: false}, diff --git a/vue3/src/components/model_editors/RecipeEditor.vue b/vue3/src/components/model_editors/RecipeEditor.vue new file mode 100644 index 000000000..d606d7104 --- /dev/null +++ b/vue3/src/components/model_editors/RecipeEditor.vue @@ -0,0 +1,94 @@ + + + + + \ No newline at end of file diff --git a/vue3/src/locales/ar.json b/vue3/src/locales/ar.json index 1d7607e3f..13b4f91b5 100644 --- a/vue3/src/locales/ar.json +++ b/vue3/src/locales/ar.json @@ -260,6 +260,7 @@ "Selected": "", "SelectedCategories": "", "Servings": "", + "ServingsText": "", "Settings": "", "Share": "", "ShopLater": "", @@ -284,6 +285,7 @@ "Step_Name": "", "Step_Type": "", "Step_start_time": "", + "Steps": "", "SubstituteOnHand": "", "Substitutes": "", "Success": "", @@ -324,12 +326,14 @@ "View": "", "View_Recipes": "", "Waiting": "", + "WaitingTime": "", "Warning": "", "Warning_Delete_Supermarket_Category": "", "Website": "", "Wednesday": "", "Week": "", "Week_Numbers": "", + "WorkingTime": "", "Year": "", "YourSpaces": "", "active": "", diff --git a/vue3/src/locales/bg.json b/vue3/src/locales/bg.json index 9ce46f305..703d9ddcf 100644 --- a/vue3/src/locales/bg.json +++ b/vue3/src/locales/bg.json @@ -253,6 +253,7 @@ "Selected": "Избрано", "SelectedCategories": "", "Servings": "Порции", + "ServingsText": "", "Settings": "Настройки", "Share": "Споделяне", "ShopLater": "", @@ -277,6 +278,7 @@ "Step_Name": "Стъпка Име", "Step_Type": "Стъпка Тип", "Step_start_time": "Стъпка Начално време", + "Steps": "", "SubstituteOnHand": "Имате заместител под ръка.", "Substitutes": "", "Success": "Успешно", @@ -315,12 +317,14 @@ "View": "Изглед", "View_Recipes": "Вижте рецепти", "Waiting": "Очакване", + "WaitingTime": "", "Warning": "Внимание", "Warning_Delete_Supermarket_Category": "Изтриването на категория супермаркет ще изтрие и всички връзки с храни. Сигурен ли си?", "Website": "уебсайт", "Wednesday": "", "Week": "Седмица", "Week_Numbers": "Номера на седмиците", + "WorkingTime": "", "Year": "Година", "YourSpaces": "", "active": "", diff --git a/vue3/src/locales/ca.json b/vue3/src/locales/ca.json index 6cafe9507..a25f77aa1 100644 --- a/vue3/src/locales/ca.json +++ b/vue3/src/locales/ca.json @@ -332,6 +332,7 @@ "Selected": "", "SelectedCategories": "", "Servings": "", + "ServingsText": "", "Settings": "", "Share": "", "ShopLater": "", @@ -365,6 +366,7 @@ "Step_Name": "Nom del pas", "Step_Type": "Tipus de pas", "Step_start_time": "Hora d'inici", + "Steps": "", "Sticky_Nav": "", "Sticky_Nav_Help": "", "SubstituteOnHand": "", @@ -421,6 +423,7 @@ "View": "", "View_Recipes": "Mostreu les receptes", "Waiting": "", + "WaitingTime": "", "Warning": "", "Warning_Delete_Supermarket_Category": "", "Website": "", @@ -428,6 +431,7 @@ "Week": "", "Week_Numbers": "", "Welcome": "", + "WorkingTime": "", "Year": "", "YourSpaces": "", "active": "", diff --git a/vue3/src/locales/cs.json b/vue3/src/locales/cs.json index 4235f62ca..a6d3592ab 100644 --- a/vue3/src/locales/cs.json +++ b/vue3/src/locales/cs.json @@ -330,6 +330,7 @@ "Selected": "Vybrané", "SelectedCategories": "", "Servings": "Porce", + "ServingsText": "", "Settings": "Nastavení", "Share": "Sdílet", "ShopLater": "", @@ -361,6 +362,7 @@ "Step_Name": "Název kroku", "Step_Type": "Druh kroku", "Step_start_time": "Nastav počáteční čas", + "Steps": "", "Sticky_Nav": "Připnout navigační panel", "Sticky_Nav_Help": "Vždy zobrazit navigační panel na vrchu stránky.", "SubstituteOnHand": "Máte k dispozici náhradu.", @@ -414,6 +416,7 @@ "View": "Zobrazit", "View_Recipes": "Zobrazit recepty", "Waiting": "Čekající", + "WaitingTime": "", "Warning": "Varování", "Warning_Delete_Supermarket_Category": "Vymazáním kategorie obchodu dojde k odstranění všech vazeb na potraviny. Jste si jistí?", "Website": "Web", @@ -421,6 +424,7 @@ "Week": "Týden", "Week_Numbers": "Číslo týdne", "Welcome": "Vítejte", + "WorkingTime": "", "Year": "Rok", "YourSpaces": "", "active": "", diff --git a/vue3/src/locales/da.json b/vue3/src/locales/da.json index 3b77a1e79..aff9d5478 100644 --- a/vue3/src/locales/da.json +++ b/vue3/src/locales/da.json @@ -312,6 +312,7 @@ "Selected": "Valgt", "SelectedCategories": "", "Servings": "Serveringer", + "ServingsText": "", "Settings": "Indstillinger", "Share": "Del", "ShopLater": "", @@ -339,6 +340,7 @@ "Step_Name": "Trin navn", "Step_Type": "Trin type", "Step_start_time": "Trin starttid", + "Steps": "", "Sticky_Nav": "Fastlåst navigation", "Sticky_Nav_Help": "Vis altid navigationsmenuen øverst på skærmen.", "SubstituteOnHand": "Du har erstatninger tilgængeligt.", @@ -392,6 +394,7 @@ "View": "Vis", "View_Recipes": "Vis opskrifter", "Waiting": "Vente", + "WaitingTime": "", "Warning": "Advarsel", "Warning_Delete_Supermarket_Category": "At slette en supermarkedskategori vil også slette alle relationer til mad. Er du sikker?", "Website": "Hjemmeside", @@ -399,6 +402,7 @@ "Week": "Uge", "Week_Numbers": "Ugenumre", "Welcome": "Velkommen", + "WorkingTime": "", "Year": "År", "YourSpaces": "", "active": "", diff --git a/vue3/src/locales/de.json b/vue3/src/locales/de.json index a31931b51..36c350238 100644 --- a/vue3/src/locales/de.json +++ b/vue3/src/locales/de.json @@ -335,6 +335,7 @@ "Selected": "Ausgewählt", "SelectedCategories": "Ausgewählte Kategorien", "Servings": "Portionen", + "ServingsText": "Portionstext", "Settings": "Einstellungen", "Share": "Teilen", "ShopLater": "Später kaufen", @@ -368,6 +369,7 @@ "Step_Name": "Schritt Name", "Step_Type": "Schritt Typ", "Step_start_time": "Schritt Startzeit", + "Steps": "Schritte", "Sticky_Nav": "Navigationsleiste immer sichtbar (sticky navigation)", "Sticky_Nav_Help": "Navigationsleiste immer im Seitenkopf anzeigen.", "SubstituteOnHand": "Du hast eine Alternative vorrätig.", @@ -424,6 +426,7 @@ "View": "Ansicht", "View_Recipes": "Rezepte Ansehen", "Waiting": "Wartezeit", + "WaitingTime": "Wartezeit (min)", "Warning": "Warnung", "Warning_Delete_Supermarket_Category": "Die Löschung einer Supermarktkategorie werden auch alle Beziehungen zu Lebensmitteln gelöscht. Bist du dir sicher?", "Website": "Webseite", @@ -431,6 +434,7 @@ "Week": "Woche", "Week_Numbers": "Kalenderwochen", "Welcome": "Willkommen", + "WorkingTime": "Arbeitszeit (min)", "Year": "Jahr", "YourSpaces": "Deine Spaces", "active": "aktiv", diff --git a/vue3/src/locales/el.json b/vue3/src/locales/el.json index 9b40fab73..7b82342d9 100644 --- a/vue3/src/locales/el.json +++ b/vue3/src/locales/el.json @@ -304,6 +304,7 @@ "Selected": "Επιλεγμένο", "SelectedCategories": "", "Servings": "Μερίδες", + "ServingsText": "", "Settings": "Ρυθμίσεις", "Share": "Κοινοποίηση", "ShopLater": "", @@ -330,6 +331,7 @@ "Step_Name": "Όνομα βήματος", "Step_Type": "Είδος βήματος", "Step_start_time": "Χρόνος αρχής βήματος", + "Steps": "", "Sticky_Nav": "Κολλητική πλοήγηση", "Sticky_Nav_Help": "Μόνιμη εμφάνιση του μενού πλοήγησης στο πάνω μέρος της οθόνης.", "SubstituteOnHand": "Έχετε διαθέσιμο ένα υποκατάστατο.", @@ -381,6 +383,7 @@ "View": "Προβολή", "View_Recipes": "Προβολή συνταγών", "Waiting": "Αναμονή", + "WaitingTime": "", "Warning": "Προειδοποίηση", "Warning_Delete_Supermarket_Category": "Η διαγραφή μιας κατηγορίας supermarket θα διαγράψει και όλες τις σχέσεις της με φαγητά. Είστε σίγουροι;", "Website": "Ιστοσελίδα", @@ -388,6 +391,7 @@ "Week": "Εβδομάδα", "Week_Numbers": "Αριθμοί εδομάδων", "Welcome": "Καλώς ήρθατε", + "WorkingTime": "", "Year": "Έτος", "YourSpaces": "", "active": "", diff --git a/vue3/src/locales/en.json b/vue3/src/locales/en.json index 336558da3..289a2ddf4 100644 --- a/vue3/src/locales/en.json +++ b/vue3/src/locales/en.json @@ -334,6 +334,7 @@ "Selected": "Selected", "SelectedCategories": "Selected Categories", "Servings": "Servings", + "ServingsText": "Servings Text", "Settings": "Settings", "Share": "Share", "ShopLater": "Shop later", @@ -367,6 +368,7 @@ "Step_Name": "Step Name", "Step_Type": "Step Type", "Step_start_time": "Step start time", + "Steps": "Steps", "Sticky_Nav": "Sticky Navigation", "Sticky_Nav_Help": "Always show the navigation menu at the top of the screen.", "SubstituteOnHand": "You have a substitute on hand.", @@ -423,6 +425,7 @@ "View": "View", "View_Recipes": "View Recipes", "Waiting": "Waiting", + "WaitingTime": "Waiting Time (min)", "Warning": "Warning", "Warning_Delete_Supermarket_Category": "Deleting a supermarket category will also delete all relations to foods. Are you sure?", "Website": "Website", @@ -430,6 +433,7 @@ "Week": "Week", "Week_Numbers": "Week numbers", "Welcome": "Welcome", + "WorkingTime": "Working time (min)", "Year": "Year", "YourSpaces": "Your Spaces", "active": "active", diff --git a/vue3/src/locales/es.json b/vue3/src/locales/es.json index 6cf73a1f2..c0e48ebfa 100644 --- a/vue3/src/locales/es.json +++ b/vue3/src/locales/es.json @@ -331,6 +331,7 @@ "Selected": "Selecionado", "SelectedCategories": "", "Servings": "Raciones", + "ServingsText": "", "Settings": "Opciones", "Share": "Compartir", "ShopLater": "", @@ -364,6 +365,7 @@ "Step_Name": "Nombre Paso", "Step_Type": "Tipo Paso", "Step_start_time": "Hora de inicio", + "Steps": "", "Sticky_Nav": "Navegación Fija", "Sticky_Nav_Help": "Mostrar siempre el menú de navegación el la parte superior de la pantalla.", "SubstituteOnHand": "Tienen un sustituto disponible.", @@ -420,6 +422,7 @@ "View": "Mostrar", "View_Recipes": "Mostrar recetas", "Waiting": "esperando", + "WaitingTime": "", "Warning": "Advertencia", "Warning_Delete_Supermarket_Category": "Borrar una categoría de supermercado borrará también todas las relaciones con alimentos. ¿Está seguro?", "Website": "Sitio Web", @@ -427,6 +430,7 @@ "Week": "Semana", "Week_Numbers": "numero de semana", "Welcome": "Bienvenido/a", + "WorkingTime": "", "Year": "Año", "YourSpaces": "", "active": "", diff --git a/vue3/src/locales/fi.json b/vue3/src/locales/fi.json index a87477b73..ba3cb13d1 100644 --- a/vue3/src/locales/fi.json +++ b/vue3/src/locales/fi.json @@ -185,6 +185,7 @@ "Selected": "Valittu", "SelectedCategories": "", "Servings": "Annokset", + "ServingsText": "", "Settings": "Asetukset", "Share": "Jaa", "ShopLater": "", @@ -206,6 +207,7 @@ "Step_Name": "Vaiheen Nimi", "Step_Type": "Vaiheen Tyyppi", "Step_start_time": "Vaiheen aloitusaika", + "Steps": "", "Substitutes": "", "Success": "Onnistui", "Sunday": "", @@ -235,9 +237,11 @@ "View": "Katso", "View_Recipes": "Näytä Reseptit", "Waiting": "Odottaa", + "WaitingTime": "", "Wednesday": "", "Week": "Viikko", "Week_Numbers": "Viikkonumerot", + "WorkingTime": "", "Year": "Vuosi", "YourSpaces": "", "active": "", diff --git a/vue3/src/locales/fr.json b/vue3/src/locales/fr.json index 80d8e950f..6c0c5e980 100644 --- a/vue3/src/locales/fr.json +++ b/vue3/src/locales/fr.json @@ -332,6 +332,7 @@ "Selected": "Sélectionné", "SelectedCategories": "", "Servings": "Portions", + "ServingsText": "", "Settings": "Paramètres", "Share": "Partager", "ShopLater": "", @@ -365,6 +366,7 @@ "Step_Name": "Nom de l’étape", "Step_Type": "Type d’étape", "Step_start_time": "Heure de début de l’étape", + "Steps": "", "Sticky_Nav": "Barre de navigation collante", "Sticky_Nav_Help": "Toujours afficher le menu de navigation en haut de l’écran.", "Substitutes": "", @@ -420,6 +422,7 @@ "View": "Voir", "View_Recipes": "Voir les recettes", "Waiting": "Attente", + "WaitingTime": "", "Warning": "Avertissement", "Warning_Delete_Supermarket_Category": "Supprimer une catégorie de supermarché supprimera également toutes les relations avec les aliments. Êtes-vous sûr ?", "Website": "Site", @@ -427,6 +430,7 @@ "Week": "Semaine", "Week_Numbers": "Numéro de semaine", "Welcome": "Bienvenue", + "WorkingTime": "", "Year": "Année", "YourSpaces": "", "active": "", diff --git a/vue3/src/locales/he.json b/vue3/src/locales/he.json index cf37f027e..49335729a 100644 --- a/vue3/src/locales/he.json +++ b/vue3/src/locales/he.json @@ -333,6 +333,7 @@ "Selected": "נבחר", "SelectedCategories": "", "Servings": "מנות", + "ServingsText": "", "Settings": "הגדרות", "Share": "שיתוף", "ShopLater": "", @@ -366,6 +367,7 @@ "Step_Name": "שם צעד", "Step_Type": "סוג צעד", "Step_start_time": "זמן התחלת הצעד", + "Steps": "", "Sticky_Nav": "ניווט דביק", "Sticky_Nav_Help": "תמיד הצג את תפריט הניווט בראש העמוד.", "SubstituteOnHand": "יש לך תחלופה זמינה.", @@ -422,6 +424,7 @@ "View": "תצוגה", "View_Recipes": "הצג מתכונים", "Waiting": "המתנה", + "WaitingTime": "", "Warning": "אזהרה", "Warning_Delete_Supermarket_Category": "מחיקת קטגורית סופרמרקט תמחוק גם את המאכלים הקשורים. האם אתה בטוח ?", "Website": "אתר", @@ -429,6 +432,7 @@ "Week": "שבוע", "Week_Numbers": "מספר השבוע", "Welcome": "ברוכים הבאים", + "WorkingTime": "", "Year": "שנה", "YourSpaces": "", "active": "", diff --git a/vue3/src/locales/hu.json b/vue3/src/locales/hu.json index 579dbb785..c26d68ea0 100644 --- a/vue3/src/locales/hu.json +++ b/vue3/src/locales/hu.json @@ -306,6 +306,7 @@ "Selected": "Kiválasztott", "SelectedCategories": "", "Servings": "Adag", + "ServingsText": "", "Settings": "Beállítások", "Share": "Megosztás", "ShopLater": "", @@ -332,6 +333,7 @@ "Step_Name": "Lépés neve", "Step_Type": "Lépés típusa", "Step_start_time": "A lépés kezdési ideje", + "Steps": "", "Sticky_Nav_Help": "A navigációs menü mindig a képernyő tetején jelenjen meg.", "SubstituteOnHand": "Van elérhető helyettesítője.", "Substitutes": "", @@ -382,6 +384,7 @@ "View": "Nézet", "View_Recipes": "Receptek megjelenítése", "Waiting": "Várakozás", + "WaitingTime": "", "Warning": "Figyelmeztetés", "Warning_Delete_Supermarket_Category": "Egy szupermarket-kategória törlése az alapanyagokkal való összes kapcsolatot is törli. Biztos vagy benne?", "Website": "Weboldal", @@ -389,6 +392,7 @@ "Week": "Hét", "Week_Numbers": "", "Welcome": "Üdvözöljük", + "WorkingTime": "", "Year": "Év", "YourSpaces": "", "active": "", diff --git a/vue3/src/locales/hy.json b/vue3/src/locales/hy.json index 71a37bb7f..404809082 100644 --- a/vue3/src/locales/hy.json +++ b/vue3/src/locales/hy.json @@ -129,6 +129,7 @@ "Selected": "", "SelectedCategories": "", "Servings": "", + "ServingsText": "", "Settings": "Կարգավորումներ", "Share": "", "ShopLater": "", @@ -144,6 +145,7 @@ "SpaceSettings": "", "Step": "", "Step_start_time": "Քայլի սկսելու ժամանակը", + "Steps": "", "Substitutes": "", "Success": "", "Sunday": "", @@ -165,7 +167,9 @@ "View": "Դիտել", "View_Recipes": "Դիտել բաղադրատոմսերը", "Waiting": "", + "WaitingTime": "", "Wednesday": "", + "WorkingTime": "", "YourSpaces": "", "active": "", "all_fields_optional": "Բոլոր տողերը կամավոր են և կարող են մնալ դատարկ։", diff --git a/vue3/src/locales/id.json b/vue3/src/locales/id.json index 375061043..99dab23fe 100644 --- a/vue3/src/locales/id.json +++ b/vue3/src/locales/id.json @@ -282,6 +282,7 @@ "Selected": "Terpilih", "SelectedCategories": "", "Servings": "Porsi", + "ServingsText": "", "Settings": "Pengaturan", "Share": "Bagikan", "ShopLater": "", @@ -307,6 +308,7 @@ "Step_Name": "Nama Langkah", "Step_Type": "Tipe Langkah", "Step_start_time": "Langkah waktu mulai", + "Steps": "", "Sticky_Nav": "", "Sticky_Nav_Help": "", "SubstituteOnHand": "", @@ -350,12 +352,14 @@ "View": "Melihat", "View_Recipes": "Lihat Resep", "Waiting": "Menunggu", + "WaitingTime": "", "Warning": "", "Warning_Delete_Supermarket_Category": "", "Website": "", "Wednesday": "", "Week": "", "Week_Numbers": "", + "WorkingTime": "", "Year": "", "YourSpaces": "", "active": "", diff --git a/vue3/src/locales/is.json b/vue3/src/locales/is.json index b7974ac90..1e5b918c8 100644 --- a/vue3/src/locales/is.json +++ b/vue3/src/locales/is.json @@ -332,6 +332,7 @@ "Selected": "", "SelectedCategories": "", "Servings": "", + "ServingsText": "", "Settings": "", "Share": "", "ShopLater": "", @@ -364,6 +365,7 @@ "Step_Name": "", "Step_Type": "", "Step_start_time": "", + "Steps": "", "Sticky_Nav": "", "Sticky_Nav_Help": "", "SubstituteOnHand": "", @@ -420,6 +422,7 @@ "View": "", "View_Recipes": "", "Waiting": "", + "WaitingTime": "", "Warning": "", "Warning_Delete_Supermarket_Category": "", "Website": "", @@ -427,6 +430,7 @@ "Week": "", "Week_Numbers": "", "Welcome": "", + "WorkingTime": "", "Year": "", "YourSpaces": "", "active": "", diff --git a/vue3/src/locales/it.json b/vue3/src/locales/it.json index d02a1da77..369c75795 100644 --- a/vue3/src/locales/it.json +++ b/vue3/src/locales/it.json @@ -290,6 +290,7 @@ "Selected": "Selezionato", "SelectedCategories": "", "Servings": "Porzioni", + "ServingsText": "", "Settings": "Impostazioni", "Share": "Condividi", "ShopLater": "", @@ -316,6 +317,7 @@ "Step_Name": "Nome dello Step", "Step_Type": "Tipo di Step", "Step_start_time": "Ora di inizio dello Step", + "Steps": "", "Sticky_Nav": "Navigazione con menu fissato", "Sticky_Nav_Help": "Mostra sempre il menu di navigazione in alto.", "SubstituteOnHand": "Hai un sostituto disponibile.", @@ -365,12 +367,14 @@ "View": "Mostra", "View_Recipes": "Mostra ricette", "Waiting": "Attesa", + "WaitingTime": "", "Warning": "Attenzione", "Warning_Delete_Supermarket_Category": "L'eliminazione di una categoria di supermercato comporta anche l'eliminazione di tutte le relazioni con gli alimenti. Sei sicuro?", "Website": "Sito web", "Wednesday": "", "Week": "Settimana", "Week_Numbers": "Numeri della settimana", + "WorkingTime": "", "Year": "Anno", "YourSpaces": "", "active": "", diff --git a/vue3/src/locales/lt.json b/vue3/src/locales/lt.json index e7dd05c01..884ecd6b6 100644 --- a/vue3/src/locales/lt.json +++ b/vue3/src/locales/lt.json @@ -310,6 +310,7 @@ "Selected": "", "SelectedCategories": "", "Servings": "", + "ServingsText": "", "Settings": "", "Share": "", "ShopLater": "", @@ -337,6 +338,7 @@ "Step_Name": "Žingsnio pavadinimas", "Step_Type": "Žingsnio tipas", "Step_start_time": "Žingsnio pradžios laikas", + "Steps": "", "Sticky_Nav": "", "Sticky_Nav_Help": "", "SubstituteOnHand": "", @@ -390,6 +392,7 @@ "View": "", "View_Recipes": "Žiūrėti receptus", "Waiting": "", + "WaitingTime": "", "Warning": "", "Warning_Delete_Supermarket_Category": "", "Website": "", @@ -397,6 +400,7 @@ "Week": "", "Week_Numbers": "", "Welcome": "", + "WorkingTime": "", "Year": "", "YourSpaces": "", "active": "", diff --git a/vue3/src/locales/nb_NO.json b/vue3/src/locales/nb_NO.json index a689bf624..c0cf80c84 100644 --- a/vue3/src/locales/nb_NO.json +++ b/vue3/src/locales/nb_NO.json @@ -302,6 +302,7 @@ "Selected": "Valgte", "SelectedCategories": "", "Servings": "Porsjoner", + "ServingsText": "", "Settings": "Innstillinger", "Share": "Del", "ShopLater": "", @@ -328,6 +329,7 @@ "Step_Name": "Trinn navn", "Step_Type": "Trinn type", "Step_start_time": "Trinn starttid", + "Steps": "", "Sticky_Nav": "", "Sticky_Nav_Help": "", "SubstituteOnHand": "", @@ -379,6 +381,7 @@ "View": "Visning", "View_Recipes": "Vis oppskrifter", "Waiting": "Venter", + "WaitingTime": "", "Warning": "Advarsel", "Warning_Delete_Supermarket_Category": "", "Website": "Nettside", @@ -386,6 +389,7 @@ "Week": "Uke", "Week_Numbers": "Ukenummer", "Welcome": "Velkommen", + "WorkingTime": "", "Year": "År", "YourSpaces": "", "active": "", diff --git a/vue3/src/locales/nl.json b/vue3/src/locales/nl.json index 50e601872..e1f33bcbc 100644 --- a/vue3/src/locales/nl.json +++ b/vue3/src/locales/nl.json @@ -306,6 +306,7 @@ "Selected": "Geselecteerd", "SelectedCategories": "", "Servings": "Porties", + "ServingsText": "", "Settings": "Instellingen", "Share": "Deel", "ShopLater": "", @@ -332,6 +333,7 @@ "Step_Name": "Stap Naam", "Step_Type": "Stap Type", "Step_start_time": "Starttijd stap", + "Steps": "", "Sticky_Nav": "Navigatie altijd zichbaar", "Sticky_Nav_Help": "Geef navigatiemenu altijd bovenin weer.", "SubstituteOnHand": "Je hebt een vervanger op voorraad.", @@ -383,6 +385,7 @@ "View": "Bekijk", "View_Recipes": "Bekijk Recepten", "Waiting": "Wachten", + "WaitingTime": "", "Warning": "Waarschuwing", "Warning_Delete_Supermarket_Category": "Een supermarktcategorie verwijderen verwijdert ook alle relaties naar ingrediënten. Weet je het zeker?", "Website": "Website", @@ -390,6 +393,7 @@ "Week": "Week", "Week_Numbers": "Weeknummers", "Welcome": "Welkom", + "WorkingTime": "", "Year": "Jaar", "YourSpaces": "", "active": "", diff --git a/vue3/src/locales/pl.json b/vue3/src/locales/pl.json index e246e1378..913b3162b 100644 --- a/vue3/src/locales/pl.json +++ b/vue3/src/locales/pl.json @@ -334,6 +334,7 @@ "Selected": "Wybrane", "SelectedCategories": "", "Servings": "Porcje", + "ServingsText": "", "Settings": "Ustawienia", "Share": "Udostępnij", "ShopLater": "", @@ -367,6 +368,7 @@ "Step_Name": "Nazwa kroku", "Step_Type": "Typ kroku", "Step_start_time": "Czas rozpoczęcia kroku", + "Steps": "", "Sticky_Nav": "Przyklejona nawigacja", "Sticky_Nav_Help": "Zawsze pokazuj menu nawigacyjne u góry ekranu.", "SubstituteOnHand": "Masz pod ręką zamienniki.", @@ -423,6 +425,7 @@ "View": "Pogląd", "View_Recipes": "Przeglądaj przepisy", "Waiting": "Oczekiwanie", + "WaitingTime": "", "Warning": "Ostrzeżenie", "Warning_Delete_Supermarket_Category": "Usunięcie kategorii supermarketu spowoduje również usunięcie wszystkich relacji z żywnością. Jesteś pewny?", "Website": "Strona internetowa", @@ -430,6 +433,7 @@ "Week": "Tydzień", "Week_Numbers": "Numery tygodni", "Welcome": "Witamy", + "WorkingTime": "", "Year": "Rok", "YourSpaces": "", "active": "", diff --git a/vue3/src/locales/pt.json b/vue3/src/locales/pt.json index a9f5c6d7a..e576cbc3d 100644 --- a/vue3/src/locales/pt.json +++ b/vue3/src/locales/pt.json @@ -248,6 +248,7 @@ "Selected": "Selecionado", "SelectedCategories": "", "Servings": "Doses", + "ServingsText": "", "Settings": "Definições", "Share": "Partilhar", "ShopLater": "", @@ -271,6 +272,7 @@ "Step_Name": "Nome do Passo", "Step_Type": "Tipo do passo", "Step_start_time": "Hora de Inicio do passo", + "Steps": "", "SubstituteOnHand": "", "Substitutes": "", "Success": "Sucesso", @@ -311,10 +313,12 @@ "View": "Vista", "View_Recipes": "Ver Receitas", "Waiting": "Em espera", + "WaitingTime": "", "Warning": "Aviso", "Wednesday": "", "Week": "Semana", "Week_Numbers": "Números das semanas", + "WorkingTime": "", "Year": "Ano", "YourSpaces": "", "active": "", diff --git a/vue3/src/locales/pt_BR.json b/vue3/src/locales/pt_BR.json index 209923ed1..9b971d84e 100644 --- a/vue3/src/locales/pt_BR.json +++ b/vue3/src/locales/pt_BR.json @@ -321,6 +321,7 @@ "Selected": "Selecionado", "SelectedCategories": "", "Servings": "Porções", + "ServingsText": "", "Settings": "Configurações", "Share": "Compartilhar", "ShopLater": "", @@ -349,6 +350,7 @@ "Step_Name": "Nome da etapa", "Step_Type": "Tipo de etapa", "Step_start_time": "Hora de início", + "Steps": "", "Sticky_Nav_Help": "Permitir mostrar o menu de navegação no topo da tela.", "SubstituteOnHand": "Você tem um substituto disponível.", "Substitutes": "", @@ -398,12 +400,14 @@ "View": "Visualizar", "View_Recipes": "Ver Receitas", "Waiting": "Espera", + "WaitingTime": "", "Warning": "Alerta", "Website": "Website", "Wednesday": "", "Week": "Semana", "Week_Numbers": "Números da Semana", "Welcome": "Bem vindo", + "WorkingTime": "", "Year": "Ano", "YourSpaces": "", "active": "", diff --git a/vue3/src/locales/ro.json b/vue3/src/locales/ro.json index e6d1e631b..2724c1591 100644 --- a/vue3/src/locales/ro.json +++ b/vue3/src/locales/ro.json @@ -294,6 +294,7 @@ "Selected": "Selectat", "SelectedCategories": "", "Servings": "Porții", + "ServingsText": "", "Settings": "Setări", "Share": "Împărtășire", "ShopLater": "", @@ -320,6 +321,7 @@ "Step_Name": "Nume pas", "Step_Type": "Tip pas", "Step_start_time": "Pasule de începere a orei", + "Steps": "", "Sticky_Nav": "Navigare lipicioasă", "Sticky_Nav_Help": "Afișați întotdeauna meniul de navigare din partea de sus a ecranului.", "SubstituteOnHand": "Ai un înlocuitor la îndemână.", @@ -369,12 +371,14 @@ "View": "Vizualizare", "View_Recipes": "Vizionare rețete", "Waiting": "Așteptare", + "WaitingTime": "", "Warning": "Atenționare", "Warning_Delete_Supermarket_Category": "Ștergerea unei categorii de supermarketuri va șterge, de asemenea, toate relațiile cu alimentele. Sunteți sigur?", "Website": "Site web", "Wednesday": "", "Week": "Săptămână", "Week_Numbers": "Numerele săptămânii", + "WorkingTime": "", "Year": "An", "YourSpaces": "", "active": "", diff --git a/vue3/src/locales/ru.json b/vue3/src/locales/ru.json index b2e3aa38c..7bbbea812 100644 --- a/vue3/src/locales/ru.json +++ b/vue3/src/locales/ru.json @@ -233,6 +233,7 @@ "Selected": "Выбрать", "SelectedCategories": "", "Servings": "Порции", + "ServingsText": "", "Settings": "Настройки", "Share": "Поделиться", "ShopLater": "", @@ -256,6 +257,7 @@ "Step_Name": "Имя шага", "Step_Type": "Тип шага", "Step_start_time": "Время начала шага", + "Steps": "", "Substitutes": "", "Success": "Успешно", "Sunday": "", @@ -286,11 +288,13 @@ "View": "Просмотр", "View_Recipes": "Просмотр рецепта", "Waiting": "Ожидание", + "WaitingTime": "", "Warning": "Предупреждение", "Warning_Delete_Supermarket_Category": "Удаление категории супермаркета также приведет к удалению всех связей с продуктами. Вы уверены?", "Wednesday": "", "Week": "Неделя", "Week_Numbers": "Номер недели", + "WorkingTime": "", "Year": "Год", "YourSpaces": "", "active": "", diff --git a/vue3/src/locales/sl.json b/vue3/src/locales/sl.json index 6e3a892f6..cd86b454c 100644 --- a/vue3/src/locales/sl.json +++ b/vue3/src/locales/sl.json @@ -223,6 +223,7 @@ "Selected": "Izbrano", "SelectedCategories": "", "Servings": "Porcije", + "ServingsText": "", "Settings": "Nastavitve", "Share": "Deli", "ShopLater": "", @@ -246,6 +247,7 @@ "Step_Name": "Ime koraka", "Step_Type": "Tip koraka", "Step_start_time": "Začetni čas koraka", + "Steps": "", "Substitutes": "", "Success": "Uspešno", "SuccessClipboard": "Nakupovalni listek je kopiran v odložišče", @@ -281,10 +283,12 @@ "View": "Pogled", "View_Recipes": "Preglej recepte", "Waiting": "Čakanje", + "WaitingTime": "", "Warning": "Opozorilo", "Wednesday": "", "Week": "Teden", "Week_Numbers": "Števila tednov", + "WorkingTime": "", "Year": "Leto", "YourSpaces": "", "active": "", diff --git a/vue3/src/locales/sv.json b/vue3/src/locales/sv.json index 6c0a6922b..9e11a9fea 100644 --- a/vue3/src/locales/sv.json +++ b/vue3/src/locales/sv.json @@ -334,6 +334,7 @@ "Selected": "Vald", "SelectedCategories": "", "Servings": "Portioner", + "ServingsText": "", "Settings": "Inställningar", "Share": "Dela", "ShopLater": "", @@ -367,6 +368,7 @@ "Step_Name": "Stegets namn", "Step_Type": "Stegets typ", "Step_start_time": "Steg starttid", + "Steps": "", "Sticky_Nav": "Fastlåst navigering", "Sticky_Nav_Help": "Visa alltid navigeringsmenyn högst upp på skärmen.", "SubstituteOnHand": "Du har ett substitut till hands.", @@ -423,6 +425,7 @@ "View": "Visa", "View_Recipes": "Visa recept", "Waiting": "Väntan", + "WaitingTime": "", "Warning": "Varning", "Warning_Delete_Supermarket_Category": "Om du tar bort en mataffärskategori raderas också alla relationer till livsmedel. Är du säker?", "Website": "Hemsida", @@ -430,6 +433,7 @@ "Week": "Vecka", "Week_Numbers": "Veckonummer", "Welcome": "Välkommen", + "WorkingTime": "", "Year": "År", "YourSpaces": "", "active": "", diff --git a/vue3/src/locales/tr.json b/vue3/src/locales/tr.json index 56c9f68b0..55d962fe8 100644 --- a/vue3/src/locales/tr.json +++ b/vue3/src/locales/tr.json @@ -333,6 +333,7 @@ "Selected": "Seçilen", "SelectedCategories": "", "Servings": "Servis Sayısı", + "ServingsText": "", "Settings": "Ayarlar", "Share": "Paylaş", "ShopLater": "", @@ -366,6 +367,7 @@ "Step_Name": "Adım Adı", "Step_Type": "Adım Tipi", "Step_start_time": "Adım başlangıç zamanı", + "Steps": "", "Sticky_Nav": "Yapışkan Gezinme Çubuğu", "Sticky_Nav_Help": "Gezinme menüsünü her zaman ekranın üst kısmında gösterin.", "SubstituteOnHand": "Elinizde bir yedek var.", @@ -422,6 +424,7 @@ "View": "Görüntüle", "View_Recipes": "Tarifleri Görüntüle", "Waiting": "Bekleniyor", + "WaitingTime": "", "Warning": "Uyarı", "Warning_Delete_Supermarket_Category": "Bir market kategorisinin silinmesi, gıdalarla olan tüm ilişkileri de silecektir. Emin misiniz?", "Website": "Website", @@ -429,6 +432,7 @@ "Week": "Hafta", "Week_Numbers": "Hafta numaraları", "Welcome": "Hoşgeldiniz", + "WorkingTime": "", "Year": "Yıl", "YourSpaces": "", "active": "", diff --git a/vue3/src/locales/uk.json b/vue3/src/locales/uk.json index 9404611d5..33e5b29f5 100644 --- a/vue3/src/locales/uk.json +++ b/vue3/src/locales/uk.json @@ -268,6 +268,7 @@ "Selected": "Вибрано", "SelectedCategories": "", "Servings": "Порції", + "ServingsText": "", "Settings": "Налаштування", "Share": "Поділитися", "ShopLater": "", @@ -292,6 +293,7 @@ "Step_Name": "Ім'я Кроку", "Step_Type": "Тип Кроку", "Step_start_time": "Час початку кроку", + "Steps": "", "SubstituteOnHand": "", "Substitutes": "", "Success": "Успішно", @@ -333,12 +335,14 @@ "View": "", "View_Recipes": "Подивитися Рецепт", "Waiting": "Очікування", + "WaitingTime": "", "Warning": "Увага", "Warning_Delete_Supermarket_Category": "", "Website": "", "Wednesday": "", "Week": "Неділя", "Week_Numbers": "Номер тижня", + "WorkingTime": "", "Year": "Рік", "YourSpaces": "", "active": "", diff --git a/vue3/src/locales/zh_Hans.json b/vue3/src/locales/zh_Hans.json index 15ff664dd..6c25de109 100644 --- a/vue3/src/locales/zh_Hans.json +++ b/vue3/src/locales/zh_Hans.json @@ -328,6 +328,7 @@ "Selected": "选定", "SelectedCategories": "", "Servings": "份量", + "ServingsText": "", "Settings": "设置", "Share": "分享", "ShopLater": "", @@ -360,6 +361,7 @@ "Step_Name": "步骤名", "Step_Type": "步骤类型", "Step_start_time": "步骤开始时间", + "Steps": "", "Sticky_Nav": "粘性导航", "Sticky_Nav_Help": "始终在屏幕顶部显示导航菜单。", "SubstituteOnHand": "你手头有一个替代品。", @@ -413,6 +415,7 @@ "View": "查看", "View_Recipes": "查看食谱", "Waiting": "等待", + "WaitingTime": "", "Warning": "警告", "Warning_Delete_Supermarket_Category": "删除超市类别也会删除与食品的所有关系。 你确定吗?", "Website": "网站", @@ -420,6 +423,7 @@ "Week": "星期", "Week_Numbers": "周数", "Welcome": "欢迎", + "WorkingTime": "", "Year": "年", "YourSpaces": "", "active": "", diff --git a/vue3/src/locales/zh_Hant.json b/vue3/src/locales/zh_Hant.json index b89fc7b02..281670608 100644 --- a/vue3/src/locales/zh_Hant.json +++ b/vue3/src/locales/zh_Hant.json @@ -101,6 +101,7 @@ "Selected": "", "SelectedCategories": "", "Servings": "", + "ServingsText": "", "Settings": "", "Share": "", "ShopLater": "", @@ -114,6 +115,7 @@ "SpaceSettings": "", "Step": "", "Step_start_time": "步驟開始時間", + "Steps": "", "Substitutes": "", "Success": "", "Sunday": "", @@ -134,7 +136,9 @@ "Use_Plural_Unit_Simple": "", "View_Recipes": "", "Waiting": "", + "WaitingTime": "", "Wednesday": "", + "WorkingTime": "", "YourSpaces": "", "active": "", "all_fields_optional": "所有欄位都是可選的,可以留空。", diff --git a/vue3/src/types/Models.ts b/vue3/src/types/Models.ts index ede848560..bc7465887 100644 --- a/vue3/src/types/Models.ts +++ b/vue3/src/types/Models.ts @@ -1,4 +1,4 @@ -import { ApiApi } from "@/openapi"; +import {ApiApi} from "@/openapi"; import {VDataTable} from "vuetify/components"; type VDataTableProps = InstanceType['$props'] @@ -22,7 +22,7 @@ export function getGenericModelFromString(modelName: EditorSupportedModels, t: a * register a given model instance in the supported models list * @param model model to register */ -function registerModel(model: Model){ +function registerModel(model: Model) { SUPPORTED_MODELS.set(model.name.toLowerCase(), model) } @@ -70,7 +70,25 @@ export type Model = { } export let SUPPORTED_MODELS = new Map() -export type EditorSupportedModels = 'UnitConversion' | 'AccessToken' | 'InviteLink' | 'UserSpace' | 'MealType' | 'MealPlan' | 'Property' | 'Food' | 'Supermarket' | 'SupermarketCategory' | 'PropertyType' | 'Automation' | 'Keyword' | 'UserFile' | 'ShoppingListEntry' +export type EditorSupportedModels = + 'UnitConversion' + | 'AccessToken' + | 'InviteLink' + | 'UserSpace' + | 'MealType' + | 'MealPlan' + | 'Property' + | 'Recipe' + | 'Step' + | 'Ingredient' + | 'Food' + | 'Supermarket' + | 'SupermarketCategory' + | 'PropertyType' + | 'Automation' + | 'Keyword' + | 'UserFile' + | 'ShoppingListEntry' export const TFood = { name: 'Food', @@ -135,6 +153,36 @@ export const TRecipe = { } as Model registerModel(TRecipe) +export const TStep = { + name: 'Step', + localizationKey: 'Step', + icon: 'fa-solid fa-list', + + isPaginated: true, + toStringKeys: ['name'], + + tableHeaders: [ + {title: 'Name', key: 'name'}, + {title: 'Actions', key: 'action', align: 'end'}, + ] +} as Model +registerModel(TStep) + +export const TIngredient = { + name: 'Ingredient', + localizationKey: 'Ingredient', + icon: 'fa-solid fa-jar', + + isPaginated: true, + toStringKeys: ['id'], + + tableHeaders: [ + {title: 'Name', key: 'id'}, + {title: 'Actions', key: 'action', align: 'end'}, + ] +} as Model +registerModel(TIngredient) + export const TMealType = { name: 'MealType', localizationKey: 'Meal_Type', @@ -156,7 +204,7 @@ export const TMealPlan = { icon: 'fa-solid fa-calendar-days', isPaginated: true, - toStringKeys: ['title','recipe.name'], + toStringKeys: ['title', 'recipe.name'], tableHeaders: [ {title: 'Title', key: 'title'}, @@ -253,7 +301,7 @@ export const TProperty = { icon: 'fa-solid fa-database', isPaginated: true, - toStringKeys: ['propertyAmount','propertyType.name'], + toStringKeys: ['propertyAmount', 'propertyType.name'], tableHeaders: [ {title: 'Amount', key: 'propertyAmount'}, @@ -269,7 +317,7 @@ export const TUnitConversion = { icon: 'fa-solid fa-exchange-alt', isPaginated: true, - toStringKeys: ['food.name','baseUnit.name','convertedUnit.name'], + toStringKeys: ['food.name', 'baseUnit.name', 'convertedUnit.name'], tableHeaders: [ {title: 'Food', key: 'food.name'},