UNPKG

1.82 kBJavaScriptView Raw
1import UserLayout from '@/layouts/UserLayout';
2import BasicLayout from '@/layouts/BasicLayout';
3
4import Dashboard from '@/pages/Dashboard';
5import UserLogin from '@/pages/UserLogin';
6import UserRegister from '@/pages/UserRegister';
7import Holidays from '@/pages/Holidays';
8import Events from '@/pages/Events';
9import Activites from '@/pages/Activites';
10import Departments from '@/pages/Departments';
11import Employee from '@/pages/Employee';
12import AddEmployee from '@/pages/AddEmployee';
13import Analysis from '@/pages/Analysis';
14import Setting from '@/pages/Setting';
15import NotFound from '@/pages/NotFound';
16
17const routerConfig = [
18 {
19 path: '/user',
20 component: UserLayout,
21 children: [
22 {
23 path: '/login',
24 component: UserLogin,
25 },
26 {
27 path: '/register',
28 component: UserRegister,
29 },
30 {
31 path: '/',
32 redirect: '/user/login',
33 },
34 ],
35 },
36 {
37 path: '/',
38 component: BasicLayout,
39 children: [
40 {
41 path: '/dashboard',
42 component: Dashboard,
43 },
44 {
45 path: '/holidays',
46 component: Holidays,
47 },
48 {
49 path: '/events',
50 component: Events,
51 },
52 {
53 path: '/activites',
54 component: Activites,
55 },
56 {
57 path: '/departments',
58 component: Departments,
59 },
60 {
61 path: '/employee',
62 component: Employee,
63 },
64 {
65 path: '/add/employee',
66 component: AddEmployee,
67 },
68 {
69 path: '/analysis',
70 component: Analysis,
71 },
72 {
73 path: '/setting',
74 component: Setting,
75 },
76 {
77 path: '/',
78 redirect: '/dashboard',
79 },
80 {
81 component: NotFound,
82 },
83 ],
84 },
85];
86
87export default routerConfig;