index.js 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. import Vue from "vue";
  2. import VueRouter from "vue-router";
  3. import Appointments from "../views/Appointments.vue";
  4. Vue.use(VueRouter);
  5. const routes = [
  6. {
  7. path: "/",
  8. name: "Appointments",
  9. component: Appointments
  10. },
  11. {
  12. path: "/about",
  13. name: "About",
  14. // route level code-splitting
  15. // this generates a separate chunk (about.[hash].js) for this route
  16. // which is lazy-loaded when the route is visited.
  17. component: () =>
  18. import(/* webpackChunkName: "about" */ "../views/About.vue")
  19. },
  20. {
  21. path: "/search",
  22. name: "Search",
  23. component: () => import("../views/Search.vue")
  24. },
  25. {
  26. path: "/intake",
  27. name: "Intake",
  28. component: () => import("../views/Intake.vue")
  29. },
  30. {
  31. path: "/record",
  32. redirect: "/search"
  33. },
  34. {
  35. path: "/record/:id",
  36. name: "Record",
  37. component: () => import("../views/Record.vue"),
  38. props: true
  39. },
  40. {
  41. path: "/record/:id/:entry_id",
  42. name: "Entry",
  43. component: () => import("../views/Record.vue"),
  44. props: true
  45. },
  46. {
  47. path: "/appointment",
  48. redirect: "/"
  49. },
  50. {
  51. path: "/appointment/:id",
  52. name: "Appointment",
  53. component: () => import("../views/Appointment.vue"),
  54. props: true
  55. }
  56. ];
  57. const router = new VueRouter({
  58. // base: "/apps/appointments_alternate",
  59. routes
  60. });
  61. export default router;