From cc13e3935e49ae34cc6067f610985bce99a1a9be Mon Sep 17 00:00:00 2001 From: alexm Date: Fri, 3 Nov 2023 15:24:48 +0100 Subject: [PATCH] refs #4797 feat(workerNotificationManager): use crudModel --- .../Card/WorkerNotificationsManager.vue | 17 ++++++++++++--- src/router/modules/worker.js | 21 ++++++++++--------- 2 files changed, 25 insertions(+), 13 deletions(-) diff --git a/src/pages/Worker/Card/WorkerNotificationsManager.vue b/src/pages/Worker/Card/WorkerNotificationsManager.vue index 13c9b3de2..f83223749 100644 --- a/src/pages/Worker/Card/WorkerNotificationsManager.vue +++ b/src/pages/Worker/Card/WorkerNotificationsManager.vue @@ -15,7 +15,7 @@ const $props = defineProps({ const entityId = computed(() => $props.id || route.params.id); onMounted(() => fetch()); -onUpdated(() => fetch()); +onUpdated(() => console.log('updated')); const route = useRoute(); const { t } = useI18n(); @@ -76,7 +76,18 @@ async function toggleNotification(notification) { } diff --git a/src/router/modules/worker.js b/src/router/modules/worker.js index f79d7f06d..e5ee7c1a2 100644 --- a/src/router/modules/worker.js +++ b/src/router/modules/worker.js @@ -11,7 +11,7 @@ export default { redirect: { name: 'WorkerMain' }, menus: { main: ['WorkerList'], - // card: ['WorkerNotificationsManager'], + card: ['WorkerNotificationsManager'], }, children: [ { @@ -46,15 +46,16 @@ export default { }, component: () => import('src/pages/Worker/Card/WorkerSummary.vue'), }, - // { - // name: 'WorkerNotificationsManager', - // path: 'notifications', - // meta: { - // title: 'notifications', - // icon: 'notifications', - // }, - // component: () => import('src/pages/Worker/Card/WorkerNotificationsManager.vue'), - // }, + { + name: 'WorkerNotificationsManager', + path: 'notifications', + meta: { + title: 'notifications', + icon: 'notifications', + }, + component: () => + import('src/pages/Worker/Card/WorkerNotificationsManager.vue'), + }, ], }, ],