github.com/benoitkugler/goacve@v0.0.0-20201217100549-151ce6e55dc8/server/frontend/bv/src/pages/espace_perso/router/index.ts (about)

     1  import Vue from "vue";
     2  import VueRouter, { RouteConfig } from "vue-router";
     3  import Documents from "../views/Documents.vue";
     4  import FichesSanitaires from "../views/FichesSanitaires.vue";
     5  import General from "../views/General.vue";
     6  import Joomeo from "../views/Joomeo.vue";
     7  import Paiements from "../views/Paiements.vue";
     8  import Participants from "../views/Participants.vue";
     9  import Retours from "../views/Retours.vue";
    10  import {
    11    RoutePaiment,
    12    RouteDocuments,
    13    RouteFicheSanitaires,
    14    RouteParticipants,
    15    RouteRetours,
    16    RoutePhotos
    17  } from "./routes";
    18  import { RouteConfigSingleView } from "vue-router/types/router";
    19  
    20  Vue.use(VueRouter);
    21  
    22  interface RouteMeta {
    23    title: string;
    24    tooltip: string;
    25  }
    26  export interface RouteType extends RouteConfigSingleView {
    27    meta: RouteMeta;
    28  }
    29  
    30  export const routes: RouteType[] = [
    31    {
    32      path: "/:key/",
    33      name: "general",
    34      meta: {
    35        title: "Général",
    36        tooltip: "Information général sur l'avancement de votre dossier"
    37      },
    38      component: General
    39    },
    40    {
    41      path: "/:key/participants",
    42      name: RouteParticipants,
    43      meta: {
    44        title: "Participants",
    45        tooltip: "Détails de l'inscription"
    46      },
    47      component: Participants
    48    },
    49    {
    50      path: "/:key/paiement",
    51      name: RoutePaiment,
    52      meta: {
    53        title: "Paiement",
    54        tooltip: "Information sur le réglement des séjours"
    55      },
    56      component: Paiements
    57    },
    58    {
    59      path: "/:key/documents",
    60      name: RouteDocuments,
    61      meta: {
    62        title: "Documents",
    63        tooltip: "Accès aux documents à lire et à remplir pour le séjour"
    64      },
    65      component: Documents
    66    },
    67    {
    68      path: "/:key/fiches_sanitaires",
    69      name: RouteFicheSanitaires,
    70      meta: {
    71        title: "Fiches sanitaires",
    72        tooltip:
    73          "Recueille les informations utiles et évite de vous démunir du carnet de santé."
    74      },
    75      component: FichesSanitaires
    76    },
    77    {
    78      path: "/:key/joomeo",
    79      name: RoutePhotos,
    80      meta: {
    81        title: "Albums photos",
    82        tooltip: "Accès à la plateforme d'hébergement des photos du séjour"
    83      },
    84      component: Joomeo
    85    },
    86    {
    87      path: "/:key/retours",
    88      name: RouteRetours,
    89      meta: {
    90        title: "Votre avis",
    91        tooltip: "Recueille votre avis sur les séjours"
    92      },
    93      component: Retours
    94    }
    95  ];
    96  
    97  const router = new VueRouter({
    98    mode: "history",
    99    base: "/espace_perso/",
   100    routes
   101  });
   102  
   103  export default router;