add frontend
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
import { createRouter, createWebHistory } from 'vue-router'
|
||||
|
||||
const routes = [
|
||||
{
|
||||
path: '/',
|
||||
redirect: '/ward',
|
||||
},
|
||||
{
|
||||
path: '/ward',
|
||||
name: 'WardDashboard',
|
||||
component: () => import('@/views/WardDashboard.vue'),
|
||||
meta: { title: 'Virtual Ward', layout: 'default' },
|
||||
},
|
||||
{
|
||||
path: '/patients/:encounterId',
|
||||
name: 'PatientDetail',
|
||||
component: () => import('@/views/PatientDetail.vue'),
|
||||
meta: { title: 'Patient Detail', layout: 'default' },
|
||||
},
|
||||
{
|
||||
path: '/alerts',
|
||||
name: 'AlertCenter',
|
||||
component: () => import('@/views/AlertCenter.vue'),
|
||||
meta: { title: 'Alert Center', layout: 'default' },
|
||||
},
|
||||
]
|
||||
|
||||
const router = createRouter({
|
||||
history: createWebHistory(),
|
||||
routes,
|
||||
})
|
||||
|
||||
router.beforeEach((to) => {
|
||||
document.title = `${to.meta.title ?? 'VigilCare'} — VigilCare`
|
||||
})
|
||||
|
||||
export default router
|
||||
Reference in New Issue
Block a user