"src/src/router" did not exist on "c2fdac336a008588d03fd6328b7cc1249215b036"
index.js 2.31 KB
Newer Older
Yoelvis Gonzalez's avatar
Yoelvis Gonzalez committed
1 2 3
// Imports
import Vue from 'vue'
import Router from 'vue-router'
krlsnvz93's avatar
krlsnvz93 committed
4 5
import Vuelidate from 'vuelidate'
Vue.use(Vuelidate)
Yoelvis Gonzalez's avatar
Yoelvis Gonzalez committed
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38

Vue.use(Router)

const router = new Router({
  mode: 'history',
  base: process.env.BASE_URL,
  scrollBehavior: (to, from, savedPosition) => {
    if (to.hash) return { selector: to.hash }
    if (savedPosition) return savedPosition

    return { x: 0, y: 0 }
  },
  routes: [
    {
      path: '/',
      component: () => import('@/layouts/home/Login.vue'),
      children: [
        {
          path: '',
          name: 'Login',
          component: () => import('@/views/login/Login.vue'),
        },
      ],
    },
    {
      path: '',
      component: () => import('@/layouts/home/Index.vue'),
      children: [
        {
          path: 'home',
          name: 'Control',
          component: () => import('@/views/home/Index.vue'),
        },
krlsnvz93's avatar
krlsnvz93 committed
39
        {
Yoelvis Gonzalez's avatar
Yoelvis Gonzalez committed
40
          path: 'assign-patients',
Yoelvis Gonzalez's avatar
Yoelvis Gonzalez committed
41 42
          name: 'AsignarPacientes',
          component: () => import('@/views/patients/AsignarPacientes.vue'),
krlsnvz93's avatar
krlsnvz93 committed
43
        },
Yoelvis Gonzalez's avatar
Yoelvis Gonzalez committed
44 45 46 47 48
        {
          path: 'admit',
          name: 'AdmitDiff',
          component: () => import('@/views/admit/Index.vue'),
        },
Yoelvis Gonzalez's avatar
Yoelvis Gonzalez committed
49 50 51
        {
          path: 'centers',
          name: 'Centros',
52
          component: () => import('@/views/centers/Index.vue'),
Yoelvis Gonzalez's avatar
Yoelvis Gonzalez committed
53 54 55 56
        },
        {
          path: 'patients',
          name: 'Pacientes',
57 58
          component: () => import('@/views/patients-home/Index.vue'),
        },
Yoelvis Gonzalez's avatar
Yoelvis Gonzalez committed
59 60 61 62 63 64 65 66 67 68
        {
          path: 'patient-form',
          name: 'PatientForm',
          component: () => import('@/views/patients-home/Form.vue'),
        },
        {
          path: 'patient-file',
          name: 'PatientFile',
          component: () => import('@/views/patients-home/File.vue'),
        },
69 70 71 72
        {
          path: 'admit',
          name: 'Confirmar',
          component: () => import('@/views/admit/Index.vue'),
Yoelvis Gonzalez's avatar
Yoelvis Gonzalez committed
73
        },
Yoelvis Gonzalez's avatar
Yoelvis Gonzalez committed
74 75 76 77 78
        {
          path: 'register',
          name: 'Register',
          component: () => import('@/views/admin/Index.vue'),
        },
79 80 81 82 83
        {
          path: 'assignate',
          name: 'Asignar',
          component: () => import('@/views/assign/Index.vue'),
        },
Yoelvis Gonzalez's avatar
Yoelvis Gonzalez committed
84 85 86 87 88 89 90 91 92 93 94
        {
          path: '*',
          name: 'FourOhFour',
          component: () => import('@/views/404/Index.vue'),
        },
      ],
    },
  ],
})

export default router