| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114 |
- let sub_routes = [];
- const modules = import.meta.glob("./routes/*.route.js", { eager: true });
- // eslint-disable-next-line no-unused-vars
- Object.entries(modules).forEach(([path, definition]) => {
- sub_routes = sub_routes.concat(definition.default);
- });
- const routes = [
- {
- path: "/",
- component: () => import("layouts/MainLayout.vue"),
- meta: { requireAuth: true },
- children: [
- {
- path: "",
- name: "HomePage",
- component: () => import("src/pages/home/HomePage.vue"),
- meta: {
- requireAuth: true,
- },
- },
- {
- path: "/dashboard",
- name: "DashboardPage",
- component: () => import("pages/dashboard/DashboardPage.vue"),
- meta: {
- title: { value: "Dashboard" },
- requireAuth: true,
- requiredPermission: "dashboard",
- breadcrumbs: [
- {
- name: "DashboardPage",
- title: "Dashboard",
- },
- ],
- },
- },
- {
- path: "/versions",
- name: "SystemVersionsPage",
- component: () => import("pages/version/SystemVersionsPage.vue"),
- meta: {
- title: {
- value: "ui.navigation.versions",
- translate: true,
- },
- description: {
- value: "page.versions.description",
- translate: true,
- },
- requireAuth: true,
- breadcrumbs: [
- {
- name: "SystemVersionsPage",
- title: "ui.navigation.versions",
- translate: true,
- },
- ],
- },
- },
- ...sub_routes,
- ],
- },
- {
- path: "/login",
- component: () => import("layouts/LoginLayout.vue"),
- children: [
- {
- path: "",
- name: "LoginPage",
- component: () => import("pages/login/LoginPage.vue"),
- meta: {
- title: "Login",
- },
- },
- ],
- },
- {
- path: "/forgot-my-password",
- component: () => import("layouts/LoginLayout.vue"),
- meta: { public: true },
- children: [
- {
- path: "",
- name: "ForgotMyPasswordPage",
- component: () => import("pages/ForgotMyPasswordPage.vue"),
- meta: { public: true },
- },
- ],
- },
- {
- path: "/recovery-password",
- component: () => import("layouts/LoginLayout.vue"),
- meta: { public: true },
- children: [
- {
- path: "",
- name: "RecoveryPasswordPage",
- component: () => import("pages/RecoveryPasswordPage.vue"),
- meta: { public: true },
- },
- ],
- },
- // Always leave this as last one,
- // but you can also remove it
- {
- path: "/:catchAll(.*)*",
- component: () => import("pages/ErrorNotFound.vue"),
- },
- ];
- export default routes;
|