1 | import UserLayout from '@/layouts/UserLayout';
|
2 | import BasicLayout from '@/layouts/BasicLayout';
|
3 |
|
4 | import Dashboard from '@/pages/Dashboard';
|
5 | import UserLogin from '@/pages/UserLogin';
|
6 | import UserRegister from '@/pages/UserRegister';
|
7 | import Holidays from '@/pages/Holidays';
|
8 | import Events from '@/pages/Events';
|
9 | import Activites from '@/pages/Activites';
|
10 | import Departments from '@/pages/Departments';
|
11 | import Employee from '@/pages/Employee';
|
12 | import AddEmployee from '@/pages/AddEmployee';
|
13 | import Analysis from '@/pages/Analysis';
|
14 | import Setting from '@/pages/Setting';
|
15 | import NotFound from '@/pages/NotFound';
|
16 |
|
17 | const 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 |
|
87 | export default routerConfig;
|