|
a |
|
b/web-app/client/src/router/index.js |
|
|
1 |
import Vue from 'vue' |
|
|
2 |
import VueRouter from 'vue-router' |
|
|
3 |
import Home from '../views/Home.vue' |
|
|
4 |
import RegisterPatient from '../views/RegisterPatient.vue' |
|
|
5 |
import RegisterDoctor from '../views/RegisterDoctor.vue' |
|
|
6 |
import LoginPatient from '../views/LoginPatient.vue' |
|
|
7 |
import LoginDoctor from '../views/LoginDoctor.vue' |
|
|
8 |
import LoginHospitalAdmin from '../views/LoginHospitalAdmin.vue' |
|
|
9 |
import PatientDashboard from '../views/PatientDashboard.vue' |
|
|
10 |
import DoctorDashboard from '../views/DoctorDashboard.vue' |
|
|
11 |
import HospitalAdminDashboard from '../views/HospitalAdminDashboard' |
|
|
12 |
Vue.use(VueRouter) |
|
|
13 |
|
|
|
14 |
const routes = [ |
|
|
15 |
{ |
|
|
16 |
path: '/', |
|
|
17 |
name: 'Home', |
|
|
18 |
component: Home |
|
|
19 |
}, |
|
|
20 |
{ |
|
|
21 |
path: '/HospitalAdminDashboard', |
|
|
22 |
name: 'HospitalAdminDashboard', |
|
|
23 |
component: HospitalAdminDashboard |
|
|
24 |
}, |
|
|
25 |
{ |
|
|
26 |
path: '/DoctorDashboard', |
|
|
27 |
name: 'DoctorDashboard', |
|
|
28 |
component: DoctorDashboard |
|
|
29 |
}, |
|
|
30 |
{ |
|
|
31 |
path: '/PatientDashboard', |
|
|
32 |
name: 'PatientDashboard', |
|
|
33 |
component: PatientDashboard |
|
|
34 |
}, |
|
|
35 |
{ |
|
|
36 |
path: '/LoginHospitalAdmin', |
|
|
37 |
name: 'LoginHospitalAdmin', |
|
|
38 |
component: LoginHospitalAdmin |
|
|
39 |
}, |
|
|
40 |
{ |
|
|
41 |
path: '/LoginDoctor', |
|
|
42 |
name: 'LoginDoctor', |
|
|
43 |
component: LoginDoctor |
|
|
44 |
}, |
|
|
45 |
{ |
|
|
46 |
path: '/LoginPatient', |
|
|
47 |
name: 'LoginPatient', |
|
|
48 |
component: LoginPatient |
|
|
49 |
}, |
|
|
50 |
{ |
|
|
51 |
path: '/RegisterPatient', |
|
|
52 |
name: 'RegisterPatient', |
|
|
53 |
component: RegisterPatient |
|
|
54 |
}, |
|
|
55 |
{ |
|
|
56 |
path: '/RegisterDoctor', |
|
|
57 |
name: 'RegisterDoctor', |
|
|
58 |
component: RegisterDoctor |
|
|
59 |
}, |
|
|
60 |
{ |
|
|
61 |
path: '/about', |
|
|
62 |
name: 'About', |
|
|
63 |
// route level code-splitting |
|
|
64 |
// this generates a separate chunk (about.[hash].js) for this route |
|
|
65 |
// which is lazy-loaded when the route is visited. |
|
|
66 |
component: () => import(/* webpackChunkName: "about" */ '../views/About.vue') |
|
|
67 |
} |
|
|
68 |
] |
|
|
69 |
|
|
|
70 |
const router = new VueRouter({ |
|
|
71 |
mode: 'history', |
|
|
72 |
base: process.env.BASE_URL, |
|
|
73 |
routes |
|
|
74 |
}) |
|
|
75 |
|
|
|
76 |
export default router |