flaschengeist-schedule/src/routes/index.ts

63 lines
1.6 KiB
TypeScript
Raw Normal View History

import { FG_Plugin } from '@flaschengeist/types';
import { PERMISSIONS } from '../permissions';
export const innerRoutes: FG_Plugin.MenuRoute[] = [
{
title: 'Dienste',
icon: 'mdi-briefcase',
permissions: ['user'],
route: {
path: 'schedule',
name: 'schedule',
redirect: { name: 'schedule-overview' },
},
children: [
{
title: 'Dienstübersicht',
icon: 'mdi-account-group',
shortcut: true,
route: {
path: 'schedule-overview',
name: 'schedule-overview',
2021-11-22 11:00:17 +00:00
component: () => import('../pages/EventOverview.vue'),
},
},
{
title: 'Dienstverwaltung',
icon: 'mdi-account-details',
shortcut: false,
permissions: [PERMISSIONS.CREATE],
route: {
path: 'schedule-management',
name: 'schedule-management',
2021-11-22 11:00:17 +00:00
component: () => import('../pages/EventManagement.vue'),
props: (route) => ({ date: route.query.date }),
},
},
{
title: 'Dienstanfragen',
icon: 'mdi-account-switch',
shortcut: false,
route: {
path: 'schedule-requests',
name: 'schedule-requests',
2021-11-22 11:00:17 +00:00
component: () => import('../pages/EventRequests.vue'),
},
},
],
},
];
export const privateRoutes: FG_Plugin.NamedRouteRecordRaw[] = [
{
name: 'new-event',
path: 'new-event',
redirect: { name: 'schedule-management' },
},
{
name: 'events-edit',
path: 'schedule/:id/edit',
2021-11-22 11:00:17 +00:00
component: () => import('../pages/EventPage.vue'),
},
];