refs #4797 feat(workerNotificationManager): use crudModel
gitea/salix-front/pipeline/head This commit looks good Details

This commit is contained in:
Alex Moreno 2023-11-03 15:24:48 +01:00
parent b67f86a307
commit cc13e3935e
2 changed files with 25 additions and 13 deletions

View File

@ -15,7 +15,7 @@ const $props = defineProps({
const entityId = computed(() => $props.id || route.params.id); const entityId = computed(() => $props.id || route.params.id);
onMounted(() => fetch()); onMounted(() => fetch());
onUpdated(() => fetch()); onUpdated(() => console.log('updated'));
const route = useRoute(); const route = useRoute();
const { t } = useI18n(); const { t } = useI18n();
@ -76,7 +76,18 @@ async function toggleNotification(notification) {
} }
</script> </script>
<template> <template>
<QPage> <CrudModel auto-load :url="`NotificationSubscriptions/${entityId}/getList`">
<template #body="{ rows }">
<QList v-for="row in rows" :key="row.id">
<QCard>
<QCardSection horizontal>
{{ row }}
</QCardSection>
</QCard>
</QList>
</template>
</CrudModel>
<!-- <QPage>
<QCard class="q-pa-md"> <QCard class="q-pa-md">
<QList> <QList>
<div <div
@ -138,5 +149,5 @@ async function toggleNotification(notification) {
</div> </div>
</QList> </QList>
</QCard> </QCard>
</QPage> </QPage> -->
</template> </template>

View File

@ -11,7 +11,7 @@ export default {
redirect: { name: 'WorkerMain' }, redirect: { name: 'WorkerMain' },
menus: { menus: {
main: ['WorkerList'], main: ['WorkerList'],
// card: ['WorkerNotificationsManager'], card: ['WorkerNotificationsManager'],
}, },
children: [ children: [
{ {
@ -46,15 +46,16 @@ export default {
}, },
component: () => import('src/pages/Worker/Card/WorkerSummary.vue'), component: () => import('src/pages/Worker/Card/WorkerSummary.vue'),
}, },
// { {
// name: 'WorkerNotificationsManager', name: 'WorkerNotificationsManager',
// path: 'notifications', path: 'notifications',
// meta: { meta: {
// title: 'notifications', title: 'notifications',
// icon: 'notifications', icon: 'notifications',
// }, },
// component: () => import('src/pages/Worker/Card/WorkerNotificationsManager.vue'), component: () =>
// }, import('src/pages/Worker/Card/WorkerNotificationsManager.vue'),
},
], ],
}, },
], ],