refactor(settings): refactored the admincheck so we can reuse it
This commit is contained in:
@@ -18,7 +18,6 @@ import { Route as AuthImport } from './routes/_auth'
|
||||
import { Route as AdminImport } from './routes/_admin'
|
||||
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 EomEomImport } from './routes/_eom/eom'
|
||||
import { Route as AuthProfileImport } from './routes/_auth/profile'
|
||||
import { Route as AdminSettingsImport } from './routes/_admin/settings'
|
||||
@@ -70,12 +69,6 @@ const OcpIndexRoute = OcpIndexImport.update({
|
||||
getParentRoute: () => rootRoute,
|
||||
} as any)
|
||||
|
||||
const OcpLotsRoute = OcpLotsImport.update({
|
||||
id: '/ocp/lots',
|
||||
path: '/ocp/lots',
|
||||
getParentRoute: () => rootRoute,
|
||||
} as any)
|
||||
|
||||
const EomEomRoute = EomEomImport.update({
|
||||
id: '/eom',
|
||||
path: '/eom',
|
||||
@@ -214,13 +207,6 @@ declare module '@tanstack/react-router' {
|
||||
preLoaderRoute: typeof EomEomImport
|
||||
parentRoute: typeof EomImport
|
||||
}
|
||||
'/ocp/lots': {
|
||||
id: '/ocp/lots'
|
||||
path: '/ocp/lots'
|
||||
fullPath: '/ocp/lots'
|
||||
preLoaderRoute: typeof OcpLotsImport
|
||||
parentRoute: typeof rootRoute
|
||||
}
|
||||
'/ocp/': {
|
||||
id: '/ocp/'
|
||||
path: '/ocp'
|
||||
@@ -307,7 +293,6 @@ export interface FileRoutesByFullPath {
|
||||
'/settings': typeof AdminSettingsRoute
|
||||
'/profile': typeof AuthProfileRoute
|
||||
'/eom': typeof EomEomRoute
|
||||
'/ocp/lots': typeof OcpLotsRoute
|
||||
'/ocp': typeof OcpIndexRoute
|
||||
'/article/$av': typeof EomArticleAvRoute
|
||||
'/materialHelper': typeof logisticsMaterialHelperIndexRoute
|
||||
@@ -325,7 +310,6 @@ export interface FileRoutesByTo {
|
||||
'/settings': typeof AdminSettingsRoute
|
||||
'/profile': typeof AuthProfileRoute
|
||||
'/eom': typeof EomEomRoute
|
||||
'/ocp/lots': typeof OcpLotsRoute
|
||||
'/ocp': typeof OcpIndexRoute
|
||||
'/article/$av': typeof EomArticleAvRoute
|
||||
'/materialHelper': typeof logisticsMaterialHelperIndexRoute
|
||||
@@ -346,7 +330,6 @@ export interface FileRoutesById {
|
||||
'/_admin/settings': typeof AdminSettingsRoute
|
||||
'/_auth/profile': typeof AuthProfileRoute
|
||||
'/_eom/eom': typeof EomEomRoute
|
||||
'/ocp/lots': typeof OcpLotsRoute
|
||||
'/ocp/': typeof OcpIndexRoute
|
||||
'/_eom/article/$av': typeof EomArticleAvRoute
|
||||
'/(logistics)/materialHelper/': typeof logisticsMaterialHelperIndexRoute
|
||||
@@ -366,7 +349,6 @@ export interface FileRouteTypes {
|
||||
| '/settings'
|
||||
| '/profile'
|
||||
| '/eom'
|
||||
| '/ocp/lots'
|
||||
| '/ocp'
|
||||
| '/article/$av'
|
||||
| '/materialHelper'
|
||||
@@ -383,7 +365,6 @@ export interface FileRouteTypes {
|
||||
| '/settings'
|
||||
| '/profile'
|
||||
| '/eom'
|
||||
| '/ocp/lots'
|
||||
| '/ocp'
|
||||
| '/article/$av'
|
||||
| '/materialHelper'
|
||||
@@ -402,7 +383,6 @@ export interface FileRouteTypes {
|
||||
| '/_admin/settings'
|
||||
| '/_auth/profile'
|
||||
| '/_eom/eom'
|
||||
| '/ocp/lots'
|
||||
| '/ocp/'
|
||||
| '/_eom/article/$av'
|
||||
| '/(logistics)/materialHelper/'
|
||||
@@ -418,7 +398,6 @@ export interface RootRouteChildren {
|
||||
EomRoute: typeof EomRouteWithChildren
|
||||
AboutRoute: typeof AboutRoute
|
||||
LoginRoute: typeof LoginRoute
|
||||
OcpLotsRoute: typeof OcpLotsRoute
|
||||
OcpIndexRoute: typeof OcpIndexRoute
|
||||
logisticsMaterialHelperIndexRoute: typeof logisticsMaterialHelperIndexRoute
|
||||
logisticsMaterialHelperConsumptionIndexRoute: typeof logisticsMaterialHelperConsumptionIndexRoute
|
||||
@@ -432,7 +411,6 @@ const rootRouteChildren: RootRouteChildren = {
|
||||
EomRoute: EomRouteWithChildren,
|
||||
AboutRoute: AboutRoute,
|
||||
LoginRoute: LoginRoute,
|
||||
OcpLotsRoute: OcpLotsRoute,
|
||||
OcpIndexRoute: OcpIndexRoute,
|
||||
logisticsMaterialHelperIndexRoute: logisticsMaterialHelperIndexRoute,
|
||||
logisticsMaterialHelperConsumptionIndexRoute:
|
||||
@@ -457,7 +435,6 @@ export const routeTree = rootRoute
|
||||
"/_eom",
|
||||
"/about",
|
||||
"/login",
|
||||
"/ocp/lots",
|
||||
"/ocp/",
|
||||
"/(logistics)/materialHelper/",
|
||||
"/(logistics)/materialHelper/consumption/",
|
||||
@@ -514,9 +491,6 @@ export const routeTree = rootRoute
|
||||
"filePath": "_eom/eom.tsx",
|
||||
"parent": "/_eom"
|
||||
},
|
||||
"/ocp/lots": {
|
||||
"filePath": "ocp/lots.tsx"
|
||||
},
|
||||
"/ocp/": {
|
||||
"filePath": "ocp/index.tsx"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user