Skip to content

Commit

Permalink
refresh list after merge
Browse files Browse the repository at this point in the history
  • Loading branch information
vabene1111 committed Jan 2, 2025
1 parent 05e5072 commit a4a93c5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions vue3/src/components/dialogs/ModelMergeDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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<EditorSupportedModels>, required: true},
source: {type: {} as PropType<EditorSupportedTypes>, required: true},
Expand All @@ -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 = {
Expand Down
2 changes: 1 addition & 1 deletion vue3/src/pages/ModelListPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
</v-list-item>
<v-list-item prepend-icon="fa-solid fa-arrows-to-dot" link>
{{ $t('Merge') }}
<model-merge-dialog :model="model" :source-id="item.id" :source="item" activator="parent"></model-merge-dialog>
<model-merge-dialog :model="model" :source="item" @change="loadItems({page: tablePage, itemsPerPage: useUserPreferenceStore().deviceSettings.general_tableItemsPerPage})"></model-merge-dialog>
</v-list-item>
</v-list>
</v-menu>
Expand Down

0 comments on commit a4a93c5

Please sign in to comment.