62 lines
1.7 KiB
TypeScript
62 lines
1.7 KiB
TypeScript
import type { RouteRecordRaw } from 'vue-router';
|
|
import { RouteNames } from './router-constants';
|
|
|
|
const routes: RouteRecordRaw[] = [
|
|
{
|
|
path: '/',
|
|
component: () => import('src/layouts/main-layout.vue'),
|
|
meta: { requiresAuth: true },
|
|
children: [
|
|
{
|
|
path: '',
|
|
name: RouteNames.DASHBOARD,
|
|
component: () => import('src/pages/test-page.vue'),
|
|
},
|
|
{
|
|
path: 'timesheet-approvals',
|
|
name: RouteNames.TIMESHEET_APPROVALS,
|
|
component: () => import('src/modules/timesheet-approval/pages/timesheet-approval.vue'),
|
|
},
|
|
{
|
|
path: 'employees',
|
|
name: RouteNames.EMPLOYEE_LIST,
|
|
component: () => import('src/modules/employee-list/pages/supervisor-crew-page.vue'),
|
|
},
|
|
{
|
|
path: 'timesheet-temp',
|
|
name: RouteNames.TIMESHEET_TEMP,
|
|
component: () => import('src/modules/timesheets/pages/timesheet-details-overview.vue')
|
|
},
|
|
{
|
|
path: 'user/profile',
|
|
name: RouteNames.PROFILE,
|
|
component: () => import('src/modules/profile/pages/profile-container.vue'),
|
|
},
|
|
],
|
|
},
|
|
|
|
{
|
|
path: '/v1/login',
|
|
name: RouteNames.LOGIN,
|
|
component: () => import('src/modules/auth/pages/auth-login.vue'),
|
|
meta: { requiresAuth: false },
|
|
},
|
|
|
|
{
|
|
path: '/login-success',
|
|
name: RouteNames.LOGIN_SUCCESS,
|
|
component: () => import('src/modules/auth/pages/auth-login-popup-success.vue'),
|
|
meta: { requiresAuth: false },
|
|
},
|
|
|
|
// Always leave this as last one,
|
|
// but you can also remove it
|
|
{
|
|
path: '/:catchAll(.*)*',
|
|
component: () => import('src/pages/error-page.vue'),
|
|
meta: { requiresAuth: false },
|
|
},
|
|
];
|
|
|
|
export default routes;
|