Reorganización de archivos y enlace a wizard de creación de asignatura
This commit is contained in:
@@ -1,31 +1,33 @@
|
|||||||
export const qk = {
|
export const qk = {
|
||||||
auth: ["auth"] as const,
|
auth: ['auth'] as const,
|
||||||
session: () => ["auth", "session"] as const,
|
session: () => ['auth', 'session'] as const,
|
||||||
meProfile: () => ["auth", "meProfile"] as const,
|
meProfile: () => ['auth', 'meProfile'] as const,
|
||||||
|
|
||||||
facultades: () => ["meta", "facultades"] as const,
|
facultades: () => ['meta', 'facultades'] as const,
|
||||||
carreras: (facultadId?: string | null) =>
|
carreras: (facultadId?: string | null) =>
|
||||||
["meta", "carreras", { facultadId: facultadId ?? null }] as const,
|
['meta', 'carreras', { facultadId: facultadId ?? null }] as const,
|
||||||
estructurasPlan: (nivel?: string | null) =>
|
estructurasPlan: (nivel?: string | null) =>
|
||||||
["meta", "estructurasPlan", { nivel: nivel ?? null }] as const,
|
['meta', 'estructurasPlan', { nivel: nivel ?? null }] as const,
|
||||||
estructurasAsignatura: () => ["meta", "estructurasAsignatura"] as const,
|
estructurasAsignatura: () => ['meta', 'estructurasAsignatura'] as const,
|
||||||
estadosPlan: () => ["meta", "estadosPlan"] as const,
|
estadosPlan: () => ['meta', 'estadosPlan'] as const,
|
||||||
|
|
||||||
planesList: (filters: unknown) => ["planes", "list", filters] as const,
|
planesList: (filters: unknown) => ['planes', 'list', filters] as const,
|
||||||
plan: (planId: string) => ["planes", "detail", planId] as const,
|
plan: (planId: string) => ['planes', 'detail', planId] as const,
|
||||||
planLineas: (planId: string) => ["planes", planId, "lineas"] as const,
|
planLineas: (planId: string) => ['planes', planId, 'lineas'] as const,
|
||||||
planAsignaturas: (planId: string) => ["planes", planId, "asignaturas"] as const,
|
planAsignaturas: (planId: string) =>
|
||||||
planHistorial: (planId: string) => ["planes", planId, "historial"] as const,
|
['planes', planId, 'asignaturas'] as const,
|
||||||
planDocumento: (planId: string) => ["planes", planId, "documento"] as const,
|
planHistorial: (planId: string) => ['planes', planId, 'historial'] as const,
|
||||||
|
planDocumento: (planId: string) => ['planes', planId, 'documento'] as const,
|
||||||
|
|
||||||
asignatura: (asignaturaId: string) => ["asignaturas", "detail", asignaturaId] as const,
|
asignatura: (asignaturaId: string) =>
|
||||||
|
['asignaturas', 'detail', asignaturaId] as const,
|
||||||
asignaturaBibliografia: (asignaturaId: string) =>
|
asignaturaBibliografia: (asignaturaId: string) =>
|
||||||
["asignaturas", asignaturaId, "bibliografia"] as const,
|
['asignaturas', asignaturaId, 'bibliografia'] as const,
|
||||||
asignaturaHistorial: (asignaturaId: string) =>
|
asignaturaHistorial: (asignaturaId: string) =>
|
||||||
["asignaturas", asignaturaId, "historial"] as const,
|
['asignaturas', asignaturaId, 'historial'] as const,
|
||||||
asignaturaDocumento: (asignaturaId: string) =>
|
asignaturaDocumento: (asignaturaId: string) =>
|
||||||
["asignaturas", asignaturaId, "documento"] as const,
|
['asignaturas', asignaturaId, 'documento'] as const,
|
||||||
|
|
||||||
tareas: () => ["tareas", "mias"] as const,
|
tareas: () => ['tareas', 'mias'] as const,
|
||||||
notificaciones: () => ["notificaciones", "mias"] as const,
|
notificaciones: () => ['notificaciones', 'mias'] as const,
|
||||||
};
|
}
|
||||||
|
|||||||
@@ -12,6 +12,8 @@ import { WizardHeader } from '@/components/asignaturas/wizard/WizardHeader'
|
|||||||
import { defineStepper } from '@/components/stepper'
|
import { defineStepper } from '@/components/stepper'
|
||||||
import { Dialog, DialogContent } from '@/components/ui/dialog'
|
import { Dialog, DialogContent } from '@/components/ui/dialog'
|
||||||
|
|
||||||
|
const auth_get_current_user_role = () => 'JEFE_CARRERA' as const
|
||||||
|
|
||||||
const Wizard = defineStepper(
|
const Wizard = defineStepper(
|
||||||
{
|
{
|
||||||
id: 'metodo',
|
id: 'metodo',
|
||||||
@@ -24,8 +26,8 @@ const Wizard = defineStepper(
|
|||||||
description: 'Nombre y estructura',
|
description: 'Nombre y estructura',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'configuracion',
|
id: 'detalles',
|
||||||
title: 'Configuración',
|
title: 'Detalles',
|
||||||
description: 'Detalles según modo',
|
description: 'Detalles según modo',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -35,8 +37,6 @@ const Wizard = defineStepper(
|
|||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|
||||||
const auth_get_current_user_role = () => 'JEFE_CARRERA' as const
|
|
||||||
|
|
||||||
export function NuevaAsignaturaModalContainer({ planId }: { planId: string }) {
|
export function NuevaAsignaturaModalContainer({ planId }: { planId: string }) {
|
||||||
const navigate = useNavigate()
|
const navigate = useNavigate()
|
||||||
const role = auth_get_current_user_role()
|
const role = auth_get_current_user_role()
|
||||||
@@ -68,7 +68,15 @@ export function NuevaAsignaturaModalContainer({ planId }: { planId: string }) {
|
|||||||
initialStep={Wizard.utils.getFirst().id}
|
initialStep={Wizard.utils.getFirst().id}
|
||||||
className="flex h-full flex-col"
|
className="flex h-full flex-col"
|
||||||
>
|
>
|
||||||
{({ methods }) => (
|
{({ methods }) => {
|
||||||
|
const currentIndex = Wizard.utils.getIndex(methods.current.id) + 1
|
||||||
|
const totalSteps = Wizard.steps.length
|
||||||
|
const nextStep = Wizard.steps[currentIndex] ?? {
|
||||||
|
title: '',
|
||||||
|
description: '',
|
||||||
|
}
|
||||||
|
|
||||||
|
return (
|
||||||
<>
|
<>
|
||||||
<WizardHeader
|
<WizardHeader
|
||||||
title="Nueva Asignatura"
|
title="Nueva Asignatura"
|
||||||
@@ -88,7 +96,10 @@ export function NuevaAsignaturaModalContainer({ planId }: { planId: string }) {
|
|||||||
)}
|
)}
|
||||||
{Wizard.utils.getIndex(methods.current.id) === 1 && (
|
{Wizard.utils.getIndex(methods.current.id) === 1 && (
|
||||||
<Wizard.Stepper.Panel>
|
<Wizard.Stepper.Panel>
|
||||||
<PasoBasicosForm wizard={wizard} onChange={setWizard} />
|
<PasoBasicosForm
|
||||||
|
wizard={wizard}
|
||||||
|
onChange={setWizard}
|
||||||
|
/>
|
||||||
</Wizard.Stepper.Panel>
|
</Wizard.Stepper.Panel>
|
||||||
)}
|
)}
|
||||||
{Wizard.utils.getIndex(methods.current.id) === 2 && (
|
{Wizard.utils.getIndex(methods.current.id) === 2 && (
|
||||||
@@ -118,7 +129,8 @@ export function NuevaAsignaturaModalContainer({ planId }: { planId: string }) {
|
|||||||
onCreate={() => crearAsignatura(handleClose)}
|
onCreate={() => crearAsignatura(handleClose)}
|
||||||
/>
|
/>
|
||||||
</>
|
</>
|
||||||
)}
|
)
|
||||||
|
}}
|
||||||
</Wizard.Stepper.Provider>
|
</Wizard.Stepper.Provider>
|
||||||
)}
|
)}
|
||||||
</DialogContent>
|
</DialogContent>
|
||||||
|
|||||||
@@ -12,21 +12,19 @@ import { Route as rootRouteImport } from './routes/__root'
|
|||||||
import { Route as LoginRouteImport } from './routes/login'
|
import { Route as LoginRouteImport } from './routes/login'
|
||||||
import { Route as DashboardRouteImport } from './routes/dashboard'
|
import { Route as DashboardRouteImport } from './routes/dashboard'
|
||||||
import { Route as IndexRouteImport } from './routes/index'
|
import { Route as IndexRouteImport } from './routes/index'
|
||||||
|
import { Route as PlanesListaRouteImport } from './routes/planes/_lista'
|
||||||
import { Route as DemoTanstackQueryRouteImport } from './routes/demo/tanstack-query'
|
import { Route as DemoTanstackQueryRouteImport } from './routes/demo/tanstack-query'
|
||||||
import { Route as PlanesListaRouteRouteImport } from './routes/planes/_lista/route'
|
|
||||||
import { Route as PlanesListaNuevoRouteImport } from './routes/planes/_lista/nuevo'
|
import { Route as PlanesListaNuevoRouteImport } from './routes/planes/_lista/nuevo'
|
||||||
import { Route as PlanesPlanIdAsignaturasRouteRouteImport } from './routes/planes/$planId/asignaturas/route'
|
import { Route as PlanesPlanIdDetalleRouteImport } from './routes/planes/$planId/_detalle'
|
||||||
import { Route as PlanesPlanIdDetalleRouteRouteImport } from './routes/planes/$planId/_detalle/route'
|
|
||||||
import { Route as PlanesPlanIdDetalleIndexRouteImport } from './routes/planes/$planId/_detalle/index'
|
import { Route as PlanesPlanIdDetalleIndexRouteImport } from './routes/planes/$planId/_detalle/index'
|
||||||
|
import { Route as PlanesPlanIdAsignaturasAsignaturaIdRouteImport } from './routes/planes/$planId/asignaturas/$asignaturaId'
|
||||||
import { Route as PlanesPlanIdDetalleMapaRouteImport } from './routes/planes/$planId/_detalle/mapa'
|
import { Route as PlanesPlanIdDetalleMapaRouteImport } from './routes/planes/$planId/_detalle/mapa'
|
||||||
import { Route as PlanesPlanIdDetalleIaplanRouteImport } from './routes/planes/$planId/_detalle/iaplan'
|
import { Route as PlanesPlanIdDetalleIaplanRouteImport } from './routes/planes/$planId/_detalle/iaplan'
|
||||||
import { Route as PlanesPlanIdDetalleHistorialRouteImport } from './routes/planes/$planId/_detalle/historial'
|
import { Route as PlanesPlanIdDetalleHistorialRouteImport } from './routes/planes/$planId/_detalle/historial'
|
||||||
import { Route as PlanesPlanIdDetalleFlujoRouteImport } from './routes/planes/$planId/_detalle/flujo'
|
import { Route as PlanesPlanIdDetalleFlujoRouteImport } from './routes/planes/$planId/_detalle/flujo'
|
||||||
import { Route as PlanesPlanIdDetalleDocumentoRouteImport } from './routes/planes/$planId/_detalle/documento'
|
import { Route as PlanesPlanIdDetalleDocumentoRouteImport } from './routes/planes/$planId/_detalle/documento'
|
||||||
import { Route as PlanesPlanIdDetalleAsignaturasRouteImport } from './routes/planes/$planId/_detalle/asignaturas'
|
import { Route as PlanesPlanIdDetalleAsignaturasIndexRouteImport } from './routes/planes/$planId/_detalle/asignaturas/index'
|
||||||
import { Route as PlanesPlanIdAsignaturasListaRouteRouteImport } from './routes/planes/$planId/asignaturas/_lista/route'
|
import { Route as PlanesPlanIdDetalleAsignaturasNuevaRouteImport } from './routes/planes/$planId/_detalle/asignaturas/nueva'
|
||||||
import { Route as PlanesPlanIdAsignaturasAsignaturaIdRouteRouteImport } from './routes/planes/$planId/asignaturas/$asignaturaId/route'
|
|
||||||
import { Route as PlanesPlanIdAsignaturasListaNuevaRouteImport } from './routes/planes/$planId/asignaturas/_lista/nueva'
|
|
||||||
|
|
||||||
const LoginRoute = LoginRouteImport.update({
|
const LoginRoute = LoginRouteImport.update({
|
||||||
id: '/login',
|
id: '/login',
|
||||||
@@ -43,29 +41,22 @@ const IndexRoute = IndexRouteImport.update({
|
|||||||
path: '/',
|
path: '/',
|
||||||
getParentRoute: () => rootRouteImport,
|
getParentRoute: () => rootRouteImport,
|
||||||
} as any)
|
} as any)
|
||||||
|
const PlanesListaRoute = PlanesListaRouteImport.update({
|
||||||
|
id: '/planes/_lista',
|
||||||
|
path: '/planes',
|
||||||
|
getParentRoute: () => rootRouteImport,
|
||||||
|
} as any)
|
||||||
const DemoTanstackQueryRoute = DemoTanstackQueryRouteImport.update({
|
const DemoTanstackQueryRoute = DemoTanstackQueryRouteImport.update({
|
||||||
id: '/demo/tanstack-query',
|
id: '/demo/tanstack-query',
|
||||||
path: '/demo/tanstack-query',
|
path: '/demo/tanstack-query',
|
||||||
getParentRoute: () => rootRouteImport,
|
getParentRoute: () => rootRouteImport,
|
||||||
} as any)
|
} as any)
|
||||||
const PlanesListaRouteRoute = PlanesListaRouteRouteImport.update({
|
|
||||||
id: '/planes/_lista',
|
|
||||||
path: '/planes',
|
|
||||||
getParentRoute: () => rootRouteImport,
|
|
||||||
} as any)
|
|
||||||
const PlanesListaNuevoRoute = PlanesListaNuevoRouteImport.update({
|
const PlanesListaNuevoRoute = PlanesListaNuevoRouteImport.update({
|
||||||
id: '/nuevo',
|
id: '/nuevo',
|
||||||
path: '/nuevo',
|
path: '/nuevo',
|
||||||
getParentRoute: () => PlanesListaRouteRoute,
|
getParentRoute: () => PlanesListaRoute,
|
||||||
} as any)
|
} as any)
|
||||||
const PlanesPlanIdAsignaturasRouteRoute =
|
const PlanesPlanIdDetalleRoute = PlanesPlanIdDetalleRouteImport.update({
|
||||||
PlanesPlanIdAsignaturasRouteRouteImport.update({
|
|
||||||
id: '/planes/$planId/asignaturas',
|
|
||||||
path: '/planes/$planId/asignaturas',
|
|
||||||
getParentRoute: () => rootRouteImport,
|
|
||||||
} as any)
|
|
||||||
const PlanesPlanIdDetalleRouteRoute =
|
|
||||||
PlanesPlanIdDetalleRouteRouteImport.update({
|
|
||||||
id: '/planes/$planId/_detalle',
|
id: '/planes/$planId/_detalle',
|
||||||
path: '/planes/$planId',
|
path: '/planes/$planId',
|
||||||
getParentRoute: () => rootRouteImport,
|
getParentRoute: () => rootRouteImport,
|
||||||
@@ -74,116 +65,109 @@ const PlanesPlanIdDetalleIndexRoute =
|
|||||||
PlanesPlanIdDetalleIndexRouteImport.update({
|
PlanesPlanIdDetalleIndexRouteImport.update({
|
||||||
id: '/',
|
id: '/',
|
||||||
path: '/',
|
path: '/',
|
||||||
getParentRoute: () => PlanesPlanIdDetalleRouteRoute,
|
getParentRoute: () => PlanesPlanIdDetalleRoute,
|
||||||
|
} as any)
|
||||||
|
const PlanesPlanIdAsignaturasAsignaturaIdRoute =
|
||||||
|
PlanesPlanIdAsignaturasAsignaturaIdRouteImport.update({
|
||||||
|
id: '/planes/$planId/asignaturas/$asignaturaId',
|
||||||
|
path: '/planes/$planId/asignaturas/$asignaturaId',
|
||||||
|
getParentRoute: () => rootRouteImport,
|
||||||
} as any)
|
} as any)
|
||||||
const PlanesPlanIdDetalleMapaRoute = PlanesPlanIdDetalleMapaRouteImport.update({
|
const PlanesPlanIdDetalleMapaRoute = PlanesPlanIdDetalleMapaRouteImport.update({
|
||||||
id: '/mapa',
|
id: '/mapa',
|
||||||
path: '/mapa',
|
path: '/mapa',
|
||||||
getParentRoute: () => PlanesPlanIdDetalleRouteRoute,
|
getParentRoute: () => PlanesPlanIdDetalleRoute,
|
||||||
} as any)
|
} as any)
|
||||||
const PlanesPlanIdDetalleIaplanRoute =
|
const PlanesPlanIdDetalleIaplanRoute =
|
||||||
PlanesPlanIdDetalleIaplanRouteImport.update({
|
PlanesPlanIdDetalleIaplanRouteImport.update({
|
||||||
id: '/iaplan',
|
id: '/iaplan',
|
||||||
path: '/iaplan',
|
path: '/iaplan',
|
||||||
getParentRoute: () => PlanesPlanIdDetalleRouteRoute,
|
getParentRoute: () => PlanesPlanIdDetalleRoute,
|
||||||
} as any)
|
} as any)
|
||||||
const PlanesPlanIdDetalleHistorialRoute =
|
const PlanesPlanIdDetalleHistorialRoute =
|
||||||
PlanesPlanIdDetalleHistorialRouteImport.update({
|
PlanesPlanIdDetalleHistorialRouteImport.update({
|
||||||
id: '/historial',
|
id: '/historial',
|
||||||
path: '/historial',
|
path: '/historial',
|
||||||
getParentRoute: () => PlanesPlanIdDetalleRouteRoute,
|
getParentRoute: () => PlanesPlanIdDetalleRoute,
|
||||||
} as any)
|
} as any)
|
||||||
const PlanesPlanIdDetalleFlujoRoute =
|
const PlanesPlanIdDetalleFlujoRoute =
|
||||||
PlanesPlanIdDetalleFlujoRouteImport.update({
|
PlanesPlanIdDetalleFlujoRouteImport.update({
|
||||||
id: '/flujo',
|
id: '/flujo',
|
||||||
path: '/flujo',
|
path: '/flujo',
|
||||||
getParentRoute: () => PlanesPlanIdDetalleRouteRoute,
|
getParentRoute: () => PlanesPlanIdDetalleRoute,
|
||||||
} as any)
|
} as any)
|
||||||
const PlanesPlanIdDetalleDocumentoRoute =
|
const PlanesPlanIdDetalleDocumentoRoute =
|
||||||
PlanesPlanIdDetalleDocumentoRouteImport.update({
|
PlanesPlanIdDetalleDocumentoRouteImport.update({
|
||||||
id: '/documento',
|
id: '/documento',
|
||||||
path: '/documento',
|
path: '/documento',
|
||||||
getParentRoute: () => PlanesPlanIdDetalleRouteRoute,
|
getParentRoute: () => PlanesPlanIdDetalleRoute,
|
||||||
} as any)
|
} as any)
|
||||||
const PlanesPlanIdDetalleAsignaturasRoute =
|
const PlanesPlanIdDetalleAsignaturasIndexRoute =
|
||||||
PlanesPlanIdDetalleAsignaturasRouteImport.update({
|
PlanesPlanIdDetalleAsignaturasIndexRouteImport.update({
|
||||||
id: '/asignaturas',
|
id: '/asignaturas/',
|
||||||
path: '/asignaturas',
|
path: '/asignaturas/',
|
||||||
getParentRoute: () => PlanesPlanIdDetalleRouteRoute,
|
getParentRoute: () => PlanesPlanIdDetalleRoute,
|
||||||
} as any)
|
} as any)
|
||||||
const PlanesPlanIdAsignaturasListaRouteRoute =
|
const PlanesPlanIdDetalleAsignaturasNuevaRoute =
|
||||||
PlanesPlanIdAsignaturasListaRouteRouteImport.update({
|
PlanesPlanIdDetalleAsignaturasNuevaRouteImport.update({
|
||||||
id: '/_lista',
|
id: '/asignaturas/nueva',
|
||||||
getParentRoute: () => PlanesPlanIdAsignaturasRouteRoute,
|
path: '/asignaturas/nueva',
|
||||||
} as any)
|
getParentRoute: () => PlanesPlanIdDetalleRoute,
|
||||||
const PlanesPlanIdAsignaturasAsignaturaIdRouteRoute =
|
|
||||||
PlanesPlanIdAsignaturasAsignaturaIdRouteRouteImport.update({
|
|
||||||
id: '/$asignaturaId',
|
|
||||||
path: '/$asignaturaId',
|
|
||||||
getParentRoute: () => PlanesPlanIdAsignaturasRouteRoute,
|
|
||||||
} as any)
|
|
||||||
const PlanesPlanIdAsignaturasListaNuevaRoute =
|
|
||||||
PlanesPlanIdAsignaturasListaNuevaRouteImport.update({
|
|
||||||
id: '/nueva',
|
|
||||||
path: '/nueva',
|
|
||||||
getParentRoute: () => PlanesPlanIdAsignaturasListaRouteRoute,
|
|
||||||
} as any)
|
} as any)
|
||||||
|
|
||||||
export interface FileRoutesByFullPath {
|
export interface FileRoutesByFullPath {
|
||||||
'/': typeof IndexRoute
|
'/': typeof IndexRoute
|
||||||
'/dashboard': typeof DashboardRoute
|
'/dashboard': typeof DashboardRoute
|
||||||
'/login': typeof LoginRoute
|
'/login': typeof LoginRoute
|
||||||
'/planes': typeof PlanesListaRouteRouteWithChildren
|
|
||||||
'/demo/tanstack-query': typeof DemoTanstackQueryRoute
|
'/demo/tanstack-query': typeof DemoTanstackQueryRoute
|
||||||
'/planes/$planId': typeof PlanesPlanIdDetalleRouteRouteWithChildren
|
'/planes': typeof PlanesListaRouteWithChildren
|
||||||
'/planes/$planId/asignaturas': typeof PlanesPlanIdDetalleAsignaturasRoute
|
'/planes/$planId': typeof PlanesPlanIdDetalleRouteWithChildren
|
||||||
'/planes/nuevo': typeof PlanesListaNuevoRoute
|
'/planes/nuevo': typeof PlanesListaNuevoRoute
|
||||||
'/planes/$planId/asignaturas/$asignaturaId': typeof PlanesPlanIdAsignaturasAsignaturaIdRouteRoute
|
|
||||||
'/planes/$planId/documento': typeof PlanesPlanIdDetalleDocumentoRoute
|
'/planes/$planId/documento': typeof PlanesPlanIdDetalleDocumentoRoute
|
||||||
'/planes/$planId/flujo': typeof PlanesPlanIdDetalleFlujoRoute
|
'/planes/$planId/flujo': typeof PlanesPlanIdDetalleFlujoRoute
|
||||||
'/planes/$planId/historial': typeof PlanesPlanIdDetalleHistorialRoute
|
'/planes/$planId/historial': typeof PlanesPlanIdDetalleHistorialRoute
|
||||||
'/planes/$planId/iaplan': typeof PlanesPlanIdDetalleIaplanRoute
|
'/planes/$planId/iaplan': typeof PlanesPlanIdDetalleIaplanRoute
|
||||||
'/planes/$planId/mapa': typeof PlanesPlanIdDetalleMapaRoute
|
'/planes/$planId/mapa': typeof PlanesPlanIdDetalleMapaRoute
|
||||||
|
'/planes/$planId/asignaturas/$asignaturaId': typeof PlanesPlanIdAsignaturasAsignaturaIdRoute
|
||||||
'/planes/$planId/': typeof PlanesPlanIdDetalleIndexRoute
|
'/planes/$planId/': typeof PlanesPlanIdDetalleIndexRoute
|
||||||
'/planes/$planId/asignaturas/nueva': typeof PlanesPlanIdAsignaturasListaNuevaRoute
|
'/planes/$planId/asignaturas/nueva': typeof PlanesPlanIdDetalleAsignaturasNuevaRoute
|
||||||
|
'/planes/$planId/asignaturas/': typeof PlanesPlanIdDetalleAsignaturasIndexRoute
|
||||||
}
|
}
|
||||||
export interface FileRoutesByTo {
|
export interface FileRoutesByTo {
|
||||||
'/': typeof IndexRoute
|
'/': typeof IndexRoute
|
||||||
'/dashboard': typeof DashboardRoute
|
'/dashboard': typeof DashboardRoute
|
||||||
'/login': typeof LoginRoute
|
'/login': typeof LoginRoute
|
||||||
'/planes': typeof PlanesListaRouteRouteWithChildren
|
|
||||||
'/demo/tanstack-query': typeof DemoTanstackQueryRoute
|
'/demo/tanstack-query': typeof DemoTanstackQueryRoute
|
||||||
'/planes/$planId/asignaturas': typeof PlanesPlanIdDetalleAsignaturasRoute
|
'/planes': typeof PlanesListaRouteWithChildren
|
||||||
'/planes/nuevo': typeof PlanesListaNuevoRoute
|
'/planes/nuevo': typeof PlanesListaNuevoRoute
|
||||||
'/planes/$planId/asignaturas/$asignaturaId': typeof PlanesPlanIdAsignaturasAsignaturaIdRouteRoute
|
|
||||||
'/planes/$planId/documento': typeof PlanesPlanIdDetalleDocumentoRoute
|
'/planes/$planId/documento': typeof PlanesPlanIdDetalleDocumentoRoute
|
||||||
'/planes/$planId/flujo': typeof PlanesPlanIdDetalleFlujoRoute
|
'/planes/$planId/flujo': typeof PlanesPlanIdDetalleFlujoRoute
|
||||||
'/planes/$planId/historial': typeof PlanesPlanIdDetalleHistorialRoute
|
'/planes/$planId/historial': typeof PlanesPlanIdDetalleHistorialRoute
|
||||||
'/planes/$planId/iaplan': typeof PlanesPlanIdDetalleIaplanRoute
|
'/planes/$planId/iaplan': typeof PlanesPlanIdDetalleIaplanRoute
|
||||||
'/planes/$planId/mapa': typeof PlanesPlanIdDetalleMapaRoute
|
'/planes/$planId/mapa': typeof PlanesPlanIdDetalleMapaRoute
|
||||||
|
'/planes/$planId/asignaturas/$asignaturaId': typeof PlanesPlanIdAsignaturasAsignaturaIdRoute
|
||||||
'/planes/$planId': typeof PlanesPlanIdDetalleIndexRoute
|
'/planes/$planId': typeof PlanesPlanIdDetalleIndexRoute
|
||||||
'/planes/$planId/asignaturas/nueva': typeof PlanesPlanIdAsignaturasListaNuevaRoute
|
'/planes/$planId/asignaturas/nueva': typeof PlanesPlanIdDetalleAsignaturasNuevaRoute
|
||||||
|
'/planes/$planId/asignaturas': typeof PlanesPlanIdDetalleAsignaturasIndexRoute
|
||||||
}
|
}
|
||||||
export interface FileRoutesById {
|
export interface FileRoutesById {
|
||||||
__root__: typeof rootRouteImport
|
__root__: typeof rootRouteImport
|
||||||
'/': typeof IndexRoute
|
'/': typeof IndexRoute
|
||||||
'/dashboard': typeof DashboardRoute
|
'/dashboard': typeof DashboardRoute
|
||||||
'/login': typeof LoginRoute
|
'/login': typeof LoginRoute
|
||||||
'/planes/_lista': typeof PlanesListaRouteRouteWithChildren
|
|
||||||
'/demo/tanstack-query': typeof DemoTanstackQueryRoute
|
'/demo/tanstack-query': typeof DemoTanstackQueryRoute
|
||||||
'/planes/$planId/_detalle': typeof PlanesPlanIdDetalleRouteRouteWithChildren
|
'/planes/_lista': typeof PlanesListaRouteWithChildren
|
||||||
'/planes/$planId/asignaturas': typeof PlanesPlanIdAsignaturasRouteRouteWithChildren
|
'/planes/$planId/_detalle': typeof PlanesPlanIdDetalleRouteWithChildren
|
||||||
'/planes/_lista/nuevo': typeof PlanesListaNuevoRoute
|
'/planes/_lista/nuevo': typeof PlanesListaNuevoRoute
|
||||||
'/planes/$planId/asignaturas/$asignaturaId': typeof PlanesPlanIdAsignaturasAsignaturaIdRouteRoute
|
|
||||||
'/planes/$planId/asignaturas/_lista': typeof PlanesPlanIdAsignaturasListaRouteRouteWithChildren
|
|
||||||
'/planes/$planId/_detalle/asignaturas': typeof PlanesPlanIdDetalleAsignaturasRoute
|
|
||||||
'/planes/$planId/_detalle/documento': typeof PlanesPlanIdDetalleDocumentoRoute
|
'/planes/$planId/_detalle/documento': typeof PlanesPlanIdDetalleDocumentoRoute
|
||||||
'/planes/$planId/_detalle/flujo': typeof PlanesPlanIdDetalleFlujoRoute
|
'/planes/$planId/_detalle/flujo': typeof PlanesPlanIdDetalleFlujoRoute
|
||||||
'/planes/$planId/_detalle/historial': typeof PlanesPlanIdDetalleHistorialRoute
|
'/planes/$planId/_detalle/historial': typeof PlanesPlanIdDetalleHistorialRoute
|
||||||
'/planes/$planId/_detalle/iaplan': typeof PlanesPlanIdDetalleIaplanRoute
|
'/planes/$planId/_detalle/iaplan': typeof PlanesPlanIdDetalleIaplanRoute
|
||||||
'/planes/$planId/_detalle/mapa': typeof PlanesPlanIdDetalleMapaRoute
|
'/planes/$planId/_detalle/mapa': typeof PlanesPlanIdDetalleMapaRoute
|
||||||
|
'/planes/$planId/asignaturas/$asignaturaId': typeof PlanesPlanIdAsignaturasAsignaturaIdRoute
|
||||||
'/planes/$planId/_detalle/': typeof PlanesPlanIdDetalleIndexRoute
|
'/planes/$planId/_detalle/': typeof PlanesPlanIdDetalleIndexRoute
|
||||||
'/planes/$planId/asignaturas/_lista/nueva': typeof PlanesPlanIdAsignaturasListaNuevaRoute
|
'/planes/$planId/_detalle/asignaturas/nueva': typeof PlanesPlanIdDetalleAsignaturasNuevaRoute
|
||||||
|
'/planes/$planId/_detalle/asignaturas/': typeof PlanesPlanIdDetalleAsignaturasIndexRoute
|
||||||
}
|
}
|
||||||
export interface FileRouteTypes {
|
export interface FileRouteTypes {
|
||||||
fileRoutesByFullPath: FileRoutesByFullPath
|
fileRoutesByFullPath: FileRoutesByFullPath
|
||||||
@@ -191,66 +175,64 @@ export interface FileRouteTypes {
|
|||||||
| '/'
|
| '/'
|
||||||
| '/dashboard'
|
| '/dashboard'
|
||||||
| '/login'
|
| '/login'
|
||||||
| '/planes'
|
|
||||||
| '/demo/tanstack-query'
|
| '/demo/tanstack-query'
|
||||||
|
| '/planes'
|
||||||
| '/planes/$planId'
|
| '/planes/$planId'
|
||||||
| '/planes/$planId/asignaturas'
|
|
||||||
| '/planes/nuevo'
|
| '/planes/nuevo'
|
||||||
| '/planes/$planId/asignaturas/$asignaturaId'
|
|
||||||
| '/planes/$planId/documento'
|
| '/planes/$planId/documento'
|
||||||
| '/planes/$planId/flujo'
|
| '/planes/$planId/flujo'
|
||||||
| '/planes/$planId/historial'
|
| '/planes/$planId/historial'
|
||||||
| '/planes/$planId/iaplan'
|
| '/planes/$planId/iaplan'
|
||||||
| '/planes/$planId/mapa'
|
| '/planes/$planId/mapa'
|
||||||
|
| '/planes/$planId/asignaturas/$asignaturaId'
|
||||||
| '/planes/$planId/'
|
| '/planes/$planId/'
|
||||||
| '/planes/$planId/asignaturas/nueva'
|
| '/planes/$planId/asignaturas/nueva'
|
||||||
|
| '/planes/$planId/asignaturas/'
|
||||||
fileRoutesByTo: FileRoutesByTo
|
fileRoutesByTo: FileRoutesByTo
|
||||||
to:
|
to:
|
||||||
| '/'
|
| '/'
|
||||||
| '/dashboard'
|
| '/dashboard'
|
||||||
| '/login'
|
| '/login'
|
||||||
| '/planes'
|
|
||||||
| '/demo/tanstack-query'
|
| '/demo/tanstack-query'
|
||||||
| '/planes/$planId/asignaturas'
|
| '/planes'
|
||||||
| '/planes/nuevo'
|
| '/planes/nuevo'
|
||||||
| '/planes/$planId/asignaturas/$asignaturaId'
|
|
||||||
| '/planes/$planId/documento'
|
| '/planes/$planId/documento'
|
||||||
| '/planes/$planId/flujo'
|
| '/planes/$planId/flujo'
|
||||||
| '/planes/$planId/historial'
|
| '/planes/$planId/historial'
|
||||||
| '/planes/$planId/iaplan'
|
| '/planes/$planId/iaplan'
|
||||||
| '/planes/$planId/mapa'
|
| '/planes/$planId/mapa'
|
||||||
|
| '/planes/$planId/asignaturas/$asignaturaId'
|
||||||
| '/planes/$planId'
|
| '/planes/$planId'
|
||||||
| '/planes/$planId/asignaturas/nueva'
|
| '/planes/$planId/asignaturas/nueva'
|
||||||
|
| '/planes/$planId/asignaturas'
|
||||||
id:
|
id:
|
||||||
| '__root__'
|
| '__root__'
|
||||||
| '/'
|
| '/'
|
||||||
| '/dashboard'
|
| '/dashboard'
|
||||||
| '/login'
|
| '/login'
|
||||||
| '/planes/_lista'
|
|
||||||
| '/demo/tanstack-query'
|
| '/demo/tanstack-query'
|
||||||
|
| '/planes/_lista'
|
||||||
| '/planes/$planId/_detalle'
|
| '/planes/$planId/_detalle'
|
||||||
| '/planes/$planId/asignaturas'
|
|
||||||
| '/planes/_lista/nuevo'
|
| '/planes/_lista/nuevo'
|
||||||
| '/planes/$planId/asignaturas/$asignaturaId'
|
|
||||||
| '/planes/$planId/asignaturas/_lista'
|
|
||||||
| '/planes/$planId/_detalle/asignaturas'
|
|
||||||
| '/planes/$planId/_detalle/documento'
|
| '/planes/$planId/_detalle/documento'
|
||||||
| '/planes/$planId/_detalle/flujo'
|
| '/planes/$planId/_detalle/flujo'
|
||||||
| '/planes/$planId/_detalle/historial'
|
| '/planes/$planId/_detalle/historial'
|
||||||
| '/planes/$planId/_detalle/iaplan'
|
| '/planes/$planId/_detalle/iaplan'
|
||||||
| '/planes/$planId/_detalle/mapa'
|
| '/planes/$planId/_detalle/mapa'
|
||||||
|
| '/planes/$planId/asignaturas/$asignaturaId'
|
||||||
| '/planes/$planId/_detalle/'
|
| '/planes/$planId/_detalle/'
|
||||||
| '/planes/$planId/asignaturas/_lista/nueva'
|
| '/planes/$planId/_detalle/asignaturas/nueva'
|
||||||
|
| '/planes/$planId/_detalle/asignaturas/'
|
||||||
fileRoutesById: FileRoutesById
|
fileRoutesById: FileRoutesById
|
||||||
}
|
}
|
||||||
export interface RootRouteChildren {
|
export interface RootRouteChildren {
|
||||||
IndexRoute: typeof IndexRoute
|
IndexRoute: typeof IndexRoute
|
||||||
DashboardRoute: typeof DashboardRoute
|
DashboardRoute: typeof DashboardRoute
|
||||||
LoginRoute: typeof LoginRoute
|
LoginRoute: typeof LoginRoute
|
||||||
PlanesListaRouteRoute: typeof PlanesListaRouteRouteWithChildren
|
|
||||||
DemoTanstackQueryRoute: typeof DemoTanstackQueryRoute
|
DemoTanstackQueryRoute: typeof DemoTanstackQueryRoute
|
||||||
PlanesPlanIdDetalleRouteRoute: typeof PlanesPlanIdDetalleRouteRouteWithChildren
|
PlanesListaRoute: typeof PlanesListaRouteWithChildren
|
||||||
PlanesPlanIdAsignaturasRouteRoute: typeof PlanesPlanIdAsignaturasRouteRouteWithChildren
|
PlanesPlanIdDetalleRoute: typeof PlanesPlanIdDetalleRouteWithChildren
|
||||||
|
PlanesPlanIdAsignaturasAsignaturaIdRoute: typeof PlanesPlanIdAsignaturasAsignaturaIdRoute
|
||||||
}
|
}
|
||||||
|
|
||||||
declare module '@tanstack/react-router' {
|
declare module '@tanstack/react-router' {
|
||||||
@@ -276,6 +258,13 @@ declare module '@tanstack/react-router' {
|
|||||||
preLoaderRoute: typeof IndexRouteImport
|
preLoaderRoute: typeof IndexRouteImport
|
||||||
parentRoute: typeof rootRouteImport
|
parentRoute: typeof rootRouteImport
|
||||||
}
|
}
|
||||||
|
'/planes/_lista': {
|
||||||
|
id: '/planes/_lista'
|
||||||
|
path: '/planes'
|
||||||
|
fullPath: '/planes'
|
||||||
|
preLoaderRoute: typeof PlanesListaRouteImport
|
||||||
|
parentRoute: typeof rootRouteImport
|
||||||
|
}
|
||||||
'/demo/tanstack-query': {
|
'/demo/tanstack-query': {
|
||||||
id: '/demo/tanstack-query'
|
id: '/demo/tanstack-query'
|
||||||
path: '/demo/tanstack-query'
|
path: '/demo/tanstack-query'
|
||||||
@@ -283,32 +272,18 @@ declare module '@tanstack/react-router' {
|
|||||||
preLoaderRoute: typeof DemoTanstackQueryRouteImport
|
preLoaderRoute: typeof DemoTanstackQueryRouteImport
|
||||||
parentRoute: typeof rootRouteImport
|
parentRoute: typeof rootRouteImport
|
||||||
}
|
}
|
||||||
'/planes/_lista': {
|
|
||||||
id: '/planes/_lista'
|
|
||||||
path: '/planes'
|
|
||||||
fullPath: '/planes'
|
|
||||||
preLoaderRoute: typeof PlanesListaRouteRouteImport
|
|
||||||
parentRoute: typeof rootRouteImport
|
|
||||||
}
|
|
||||||
'/planes/_lista/nuevo': {
|
'/planes/_lista/nuevo': {
|
||||||
id: '/planes/_lista/nuevo'
|
id: '/planes/_lista/nuevo'
|
||||||
path: '/nuevo'
|
path: '/nuevo'
|
||||||
fullPath: '/planes/nuevo'
|
fullPath: '/planes/nuevo'
|
||||||
preLoaderRoute: typeof PlanesListaNuevoRouteImport
|
preLoaderRoute: typeof PlanesListaNuevoRouteImport
|
||||||
parentRoute: typeof PlanesListaRouteRoute
|
parentRoute: typeof PlanesListaRoute
|
||||||
}
|
|
||||||
'/planes/$planId/asignaturas': {
|
|
||||||
id: '/planes/$planId/asignaturas'
|
|
||||||
path: '/planes/$planId/asignaturas'
|
|
||||||
fullPath: '/planes/$planId/asignaturas'
|
|
||||||
preLoaderRoute: typeof PlanesPlanIdAsignaturasRouteRouteImport
|
|
||||||
parentRoute: typeof rootRouteImport
|
|
||||||
}
|
}
|
||||||
'/planes/$planId/_detalle': {
|
'/planes/$planId/_detalle': {
|
||||||
id: '/planes/$planId/_detalle'
|
id: '/planes/$planId/_detalle'
|
||||||
path: '/planes/$planId'
|
path: '/planes/$planId'
|
||||||
fullPath: '/planes/$planId'
|
fullPath: '/planes/$planId'
|
||||||
preLoaderRoute: typeof PlanesPlanIdDetalleRouteRouteImport
|
preLoaderRoute: typeof PlanesPlanIdDetalleRouteImport
|
||||||
parentRoute: typeof rootRouteImport
|
parentRoute: typeof rootRouteImport
|
||||||
}
|
}
|
||||||
'/planes/$planId/_detalle/': {
|
'/planes/$planId/_detalle/': {
|
||||||
@@ -316,153 +291,115 @@ declare module '@tanstack/react-router' {
|
|||||||
path: '/'
|
path: '/'
|
||||||
fullPath: '/planes/$planId/'
|
fullPath: '/planes/$planId/'
|
||||||
preLoaderRoute: typeof PlanesPlanIdDetalleIndexRouteImport
|
preLoaderRoute: typeof PlanesPlanIdDetalleIndexRouteImport
|
||||||
parentRoute: typeof PlanesPlanIdDetalleRouteRoute
|
parentRoute: typeof PlanesPlanIdDetalleRoute
|
||||||
|
}
|
||||||
|
'/planes/$planId/asignaturas/$asignaturaId': {
|
||||||
|
id: '/planes/$planId/asignaturas/$asignaturaId'
|
||||||
|
path: '/planes/$planId/asignaturas/$asignaturaId'
|
||||||
|
fullPath: '/planes/$planId/asignaturas/$asignaturaId'
|
||||||
|
preLoaderRoute: typeof PlanesPlanIdAsignaturasAsignaturaIdRouteImport
|
||||||
|
parentRoute: typeof rootRouteImport
|
||||||
}
|
}
|
||||||
'/planes/$planId/_detalle/mapa': {
|
'/planes/$planId/_detalle/mapa': {
|
||||||
id: '/planes/$planId/_detalle/mapa'
|
id: '/planes/$planId/_detalle/mapa'
|
||||||
path: '/mapa'
|
path: '/mapa'
|
||||||
fullPath: '/planes/$planId/mapa'
|
fullPath: '/planes/$planId/mapa'
|
||||||
preLoaderRoute: typeof PlanesPlanIdDetalleMapaRouteImport
|
preLoaderRoute: typeof PlanesPlanIdDetalleMapaRouteImport
|
||||||
parentRoute: typeof PlanesPlanIdDetalleRouteRoute
|
parentRoute: typeof PlanesPlanIdDetalleRoute
|
||||||
}
|
}
|
||||||
'/planes/$planId/_detalle/iaplan': {
|
'/planes/$planId/_detalle/iaplan': {
|
||||||
id: '/planes/$planId/_detalle/iaplan'
|
id: '/planes/$planId/_detalle/iaplan'
|
||||||
path: '/iaplan'
|
path: '/iaplan'
|
||||||
fullPath: '/planes/$planId/iaplan'
|
fullPath: '/planes/$planId/iaplan'
|
||||||
preLoaderRoute: typeof PlanesPlanIdDetalleIaplanRouteImport
|
preLoaderRoute: typeof PlanesPlanIdDetalleIaplanRouteImport
|
||||||
parentRoute: typeof PlanesPlanIdDetalleRouteRoute
|
parentRoute: typeof PlanesPlanIdDetalleRoute
|
||||||
}
|
}
|
||||||
'/planes/$planId/_detalle/historial': {
|
'/planes/$planId/_detalle/historial': {
|
||||||
id: '/planes/$planId/_detalle/historial'
|
id: '/planes/$planId/_detalle/historial'
|
||||||
path: '/historial'
|
path: '/historial'
|
||||||
fullPath: '/planes/$planId/historial'
|
fullPath: '/planes/$planId/historial'
|
||||||
preLoaderRoute: typeof PlanesPlanIdDetalleHistorialRouteImport
|
preLoaderRoute: typeof PlanesPlanIdDetalleHistorialRouteImport
|
||||||
parentRoute: typeof PlanesPlanIdDetalleRouteRoute
|
parentRoute: typeof PlanesPlanIdDetalleRoute
|
||||||
}
|
}
|
||||||
'/planes/$planId/_detalle/flujo': {
|
'/planes/$planId/_detalle/flujo': {
|
||||||
id: '/planes/$planId/_detalle/flujo'
|
id: '/planes/$planId/_detalle/flujo'
|
||||||
path: '/flujo'
|
path: '/flujo'
|
||||||
fullPath: '/planes/$planId/flujo'
|
fullPath: '/planes/$planId/flujo'
|
||||||
preLoaderRoute: typeof PlanesPlanIdDetalleFlujoRouteImport
|
preLoaderRoute: typeof PlanesPlanIdDetalleFlujoRouteImport
|
||||||
parentRoute: typeof PlanesPlanIdDetalleRouteRoute
|
parentRoute: typeof PlanesPlanIdDetalleRoute
|
||||||
}
|
}
|
||||||
'/planes/$planId/_detalle/documento': {
|
'/planes/$planId/_detalle/documento': {
|
||||||
id: '/planes/$planId/_detalle/documento'
|
id: '/planes/$planId/_detalle/documento'
|
||||||
path: '/documento'
|
path: '/documento'
|
||||||
fullPath: '/planes/$planId/documento'
|
fullPath: '/planes/$planId/documento'
|
||||||
preLoaderRoute: typeof PlanesPlanIdDetalleDocumentoRouteImport
|
preLoaderRoute: typeof PlanesPlanIdDetalleDocumentoRouteImport
|
||||||
parentRoute: typeof PlanesPlanIdDetalleRouteRoute
|
parentRoute: typeof PlanesPlanIdDetalleRoute
|
||||||
}
|
}
|
||||||
'/planes/$planId/_detalle/asignaturas': {
|
'/planes/$planId/_detalle/asignaturas/': {
|
||||||
id: '/planes/$planId/_detalle/asignaturas'
|
id: '/planes/$planId/_detalle/asignaturas/'
|
||||||
path: '/asignaturas'
|
path: '/asignaturas'
|
||||||
fullPath: '/planes/$planId/asignaturas'
|
fullPath: '/planes/$planId/asignaturas/'
|
||||||
preLoaderRoute: typeof PlanesPlanIdDetalleAsignaturasRouteImport
|
preLoaderRoute: typeof PlanesPlanIdDetalleAsignaturasIndexRouteImport
|
||||||
parentRoute: typeof PlanesPlanIdDetalleRouteRoute
|
parentRoute: typeof PlanesPlanIdDetalleRoute
|
||||||
}
|
}
|
||||||
'/planes/$planId/asignaturas/_lista': {
|
'/planes/$planId/_detalle/asignaturas/nueva': {
|
||||||
id: '/planes/$planId/asignaturas/_lista'
|
id: '/planes/$planId/_detalle/asignaturas/nueva'
|
||||||
path: ''
|
path: '/asignaturas/nueva'
|
||||||
fullPath: '/planes/$planId/asignaturas'
|
|
||||||
preLoaderRoute: typeof PlanesPlanIdAsignaturasListaRouteRouteImport
|
|
||||||
parentRoute: typeof PlanesPlanIdAsignaturasRouteRoute
|
|
||||||
}
|
|
||||||
'/planes/$planId/asignaturas/$asignaturaId': {
|
|
||||||
id: '/planes/$planId/asignaturas/$asignaturaId'
|
|
||||||
path: '/$asignaturaId'
|
|
||||||
fullPath: '/planes/$planId/asignaturas/$asignaturaId'
|
|
||||||
preLoaderRoute: typeof PlanesPlanIdAsignaturasAsignaturaIdRouteRouteImport
|
|
||||||
parentRoute: typeof PlanesPlanIdAsignaturasRouteRoute
|
|
||||||
}
|
|
||||||
'/planes/$planId/asignaturas/_lista/nueva': {
|
|
||||||
id: '/planes/$planId/asignaturas/_lista/nueva'
|
|
||||||
path: '/nueva'
|
|
||||||
fullPath: '/planes/$planId/asignaturas/nueva'
|
fullPath: '/planes/$planId/asignaturas/nueva'
|
||||||
preLoaderRoute: typeof PlanesPlanIdAsignaturasListaNuevaRouteImport
|
preLoaderRoute: typeof PlanesPlanIdDetalleAsignaturasNuevaRouteImport
|
||||||
parentRoute: typeof PlanesPlanIdAsignaturasListaRouteRoute
|
parentRoute: typeof PlanesPlanIdDetalleRoute
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
interface PlanesListaRouteRouteChildren {
|
interface PlanesListaRouteChildren {
|
||||||
PlanesListaNuevoRoute: typeof PlanesListaNuevoRoute
|
PlanesListaNuevoRoute: typeof PlanesListaNuevoRoute
|
||||||
}
|
}
|
||||||
|
|
||||||
const PlanesListaRouteRouteChildren: PlanesListaRouteRouteChildren = {
|
const PlanesListaRouteChildren: PlanesListaRouteChildren = {
|
||||||
PlanesListaNuevoRoute: PlanesListaNuevoRoute,
|
PlanesListaNuevoRoute: PlanesListaNuevoRoute,
|
||||||
}
|
}
|
||||||
|
|
||||||
const PlanesListaRouteRouteWithChildren =
|
const PlanesListaRouteWithChildren = PlanesListaRoute._addFileChildren(
|
||||||
PlanesListaRouteRoute._addFileChildren(PlanesListaRouteRouteChildren)
|
PlanesListaRouteChildren,
|
||||||
|
)
|
||||||
|
|
||||||
interface PlanesPlanIdDetalleRouteRouteChildren {
|
interface PlanesPlanIdDetalleRouteChildren {
|
||||||
PlanesPlanIdDetalleAsignaturasRoute: typeof PlanesPlanIdDetalleAsignaturasRoute
|
|
||||||
PlanesPlanIdDetalleDocumentoRoute: typeof PlanesPlanIdDetalleDocumentoRoute
|
PlanesPlanIdDetalleDocumentoRoute: typeof PlanesPlanIdDetalleDocumentoRoute
|
||||||
PlanesPlanIdDetalleFlujoRoute: typeof PlanesPlanIdDetalleFlujoRoute
|
PlanesPlanIdDetalleFlujoRoute: typeof PlanesPlanIdDetalleFlujoRoute
|
||||||
PlanesPlanIdDetalleHistorialRoute: typeof PlanesPlanIdDetalleHistorialRoute
|
PlanesPlanIdDetalleHistorialRoute: typeof PlanesPlanIdDetalleHistorialRoute
|
||||||
PlanesPlanIdDetalleIaplanRoute: typeof PlanesPlanIdDetalleIaplanRoute
|
PlanesPlanIdDetalleIaplanRoute: typeof PlanesPlanIdDetalleIaplanRoute
|
||||||
PlanesPlanIdDetalleMapaRoute: typeof PlanesPlanIdDetalleMapaRoute
|
PlanesPlanIdDetalleMapaRoute: typeof PlanesPlanIdDetalleMapaRoute
|
||||||
PlanesPlanIdDetalleIndexRoute: typeof PlanesPlanIdDetalleIndexRoute
|
PlanesPlanIdDetalleIndexRoute: typeof PlanesPlanIdDetalleIndexRoute
|
||||||
|
PlanesPlanIdDetalleAsignaturasNuevaRoute: typeof PlanesPlanIdDetalleAsignaturasNuevaRoute
|
||||||
|
PlanesPlanIdDetalleAsignaturasIndexRoute: typeof PlanesPlanIdDetalleAsignaturasIndexRoute
|
||||||
}
|
}
|
||||||
|
|
||||||
const PlanesPlanIdDetalleRouteRouteChildren: PlanesPlanIdDetalleRouteRouteChildren =
|
const PlanesPlanIdDetalleRouteChildren: PlanesPlanIdDetalleRouteChildren = {
|
||||||
{
|
|
||||||
PlanesPlanIdDetalleAsignaturasRoute: PlanesPlanIdDetalleAsignaturasRoute,
|
|
||||||
PlanesPlanIdDetalleDocumentoRoute: PlanesPlanIdDetalleDocumentoRoute,
|
PlanesPlanIdDetalleDocumentoRoute: PlanesPlanIdDetalleDocumentoRoute,
|
||||||
PlanesPlanIdDetalleFlujoRoute: PlanesPlanIdDetalleFlujoRoute,
|
PlanesPlanIdDetalleFlujoRoute: PlanesPlanIdDetalleFlujoRoute,
|
||||||
PlanesPlanIdDetalleHistorialRoute: PlanesPlanIdDetalleHistorialRoute,
|
PlanesPlanIdDetalleHistorialRoute: PlanesPlanIdDetalleHistorialRoute,
|
||||||
PlanesPlanIdDetalleIaplanRoute: PlanesPlanIdDetalleIaplanRoute,
|
PlanesPlanIdDetalleIaplanRoute: PlanesPlanIdDetalleIaplanRoute,
|
||||||
PlanesPlanIdDetalleMapaRoute: PlanesPlanIdDetalleMapaRoute,
|
PlanesPlanIdDetalleMapaRoute: PlanesPlanIdDetalleMapaRoute,
|
||||||
PlanesPlanIdDetalleIndexRoute: PlanesPlanIdDetalleIndexRoute,
|
PlanesPlanIdDetalleIndexRoute: PlanesPlanIdDetalleIndexRoute,
|
||||||
|
PlanesPlanIdDetalleAsignaturasNuevaRoute:
|
||||||
|
PlanesPlanIdDetalleAsignaturasNuevaRoute,
|
||||||
|
PlanesPlanIdDetalleAsignaturasIndexRoute:
|
||||||
|
PlanesPlanIdDetalleAsignaturasIndexRoute,
|
||||||
}
|
}
|
||||||
|
|
||||||
const PlanesPlanIdDetalleRouteRouteWithChildren =
|
const PlanesPlanIdDetalleRouteWithChildren =
|
||||||
PlanesPlanIdDetalleRouteRoute._addFileChildren(
|
PlanesPlanIdDetalleRoute._addFileChildren(PlanesPlanIdDetalleRouteChildren)
|
||||||
PlanesPlanIdDetalleRouteRouteChildren,
|
|
||||||
)
|
|
||||||
|
|
||||||
interface PlanesPlanIdAsignaturasListaRouteRouteChildren {
|
|
||||||
PlanesPlanIdAsignaturasListaNuevaRoute: typeof PlanesPlanIdAsignaturasListaNuevaRoute
|
|
||||||
}
|
|
||||||
|
|
||||||
const PlanesPlanIdAsignaturasListaRouteRouteChildren: PlanesPlanIdAsignaturasListaRouteRouteChildren =
|
|
||||||
{
|
|
||||||
PlanesPlanIdAsignaturasListaNuevaRoute:
|
|
||||||
PlanesPlanIdAsignaturasListaNuevaRoute,
|
|
||||||
}
|
|
||||||
|
|
||||||
const PlanesPlanIdAsignaturasListaRouteRouteWithChildren =
|
|
||||||
PlanesPlanIdAsignaturasListaRouteRoute._addFileChildren(
|
|
||||||
PlanesPlanIdAsignaturasListaRouteRouteChildren,
|
|
||||||
)
|
|
||||||
|
|
||||||
interface PlanesPlanIdAsignaturasRouteRouteChildren {
|
|
||||||
PlanesPlanIdAsignaturasAsignaturaIdRouteRoute: typeof PlanesPlanIdAsignaturasAsignaturaIdRouteRoute
|
|
||||||
PlanesPlanIdAsignaturasListaRouteRoute: typeof PlanesPlanIdAsignaturasListaRouteRouteWithChildren
|
|
||||||
}
|
|
||||||
|
|
||||||
const PlanesPlanIdAsignaturasRouteRouteChildren: PlanesPlanIdAsignaturasRouteRouteChildren =
|
|
||||||
{
|
|
||||||
PlanesPlanIdAsignaturasAsignaturaIdRouteRoute:
|
|
||||||
PlanesPlanIdAsignaturasAsignaturaIdRouteRoute,
|
|
||||||
PlanesPlanIdAsignaturasListaRouteRoute:
|
|
||||||
PlanesPlanIdAsignaturasListaRouteRouteWithChildren,
|
|
||||||
}
|
|
||||||
|
|
||||||
const PlanesPlanIdAsignaturasRouteRouteWithChildren =
|
|
||||||
PlanesPlanIdAsignaturasRouteRoute._addFileChildren(
|
|
||||||
PlanesPlanIdAsignaturasRouteRouteChildren,
|
|
||||||
)
|
|
||||||
|
|
||||||
const rootRouteChildren: RootRouteChildren = {
|
const rootRouteChildren: RootRouteChildren = {
|
||||||
IndexRoute: IndexRoute,
|
IndexRoute: IndexRoute,
|
||||||
DashboardRoute: DashboardRoute,
|
DashboardRoute: DashboardRoute,
|
||||||
LoginRoute: LoginRoute,
|
LoginRoute: LoginRoute,
|
||||||
PlanesListaRouteRoute: PlanesListaRouteRouteWithChildren,
|
|
||||||
DemoTanstackQueryRoute: DemoTanstackQueryRoute,
|
DemoTanstackQueryRoute: DemoTanstackQueryRoute,
|
||||||
PlanesPlanIdDetalleRouteRoute: PlanesPlanIdDetalleRouteRouteWithChildren,
|
PlanesListaRoute: PlanesListaRouteWithChildren,
|
||||||
PlanesPlanIdAsignaturasRouteRoute:
|
PlanesPlanIdDetalleRoute: PlanesPlanIdDetalleRouteWithChildren,
|
||||||
PlanesPlanIdAsignaturasRouteRouteWithChildren,
|
PlanesPlanIdAsignaturasAsignaturaIdRoute:
|
||||||
|
PlanesPlanIdAsignaturasAsignaturaIdRoute,
|
||||||
}
|
}
|
||||||
export const routeTree = rootRouteImport
|
export const routeTree = rootRouteImport
|
||||||
._addFileChildren(rootRouteChildren)
|
._addFileChildren(rootRouteChildren)
|
||||||
|
|||||||
@@ -35,6 +35,8 @@ export const Route = createFileRoute('/planes/$planId/_detalle')({
|
|||||||
} catch (e: any) {
|
} catch (e: any) {
|
||||||
// PGRST116: The result contains 0 rows
|
// PGRST116: The result contains 0 rows
|
||||||
if (e?.code === 'PGRST116') {
|
if (e?.code === 'PGRST116') {
|
||||||
|
console.log('not found on', Route.path)
|
||||||
|
|
||||||
throw notFound()
|
throw notFound()
|
||||||
}
|
}
|
||||||
throw e
|
throw e
|
||||||
@@ -131,7 +131,17 @@ function AsignaturasPage() {
|
|||||||
<Button variant="outline" size="sm">
|
<Button variant="outline" size="sm">
|
||||||
<Copy className="mr-2 h-4 w-4" /> Clonar
|
<Copy className="mr-2 h-4 w-4" /> Clonar
|
||||||
</Button>
|
</Button>
|
||||||
<Button className="bg-emerald-700 hover:bg-emerald-800">
|
<Button
|
||||||
|
onClick={() => {
|
||||||
|
console.log('planId desde asignaturas', planId)
|
||||||
|
|
||||||
|
navigate({
|
||||||
|
to: `/planes/${planId}/asignaturas/nueva`,
|
||||||
|
resetScroll: false,
|
||||||
|
})
|
||||||
|
}}
|
||||||
|
className="ring-offset-background bg-primary text-primary-foreground hover:bg-primary/90 inline-flex h-11 items-center justify-center gap-2 rounded-md px-8 text-sm font-medium shadow-md transition-colors"
|
||||||
|
>
|
||||||
<Plus className="mr-2 h-4 w-4" /> Nueva Asignatura
|
<Plus className="mr-2 h-4 w-4" /> Nueva Asignatura
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
@@ -3,12 +3,13 @@ import { createFileRoute } from '@tanstack/react-router'
|
|||||||
import { NuevaAsignaturaModalContainer } from '@/features/asignaturas/nueva/NuevaAsignaturaModalContainer'
|
import { NuevaAsignaturaModalContainer } from '@/features/asignaturas/nueva/NuevaAsignaturaModalContainer'
|
||||||
|
|
||||||
export const Route = createFileRoute(
|
export const Route = createFileRoute(
|
||||||
'/planes/$planId/asignaturas/_lista/nueva',
|
'/planes/$planId/_detalle/asignaturas/nueva',
|
||||||
)({
|
)({
|
||||||
component: NuevaAsignaturaModal,
|
component: NuevaAsignaturaModal,
|
||||||
})
|
})
|
||||||
|
|
||||||
function NuevaAsignaturaModal() {
|
function NuevaAsignaturaModal() {
|
||||||
const { planId } = Route.useParams()
|
const { planId } = Route.useParams()
|
||||||
|
console.log('planId desde nueva', planId)
|
||||||
return <NuevaAsignaturaModalContainer planId={planId} />
|
return <NuevaAsignaturaModalContainer planId={planId} />
|
||||||
}
|
}
|
||||||
44
src/routes/planes/$planId/asignaturas/$asignaturaId.tsx
Normal file
44
src/routes/planes/$planId/asignaturas/$asignaturaId.tsx
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
import { createFileRoute, notFound } from '@tanstack/react-router'
|
||||||
|
|
||||||
|
import MateriaDetailPage from '@/components/asignaturas/detalle/MateriaDetailPage'
|
||||||
|
import { NotFoundPage } from '@/components/ui/NotFoundPage'
|
||||||
|
import { subjects_get } from '@/data/api/subjects.api'
|
||||||
|
import { qk } from '@/data/query/keys'
|
||||||
|
|
||||||
|
export const Route = createFileRoute(
|
||||||
|
'/planes/$planId/asignaturas/$asignaturaId',
|
||||||
|
)({
|
||||||
|
loader: async ({ context: { queryClient }, params: { asignaturaId } }) => {
|
||||||
|
try {
|
||||||
|
await queryClient.ensureQueryData({
|
||||||
|
queryKey: qk.asignatura(asignaturaId),
|
||||||
|
queryFn: () => subjects_get(asignaturaId),
|
||||||
|
})
|
||||||
|
} catch (e: any) {
|
||||||
|
// PGRST116: The result contains 0 rows (Supabase Single response error)
|
||||||
|
if (e?.code === 'PGRST116') {
|
||||||
|
throw notFound()
|
||||||
|
}
|
||||||
|
throw e
|
||||||
|
}
|
||||||
|
},
|
||||||
|
notFoundComponent: () => {
|
||||||
|
return (
|
||||||
|
<NotFoundPage
|
||||||
|
title="Materia no encontrada"
|
||||||
|
message="La asignatura que buscas no existe o fue eliminada."
|
||||||
|
/>
|
||||||
|
)
|
||||||
|
},
|
||||||
|
component: RouteComponent,
|
||||||
|
})
|
||||||
|
|
||||||
|
function RouteComponent() {
|
||||||
|
// const { planId, asignaturaId } = Route.useParams()
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div>
|
||||||
|
<MateriaDetailPage></MateriaDetailPage>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
import AsignaturaDetailPage from '@/components/asignaturas/detalle/AsignaturaDetailPage'
|
|
||||||
import { createFileRoute } from '@tanstack/react-router'
|
|
||||||
|
|
||||||
export const Route = createFileRoute(
|
|
||||||
'/planes/$planId/asignaturas/$asignaturaId',
|
|
||||||
)({
|
|
||||||
component: RouteComponent,
|
|
||||||
})
|
|
||||||
|
|
||||||
function RouteComponent() {
|
|
||||||
//const { planId, asignaturaId } = Route.useParams()
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div>
|
|
||||||
<AsignaturaDetailPage></AsignaturaDetailPage>
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
import { createFileRoute, Outlet } from '@tanstack/react-router'
|
|
||||||
|
|
||||||
export const Route = createFileRoute('/planes/$planId/asignaturas/_lista')({
|
|
||||||
component: RouteComponent,
|
|
||||||
})
|
|
||||||
|
|
||||||
function RouteComponent() {
|
|
||||||
return (
|
|
||||||
<main className="bg-background min-h-screen w-full">
|
|
||||||
<div className="mx-auto flex w-full max-w-7xl flex-col gap-4 px-4 py-6 md:px-6 lg:px-8">
|
|
||||||
<h1 className="text-foreground text-2xl font-semibold">Asignaturas</h1>
|
|
||||||
<Outlet />
|
|
||||||
</div>
|
|
||||||
</main>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
@@ -1,34 +0,0 @@
|
|||||||
import { createFileRoute, Outlet, notFound } from '@tanstack/react-router'
|
|
||||||
|
|
||||||
import { NotFoundPage } from '@/components/ui/NotFoundPage'
|
|
||||||
import { plans_get } from '@/data/api/plans.api'
|
|
||||||
import { qk } from '@/data/query/keys'
|
|
||||||
|
|
||||||
export const Route = createFileRoute('/planes/$planId/asignaturas')({
|
|
||||||
loader: async ({ context: { queryClient }, params: { planId } }) => {
|
|
||||||
try {
|
|
||||||
await queryClient.ensureQueryData({
|
|
||||||
queryKey: qk.plan(planId),
|
|
||||||
queryFn: () => plans_get(planId),
|
|
||||||
})
|
|
||||||
} catch (e: any) {
|
|
||||||
if (e?.code === 'PGRST116') {
|
|
||||||
throw notFound()
|
|
||||||
}
|
|
||||||
throw e
|
|
||||||
}
|
|
||||||
},
|
|
||||||
notFoundComponent: () => {
|
|
||||||
return (
|
|
||||||
<NotFoundPage
|
|
||||||
title="Plan de Estudios no encontrado"
|
|
||||||
message="El plan de estudios que intentas consultar no existe o no tienes permisos para verlo."
|
|
||||||
/>
|
|
||||||
)
|
|
||||||
},
|
|
||||||
component: AsignaturasLayout,
|
|
||||||
})
|
|
||||||
|
|
||||||
function AsignaturasLayout() {
|
|
||||||
return <Outlet />
|
|
||||||
}
|
|
||||||
@@ -125,7 +125,11 @@ function RouteComponent() {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<button
|
<button
|
||||||
onClick={() => navigate({ to: '/planes/nuevo' })}
|
onClick={() => {
|
||||||
|
console.log('planId')
|
||||||
|
|
||||||
|
navigate({ to: '/planes/nuevo', resetScroll: false })
|
||||||
|
}}
|
||||||
className="ring-offset-background bg-primary text-primary-foreground hover:bg-primary/90 inline-flex h-11 items-center justify-center gap-2 rounded-md px-8 text-sm font-medium shadow-md transition-colors"
|
className="ring-offset-background bg-primary text-primary-foreground hover:bg-primary/90 inline-flex h-11 items-center justify-center gap-2 rounded-md px-8 text-sm font-medium shadow-md transition-colors"
|
||||||
>
|
>
|
||||||
<Icons.Plus /> Nuevo plan de estudios
|
<Icons.Plus /> Nuevo plan de estudios
|
||||||
Reference in New Issue
Block a user