feat(frontend): settings page added
This commit is contained in:
@@ -19,6 +19,7 @@ import { Route as IndexImport } from './routes/index'
|
||||
import { Route as OcpIndexImport } from './routes/ocp/index'
|
||||
import { Route as OcpLotsImport } from './routes/ocp/lots'
|
||||
import { Route as AuthProfileImport } from './routes/_auth/profile'
|
||||
import { Route as AdminSettingsImport } from './routes/_admin/settings'
|
||||
import { Route as AdminModulesImport } from './routes/_admin/modules'
|
||||
|
||||
// Create/Update Routes
|
||||
@@ -69,6 +70,12 @@ const AuthProfileRoute = AuthProfileImport.update({
|
||||
getParentRoute: () => AuthRoute,
|
||||
} as any)
|
||||
|
||||
const AdminSettingsRoute = AdminSettingsImport.update({
|
||||
id: '/settings',
|
||||
path: '/settings',
|
||||
getParentRoute: () => AdminRoute,
|
||||
} as any)
|
||||
|
||||
const AdminModulesRoute = AdminModulesImport.update({
|
||||
id: '/modules',
|
||||
path: '/modules',
|
||||
@@ -121,6 +128,13 @@ declare module '@tanstack/react-router' {
|
||||
preLoaderRoute: typeof AdminModulesImport
|
||||
parentRoute: typeof AdminImport
|
||||
}
|
||||
'/_admin/settings': {
|
||||
id: '/_admin/settings'
|
||||
path: '/settings'
|
||||
fullPath: '/settings'
|
||||
preLoaderRoute: typeof AdminSettingsImport
|
||||
parentRoute: typeof AdminImport
|
||||
}
|
||||
'/_auth/profile': {
|
||||
id: '/_auth/profile'
|
||||
path: '/profile'
|
||||
@@ -149,10 +163,12 @@ declare module '@tanstack/react-router' {
|
||||
|
||||
interface AdminRouteChildren {
|
||||
AdminModulesRoute: typeof AdminModulesRoute
|
||||
AdminSettingsRoute: typeof AdminSettingsRoute
|
||||
}
|
||||
|
||||
const AdminRouteChildren: AdminRouteChildren = {
|
||||
AdminModulesRoute: AdminModulesRoute,
|
||||
AdminSettingsRoute: AdminSettingsRoute,
|
||||
}
|
||||
|
||||
const AdminRouteWithChildren = AdminRoute._addFileChildren(AdminRouteChildren)
|
||||
@@ -173,6 +189,7 @@ export interface FileRoutesByFullPath {
|
||||
'/about': typeof AboutRoute
|
||||
'/login': typeof LoginRoute
|
||||
'/modules': typeof AdminModulesRoute
|
||||
'/settings': typeof AdminSettingsRoute
|
||||
'/profile': typeof AuthProfileRoute
|
||||
'/ocp/lots': typeof OcpLotsRoute
|
||||
'/ocp': typeof OcpIndexRoute
|
||||
@@ -184,6 +201,7 @@ export interface FileRoutesByTo {
|
||||
'/about': typeof AboutRoute
|
||||
'/login': typeof LoginRoute
|
||||
'/modules': typeof AdminModulesRoute
|
||||
'/settings': typeof AdminSettingsRoute
|
||||
'/profile': typeof AuthProfileRoute
|
||||
'/ocp/lots': typeof OcpLotsRoute
|
||||
'/ocp': typeof OcpIndexRoute
|
||||
@@ -197,6 +215,7 @@ export interface FileRoutesById {
|
||||
'/about': typeof AboutRoute
|
||||
'/login': typeof LoginRoute
|
||||
'/_admin/modules': typeof AdminModulesRoute
|
||||
'/_admin/settings': typeof AdminSettingsRoute
|
||||
'/_auth/profile': typeof AuthProfileRoute
|
||||
'/ocp/lots': typeof OcpLotsRoute
|
||||
'/ocp/': typeof OcpIndexRoute
|
||||
@@ -210,6 +229,7 @@ export interface FileRouteTypes {
|
||||
| '/about'
|
||||
| '/login'
|
||||
| '/modules'
|
||||
| '/settings'
|
||||
| '/profile'
|
||||
| '/ocp/lots'
|
||||
| '/ocp'
|
||||
@@ -220,6 +240,7 @@ export interface FileRouteTypes {
|
||||
| '/about'
|
||||
| '/login'
|
||||
| '/modules'
|
||||
| '/settings'
|
||||
| '/profile'
|
||||
| '/ocp/lots'
|
||||
| '/ocp'
|
||||
@@ -231,6 +252,7 @@ export interface FileRouteTypes {
|
||||
| '/about'
|
||||
| '/login'
|
||||
| '/_admin/modules'
|
||||
| '/_admin/settings'
|
||||
| '/_auth/profile'
|
||||
| '/ocp/lots'
|
||||
| '/ocp/'
|
||||
@@ -282,7 +304,8 @@ export const routeTree = rootRoute
|
||||
"/_admin": {
|
||||
"filePath": "_admin.tsx",
|
||||
"children": [
|
||||
"/_admin/modules"
|
||||
"/_admin/modules",
|
||||
"/_admin/settings"
|
||||
]
|
||||
},
|
||||
"/_auth": {
|
||||
@@ -301,6 +324,10 @@ export const routeTree = rootRoute
|
||||
"filePath": "_admin/modules.tsx",
|
||||
"parent": "/_admin"
|
||||
},
|
||||
"/_admin/settings": {
|
||||
"filePath": "_admin/settings.tsx",
|
||||
"parent": "/_admin"
|
||||
},
|
||||
"/_auth/profile": {
|
||||
"filePath": "_auth/profile.tsx",
|
||||
"parent": "/_auth"
|
||||
|
||||
Reference in New Issue
Block a user