recipe editor in model editor system basics

This commit is contained in:
vabene1111
2024-12-01 16:02:32 +01:00
parent ab9f9701d8
commit 49c8a5a375
35 changed files with 275 additions and 8 deletions

View File

@@ -35,7 +35,7 @@
v-model="useUserPreferenceStore().deviceSettings.shopping_show_selected_supermarket_only"></v-switch>
</v-list-item>
<v-list-item>
<model-select model="Supermarket" v-model="useUserPreferenceStore().deviceSettings.shopping_selected_supermarket"></model-select>
<model-select model="Supermarket" append-to-body v-model="useUserPreferenceStore().deviceSettings.shopping_selected_supermarket"></model-select>
</v-list-item>
<v-list-item>

View File

@@ -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},

View File

@@ -0,0 +1,94 @@
<template>
<model-editor-base
:loading="loading"
:dialog="dialog"
@save="saveObject"
@delete="deleteObject"
@close="emit('close')"
:is-update="isUpdate()"
:model-class="modelClass"
:object-name="editingObjName()">
<v-tabs v-model="tab" :disabled="loading" grow>
<v-tab value="recipe">{{ $t('Recipe') }}</v-tab>
<v-tab value="steps">{{ $t('Steps') }}</v-tab>
<v-tab value="settings">{{ $t('Settings') }}</v-tab>
</v-tabs>
<v-card-text>
<v-tabs-window v-model="tab">
<v-tabs-window-item value="recipe">
<v-form :disabled="loading">
<v-text-field :label="$t('Name')" v-model="editingObj.name"></v-text-field>
<v-textarea :label="$t('Description')" v-model="editingObj.description" clearable counter="512"></v-textarea>
<v-label>{{ $t('Keywords') }}</v-label>
<ModelSelect mode="tags" v-model="editingObj.keywords" model="Keyword"></ModelSelect>
<v-row>
<v-col cols="12" md="6">
<v-text-field :label="$t('WaitingTime')" v-model="editingObj.waitingTime"></v-text-field>
</v-col>
<v-col cols="12" md="6">
<v-text-field :label="$t('WorkingTime')" v-model="editingObj.workingTime"></v-text-field>
</v-col>
<v-col cols="12" md="6">
<v-text-field :label="$t('Servings')" v-model="editingObj.servings"></v-text-field>
</v-col>
<v-col cols="12" md="6">
<v-text-field :label="$t('ServingsText')" v-model="editingObj.servingsText"></v-text-field>
</v-col>
</v-row>
</v-form>
</v-tabs-window-item>
<v-tabs-window-item value="steps">
<v-form :disabled="loading">
</v-form>
</v-tabs-window-item>
<v-tabs-window-item value="settings">
<v-form :disabled="loading">
</v-form>
</v-tabs-window-item>
</v-tabs-window>
</v-card-text>
</model-editor-base>
</template>
<script setup lang="ts">
import {onMounted, PropType, ref} from "vue";
import {Recipe} from "@/openapi";
import ModelEditorBase from "@/components/model_editors/ModelEditorBase.vue";
import {useModelEditorFunctions} from "@/composables/useModelEditorFunctions";
import {useI18n} from "vue-i18n";
import ModelSelect from "@/components/inputs/ModelSelect.vue";
const {t} = useI18n()
const props = defineProps({
item: {type: {} as PropType<Recipe>, required: false, default: null},
itemId: {type: [Number, String], required: false, default: undefined},
dialog: {type: Boolean, default: false}
})
const emit = defineEmits(['create', 'save', 'delete', 'close'])
const {setupState, deleteObject, saveObject, isUpdate, editingObjName, loading, editingObj, modelClass} = useModelEditorFunctions<Recipe>('Recipe', emit)
// object specific data (for selects/display)
const tab = ref("recipe")
onMounted(() => {
setupState(props.item, props.itemId)
})
</script>
<style scoped>
</style>

View File

@@ -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": "",

View File

@@ -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": "",

View File

@@ -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": "",

View File

@@ -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": "",

View File

@@ -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": "",

View File

@@ -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",

View File

@@ -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": "",

View File

@@ -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",

View File

@@ -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": "",

View File

@@ -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": "",

View File

@@ -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": "",

View File

@@ -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": "",

View File

@@ -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": "",

View File

@@ -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": "Բոլոր տողերը կամավոր են և կարող են մնալ դատարկ։",

View File

@@ -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": "",

View File

@@ -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": "",

View File

@@ -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": "",

View File

@@ -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": "",

View File

@@ -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": "",

View File

@@ -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": "",

View File

@@ -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": "",

View File

@@ -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": "",

View File

@@ -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": "",

View File

@@ -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": "",

View File

@@ -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": "",

View File

@@ -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": "",

View File

@@ -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": "",

View File

@@ -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": "",

View File

@@ -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": "",

View File

@@ -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": "",

View File

@@ -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": "所有欄位都是可選的,可以留空。",

View File

@@ -1,4 +1,4 @@
import { ApiApi } from "@/openapi";
import {ApiApi} from "@/openapi";
import {VDataTable} from "vuetify/components";
type VDataTableProps = InstanceType<typeof VDataTable>['$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<string, Model>()
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'},