From a4a93c5f4a805585a3bcd83e0f12a75e142e4e62 Mon Sep 17 00:00:00 2001 From: vabene1111 Date: Thu, 2 Jan 2025 11:11:13 +0100 Subject: [PATCH] refresh list after merge --- vue3/src/components/dialogs/ModelMergeDialog.vue | 3 +++ vue3/src/pages/ModelListPage.vue | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/vue3/src/components/dialogs/ModelMergeDialog.vue b/vue3/src/components/dialogs/ModelMergeDialog.vue index 3cdbd01e39..ba89927ac0 100644 --- a/vue3/src/components/dialogs/ModelMergeDialog.vue +++ b/vue3/src/components/dialogs/ModelMergeDialog.vue @@ -47,6 +47,8 @@ import {useI18n} from "vue-i18n"; import VClosableCardTitle from "@/components/dialogs/VClosableCardTitle.vue"; import {ApiApi, Automation} from "@/openapi"; +const emit = defineEmits(['change']) + const props = defineProps({ model: {type: String as PropType, required: true}, source: {type: {} as PropType, required: true}, @@ -73,6 +75,7 @@ function mergeModel() { genericModel.merge(props.source, target.value).then(r => { useMessageStore().addPreparedMessage(PreparedMessage.UPDATE_SUCCESS) + emit('change') if (automate.value && target.value != null && Object.hasOwn(props.source, 'name') && Object.hasOwn(target.value, 'name')) { let automation = { diff --git a/vue3/src/pages/ModelListPage.vue b/vue3/src/pages/ModelListPage.vue index d471d93e39..fc2174f2d5 100644 --- a/vue3/src/pages/ModelListPage.vue +++ b/vue3/src/pages/ModelListPage.vue @@ -53,7 +53,7 @@ {{ $t('Merge') }} - +