feat: implement asignaturas management with dynamic routing and UI updates
This commit is contained in:
@@ -16,10 +16,9 @@ import { Route as AuthenticatedUsuariosRouteImport } from './routes/_authenticat
|
||||
import { Route as AuthenticatedPlanesRouteImport } from './routes/_authenticated/planes'
|
||||
import { Route as AuthenticatedFacultadesRouteImport } from './routes/_authenticated/facultades'
|
||||
import { Route as AuthenticatedDashboardRouteImport } from './routes/_authenticated/dashboard'
|
||||
import { Route as AuthenticatedAsignaturasRouteImport } from './routes/_authenticated/asignaturas'
|
||||
import { Route as AuthenticatedPlanPlanIdRouteImport } from './routes/_authenticated/plan/$planId'
|
||||
import { Route as AuthenticatedFacultadFacultadIdRouteImport } from './routes/_authenticated/facultad/$facultadId'
|
||||
import { Route as AuthenticatedPlanPlanIdModalRouteImport } from './routes/_authenticated/plan/$planId/modal'
|
||||
import { Route as AuthenticatedAsignaturasPlanIdRouteImport } from './routes/_authenticated/asignaturas/$planId'
|
||||
|
||||
const LoginRoute = LoginRouteImport.update({
|
||||
id: '/login',
|
||||
@@ -55,12 +54,6 @@ const AuthenticatedDashboardRoute = AuthenticatedDashboardRouteImport.update({
|
||||
path: '/dashboard',
|
||||
getParentRoute: () => AuthenticatedRoute,
|
||||
} as any)
|
||||
const AuthenticatedAsignaturasRoute =
|
||||
AuthenticatedAsignaturasRouteImport.update({
|
||||
id: '/asignaturas',
|
||||
path: '/asignaturas',
|
||||
getParentRoute: () => AuthenticatedRoute,
|
||||
} as any)
|
||||
const AuthenticatedPlanPlanIdRoute = AuthenticatedPlanPlanIdRouteImport.update({
|
||||
id: '/plan/$planId',
|
||||
path: '/plan/$planId',
|
||||
@@ -72,89 +65,83 @@ const AuthenticatedFacultadFacultadIdRoute =
|
||||
path: '/facultad/$facultadId',
|
||||
getParentRoute: () => AuthenticatedRoute,
|
||||
} as any)
|
||||
const AuthenticatedPlanPlanIdModalRoute =
|
||||
AuthenticatedPlanPlanIdModalRouteImport.update({
|
||||
id: '/modal',
|
||||
path: '/modal',
|
||||
getParentRoute: () => AuthenticatedPlanPlanIdRoute,
|
||||
const AuthenticatedAsignaturasPlanIdRoute =
|
||||
AuthenticatedAsignaturasPlanIdRouteImport.update({
|
||||
id: '/asignaturas/$planId',
|
||||
path: '/asignaturas/$planId',
|
||||
getParentRoute: () => AuthenticatedRoute,
|
||||
} as any)
|
||||
|
||||
export interface FileRoutesByFullPath {
|
||||
'/': typeof IndexRoute
|
||||
'/login': typeof LoginRoute
|
||||
'/asignaturas': typeof AuthenticatedAsignaturasRoute
|
||||
'/dashboard': typeof AuthenticatedDashboardRoute
|
||||
'/facultades': typeof AuthenticatedFacultadesRoute
|
||||
'/planes': typeof AuthenticatedPlanesRoute
|
||||
'/usuarios': typeof AuthenticatedUsuariosRoute
|
||||
'/asignaturas/$planId': typeof AuthenticatedAsignaturasPlanIdRoute
|
||||
'/facultad/$facultadId': typeof AuthenticatedFacultadFacultadIdRoute
|
||||
'/plan/$planId': typeof AuthenticatedPlanPlanIdRouteWithChildren
|
||||
'/plan/$planId/modal': typeof AuthenticatedPlanPlanIdModalRoute
|
||||
'/plan/$planId': typeof AuthenticatedPlanPlanIdRoute
|
||||
}
|
||||
export interface FileRoutesByTo {
|
||||
'/': typeof IndexRoute
|
||||
'/login': typeof LoginRoute
|
||||
'/asignaturas': typeof AuthenticatedAsignaturasRoute
|
||||
'/dashboard': typeof AuthenticatedDashboardRoute
|
||||
'/facultades': typeof AuthenticatedFacultadesRoute
|
||||
'/planes': typeof AuthenticatedPlanesRoute
|
||||
'/usuarios': typeof AuthenticatedUsuariosRoute
|
||||
'/asignaturas/$planId': typeof AuthenticatedAsignaturasPlanIdRoute
|
||||
'/facultad/$facultadId': typeof AuthenticatedFacultadFacultadIdRoute
|
||||
'/plan/$planId': typeof AuthenticatedPlanPlanIdRouteWithChildren
|
||||
'/plan/$planId/modal': typeof AuthenticatedPlanPlanIdModalRoute
|
||||
'/plan/$planId': typeof AuthenticatedPlanPlanIdRoute
|
||||
}
|
||||
export interface FileRoutesById {
|
||||
__root__: typeof rootRouteImport
|
||||
'/': typeof IndexRoute
|
||||
'/_authenticated': typeof AuthenticatedRouteWithChildren
|
||||
'/login': typeof LoginRoute
|
||||
'/_authenticated/asignaturas': typeof AuthenticatedAsignaturasRoute
|
||||
'/_authenticated/dashboard': typeof AuthenticatedDashboardRoute
|
||||
'/_authenticated/facultades': typeof AuthenticatedFacultadesRoute
|
||||
'/_authenticated/planes': typeof AuthenticatedPlanesRoute
|
||||
'/_authenticated/usuarios': typeof AuthenticatedUsuariosRoute
|
||||
'/_authenticated/asignaturas/$planId': typeof AuthenticatedAsignaturasPlanIdRoute
|
||||
'/_authenticated/facultad/$facultadId': typeof AuthenticatedFacultadFacultadIdRoute
|
||||
'/_authenticated/plan/$planId': typeof AuthenticatedPlanPlanIdRouteWithChildren
|
||||
'/_authenticated/plan/$planId/modal': typeof AuthenticatedPlanPlanIdModalRoute
|
||||
'/_authenticated/plan/$planId': typeof AuthenticatedPlanPlanIdRoute
|
||||
}
|
||||
export interface FileRouteTypes {
|
||||
fileRoutesByFullPath: FileRoutesByFullPath
|
||||
fullPaths:
|
||||
| '/'
|
||||
| '/login'
|
||||
| '/asignaturas'
|
||||
| '/dashboard'
|
||||
| '/facultades'
|
||||
| '/planes'
|
||||
| '/usuarios'
|
||||
| '/asignaturas/$planId'
|
||||
| '/facultad/$facultadId'
|
||||
| '/plan/$planId'
|
||||
| '/plan/$planId/modal'
|
||||
fileRoutesByTo: FileRoutesByTo
|
||||
to:
|
||||
| '/'
|
||||
| '/login'
|
||||
| '/asignaturas'
|
||||
| '/dashboard'
|
||||
| '/facultades'
|
||||
| '/planes'
|
||||
| '/usuarios'
|
||||
| '/asignaturas/$planId'
|
||||
| '/facultad/$facultadId'
|
||||
| '/plan/$planId'
|
||||
| '/plan/$planId/modal'
|
||||
id:
|
||||
| '__root__'
|
||||
| '/'
|
||||
| '/_authenticated'
|
||||
| '/login'
|
||||
| '/_authenticated/asignaturas'
|
||||
| '/_authenticated/dashboard'
|
||||
| '/_authenticated/facultades'
|
||||
| '/_authenticated/planes'
|
||||
| '/_authenticated/usuarios'
|
||||
| '/_authenticated/asignaturas/$planId'
|
||||
| '/_authenticated/facultad/$facultadId'
|
||||
| '/_authenticated/plan/$planId'
|
||||
| '/_authenticated/plan/$planId/modal'
|
||||
fileRoutesById: FileRoutesById
|
||||
}
|
||||
export interface RootRouteChildren {
|
||||
@@ -214,13 +201,6 @@ declare module '@tanstack/react-router' {
|
||||
preLoaderRoute: typeof AuthenticatedDashboardRouteImport
|
||||
parentRoute: typeof AuthenticatedRoute
|
||||
}
|
||||
'/_authenticated/asignaturas': {
|
||||
id: '/_authenticated/asignaturas'
|
||||
path: '/asignaturas'
|
||||
fullPath: '/asignaturas'
|
||||
preLoaderRoute: typeof AuthenticatedAsignaturasRouteImport
|
||||
parentRoute: typeof AuthenticatedRoute
|
||||
}
|
||||
'/_authenticated/plan/$planId': {
|
||||
id: '/_authenticated/plan/$planId'
|
||||
path: '/plan/$planId'
|
||||
@@ -235,48 +215,34 @@ declare module '@tanstack/react-router' {
|
||||
preLoaderRoute: typeof AuthenticatedFacultadFacultadIdRouteImport
|
||||
parentRoute: typeof AuthenticatedRoute
|
||||
}
|
||||
'/_authenticated/plan/$planId/modal': {
|
||||
id: '/_authenticated/plan/$planId/modal'
|
||||
path: '/modal'
|
||||
fullPath: '/plan/$planId/modal'
|
||||
preLoaderRoute: typeof AuthenticatedPlanPlanIdModalRouteImport
|
||||
parentRoute: typeof AuthenticatedPlanPlanIdRoute
|
||||
'/_authenticated/asignaturas/$planId': {
|
||||
id: '/_authenticated/asignaturas/$planId'
|
||||
path: '/asignaturas/$planId'
|
||||
fullPath: '/asignaturas/$planId'
|
||||
preLoaderRoute: typeof AuthenticatedAsignaturasPlanIdRouteImport
|
||||
parentRoute: typeof AuthenticatedRoute
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
interface AuthenticatedPlanPlanIdRouteChildren {
|
||||
AuthenticatedPlanPlanIdModalRoute: typeof AuthenticatedPlanPlanIdModalRoute
|
||||
}
|
||||
|
||||
const AuthenticatedPlanPlanIdRouteChildren: AuthenticatedPlanPlanIdRouteChildren =
|
||||
{
|
||||
AuthenticatedPlanPlanIdModalRoute: AuthenticatedPlanPlanIdModalRoute,
|
||||
}
|
||||
|
||||
const AuthenticatedPlanPlanIdRouteWithChildren =
|
||||
AuthenticatedPlanPlanIdRoute._addFileChildren(
|
||||
AuthenticatedPlanPlanIdRouteChildren,
|
||||
)
|
||||
|
||||
interface AuthenticatedRouteChildren {
|
||||
AuthenticatedAsignaturasRoute: typeof AuthenticatedAsignaturasRoute
|
||||
AuthenticatedDashboardRoute: typeof AuthenticatedDashboardRoute
|
||||
AuthenticatedFacultadesRoute: typeof AuthenticatedFacultadesRoute
|
||||
AuthenticatedPlanesRoute: typeof AuthenticatedPlanesRoute
|
||||
AuthenticatedUsuariosRoute: typeof AuthenticatedUsuariosRoute
|
||||
AuthenticatedAsignaturasPlanIdRoute: typeof AuthenticatedAsignaturasPlanIdRoute
|
||||
AuthenticatedFacultadFacultadIdRoute: typeof AuthenticatedFacultadFacultadIdRoute
|
||||
AuthenticatedPlanPlanIdRoute: typeof AuthenticatedPlanPlanIdRouteWithChildren
|
||||
AuthenticatedPlanPlanIdRoute: typeof AuthenticatedPlanPlanIdRoute
|
||||
}
|
||||
|
||||
const AuthenticatedRouteChildren: AuthenticatedRouteChildren = {
|
||||
AuthenticatedAsignaturasRoute: AuthenticatedAsignaturasRoute,
|
||||
AuthenticatedDashboardRoute: AuthenticatedDashboardRoute,
|
||||
AuthenticatedFacultadesRoute: AuthenticatedFacultadesRoute,
|
||||
AuthenticatedPlanesRoute: AuthenticatedPlanesRoute,
|
||||
AuthenticatedUsuariosRoute: AuthenticatedUsuariosRoute,
|
||||
AuthenticatedAsignaturasPlanIdRoute: AuthenticatedAsignaturasPlanIdRoute,
|
||||
AuthenticatedFacultadFacultadIdRoute: AuthenticatedFacultadFacultadIdRoute,
|
||||
AuthenticatedPlanPlanIdRoute: AuthenticatedPlanPlanIdRouteWithChildren,
|
||||
AuthenticatedPlanPlanIdRoute: AuthenticatedPlanPlanIdRoute,
|
||||
}
|
||||
|
||||
const AuthenticatedRouteWithChildren = AuthenticatedRoute._addFileChildren(
|
||||
|
||||
Reference in New Issue
Block a user