From be7558f82b22f6d7ecdc0725a9079cbacf8a7b55 Mon Sep 17 00:00:00 2001 From: vabene1111 Date: Fri, 11 Jul 2025 19:59:10 +0200 Subject: [PATCH] allow automation directly from ingredient editor --- .../model_editors/AutomationEditor.vue | 17 +++++++++++++++-- vue3/src/pages/IngredientEditorPage.vue | 10 ++++++++++ vue3/src/vuetify.ts | 1 + 3 files changed, 26 insertions(+), 2 deletions(-) diff --git a/vue3/src/components/model_editors/AutomationEditor.vue b/vue3/src/components/model_editors/AutomationEditor.vue index a62891f3a..08b5c8972 100644 --- a/vue3/src/components/model_editors/AutomationEditor.vue +++ b/vue3/src/components/model_editors/AutomationEditor.vue @@ -22,7 +22,7 @@ - {{$t('Learn_More')}} + {{ $t('Learn_More') }} @@ -47,7 +47,18 @@ const props = defineProps({ }) const emit = defineEmits(['create', 'save', 'delete', 'close', 'changedState']) -const {setupState, deleteObject, saveObject, isUpdate, editingObjName, loading, editingObj, editingObjChanged, modelClass} = useModelEditorFunctions('Automation', emit) +const { + setupState, + deleteObject, + saveObject, + isUpdate, + editingObjName, + loading, + editingObj, + editingObjChanged, + modelClass, + applyItemDefaults +} = useModelEditorFunctions('Automation', emit) // object specific data (for selects/display) @@ -68,6 +79,8 @@ onMounted(() => { setupState(props.item, props.itemId, { newItemFunction: () => { editingObj.value.order = 0 + + applyItemDefaults(props.itemDefaults) }, itemDefaults: props.itemDefaults }) diff --git a/vue3/src/pages/IngredientEditorPage.vue b/vue3/src/pages/IngredientEditorPage.vue index c399111b1..789efa6db 100644 --- a/vue3/src/pages/IngredientEditorPage.vue +++ b/vue3/src/pages/IngredientEditorPage.vue @@ -29,6 +29,12 @@ + + + {{ $t('Automate') }} + + + {{ $t('Delete') }} + + {{ $t('Automate') }} + + {{ $t('Delete') }}