2025-05-06 06:45:49 +00:00
|
|
|
import type { Routes } from '@/@types/routes'
|
|
|
|
|
import { ROUTES_ENUM } from '@/constants/route.constant'
|
|
|
|
|
import { lazy } from 'react'
|
|
|
|
|
import { adminRoutes } from './adminRoutes'
|
|
|
|
|
import { protectedAuthRoutes, publicAuthRoutes } from './authRoute'
|
|
|
|
|
|
|
|
|
|
export const publicRoutes: Routes = [...publicAuthRoutes]
|
|
|
|
|
|
|
|
|
|
export const protectedRoutes: Routes = [
|
|
|
|
|
{
|
|
|
|
|
key: '/',
|
|
|
|
|
path: '/home',
|
|
|
|
|
component: lazy(() => import('@/views/Home')),
|
|
|
|
|
authority: [],
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
key: '/ai',
|
|
|
|
|
path: '/ai',
|
|
|
|
|
component: lazy(() => import('@/views/ai/Assistant')),
|
|
|
|
|
authority: [],
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
key: '/access-denied',
|
|
|
|
|
path: '/access-denied',
|
|
|
|
|
component: lazy(() => import('@/views/AccessDenied')),
|
|
|
|
|
authority: [],
|
|
|
|
|
},
|
|
|
|
|
...protectedAuthRoutes,
|
|
|
|
|
...adminRoutes,
|
|
|
|
|
{
|
|
|
|
|
key: ROUTES_ENUM.settings,
|
|
|
|
|
path: ROUTES_ENUM.settings,
|
|
|
|
|
component: lazy(() => import('@/views/settings/Settings')),
|
|
|
|
|
authority: [],
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
key: ROUTES_ENUM.list,
|
|
|
|
|
path: ROUTES_ENUM.list,
|
|
|
|
|
component: lazy(() => import('@/views/list/List')),
|
|
|
|
|
authority: [],
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
key: ROUTES_ENUM.formNew,
|
|
|
|
|
path: ROUTES_ENUM.formNew,
|
|
|
|
|
component: lazy(() => import('@/views/form/FormNew')),
|
|
|
|
|
authority: [],
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
key: ROUTES_ENUM.formView,
|
|
|
|
|
path: ROUTES_ENUM.formView,
|
|
|
|
|
component: lazy(() => import('@/views/form/FormView')),
|
|
|
|
|
authority: [],
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
key: ROUTES_ENUM.formEdit,
|
|
|
|
|
path: ROUTES_ENUM.formEdit,
|
|
|
|
|
component: lazy(() => import('@/views/form/FormEdit')),
|
|
|
|
|
authority: [],
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
key: ROUTES_ENUM.chart,
|
|
|
|
|
path: ROUTES_ENUM.chart,
|
|
|
|
|
component: lazy(() => import('@/views/chart/Chart')),
|
|
|
|
|
authority: [],
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
key: ROUTES_ENUM.pivot,
|
|
|
|
|
path: ROUTES_ENUM.pivot,
|
|
|
|
|
component: lazy(() => import('@/views/list/ListPivot')),
|
|
|
|
|
authority: [],
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
key: ROUTES_ENUM.docs.changelog,
|
|
|
|
|
path: ROUTES_ENUM.docs.changelog,
|
|
|
|
|
component: lazy(() => import('@/views/docs/ChangeLog')),
|
|
|
|
|
authority: [],
|
|
|
|
|
},
|
2025-06-26 13:58:53 +00:00
|
|
|
{
|
|
|
|
|
key: ROUTES_ENUM.menumanager,
|
|
|
|
|
path: ROUTES_ENUM.menumanager,
|
|
|
|
|
component: lazy(() => import('@/views/menu/MenuManager')),
|
|
|
|
|
authority: [],
|
|
|
|
|
},
|
2025-05-06 06:45:49 +00:00
|
|
|
]
|