diff --git a/frontend/src/App.vue b/frontend/src/App.vue index cf394a3..07c543d 100644 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -23,9 +23,7 @@
- - - +
diff --git a/frontend/src/components/Entity.vue b/frontend/src/components/Entity.vue index 198359e..da66ab3 100644 --- a/frontend/src/components/Entity.vue +++ b/frontend/src/components/Entity.vue @@ -103,9 +103,10 @@ export default { if (newValue?.name) { document.title = newValue.name; } - }, - async "$route.params.entitySlug"() { - await this.updateEntity(); + }, + $route: { + handler: "updateEntity", + immediate: true }, } }; diff --git a/frontend/src/components/inputs/ReferencedEntitySelect.vue b/frontend/src/components/inputs/ReferencedEntitySelect.vue index 1aebe1b..2c160b7 100644 --- a/frontend/src/components/inputs/ReferencedEntitySelect.vue +++ b/frontend/src/components/inputs/ReferencedEntitySelect.vue @@ -57,7 +57,8 @@ export default { text: "Apply", callback: this.onSelect }) - ] + ], + currentEntitySlug: this.$route.params.entitySlug, } }, activated() { @@ -78,6 +79,11 @@ export default { if (!this.modelValue) { return; } + if (this.currentEntitySlug !== this.$route.params.entitySlug) { + this.selected.length = 0; + this.currentEntitySlug = this.$route.params.entitySlug; + } + const preselectedIds = this.selected.map(x => x.id); let toQuery = this.modelValue; if (!Array.isArray(this.modelValue)) { diff --git a/frontend/src/router.js b/frontend/src/router.js index 44d81be..e2f48f1 100644 --- a/frontend/src/router.js +++ b/frontend/src/router.js @@ -1,4 +1,4 @@ -import { createRouter, createWebHistory } from 'vue-router' +import {createRouter, createWebHistory} from 'vue-router' import SchemaCreate from "@/components/SchemaCreate.vue" import Changes from "@/components/change_review/Changes"; import Entity from "@/components/Entity.vue" @@ -44,12 +44,12 @@ export const router = createRouter({ } }, { - path: '/review', - component: Changes, - name: 'review-list', - meta: { - title: 'Pending Reviews' - } + path: '/review', + component: Changes, + name: 'review-list', + meta: { + title: 'Pending Reviews' + } }, { path: '/user-management',