diff --git a/eslint.config.mjs b/eslint.config.mjs
index 719cea2..0a3d857 100644
--- a/eslint.config.mjs
+++ b/eslint.config.mjs
@@ -19,6 +19,10 @@ const eslintConfig = [
"build/**",
"next-env.d.ts",
],
+ rules: {
+ // permit using `any` in the codebase, otherwise Next's defaults treat it as an error
+ '@typescript-eslint/no-explicit-any': 'off',
+ },
},
];
diff --git a/src/app/administrador/casos_especiales/caso_especial/editar/[idCasoEspecial]/page.tsx b/src/app/administrador/casos_especiales/caso_especial/editar/[idCasoEspecial]/page.tsx
index b39a947..c89a6b9 100644
--- a/src/app/administrador/casos_especiales/caso_especial/editar/[idCasoEspecial]/page.tsx
+++ b/src/app/administrador/casos_especiales/caso_especial/editar/[idCasoEspecial]/page.tsx
@@ -30,6 +30,33 @@ export default function EditarCasoEspecial() {
const params = useParams();
const idCasoEspe = Number(params.idCasoEspecial);
+
+ // fetch local storage and user data when component mounts
+ useEffect(() => {
+ const fetchUser = async () => {
+ await getLocalInfo();
+
+ if (!idCasoEspecial) return;
+
+ try {
+ setIsLoading(true);
+ const data = await getUserCasoEspecial(idCasoEspecial);
+
+ setDatos(data);
+ } catch (error: unknown) {
+ const axiosErr = error as AxiosError<{ message: string }>;
+ const mensaje = axiosErr?.response?.data?.message || 'No se pudo obtener la infromacion del caso especial.';
+ Swal.fire({
+ title: 'Error',
+ icon: 'error',
+ text: mensaje,
+ });
+ }
+ };
+
+ fetchUser();
+ }, []);
+
if (isNaN(idCasoEspe)) {
return
Servicio inválido
;
}
@@ -100,29 +127,6 @@ export default function EditarCasoEspecial() {
const updateIsLoading = (value: boolean) => setIsLoading(value);
- useEffect(() => {
- const fetchUser = async () => {
- await getLocalInfo();
-
- if (!idCasoEspecial) return
-
- try {
- setIsLoading(true);
- const data = await getUserCasoEspecial(idCasoEspecial)
-
- setDatos(data);
- } catch (error) {
- const axiosErr = error as AxiosError;
- const mensaje = axiosErr?.response?.data?.message || 'No se pudo obtener la infromacion del caso especial.'
- Swal.fire({
- title: 'Error',
- icon: 'error',
- text: mensaje,
- })
- }
- }
- }, [])
-
return (
diff --git a/src/components/administrador/cuestionario.tsx b/src/components/administrador/cuestionario.tsx
index 0b33794..588edcf 100644
--- a/src/components/administrador/cuestionario.tsx
+++ b/src/components/administrador/cuestionario.tsx
@@ -20,7 +20,32 @@ export default function Cuestionario({ years, admin, updateIsLoading }: Props) {
try {
//updateIsLoading(true);
//const res = await axiosInstance.get(`/cuestionario_alumno?year=${selectedCuestionario}&version=${version}`, {
- const res = await axiosInstance.get(`/cuestionario-alumno2`, {
+
+ // Hacer la validacion de que tipo de cuestionario quiere
+ // if(selectedCuestionario === "cuestionario_alumno") {
+ // var res = await axiosInstance.get(`/cuestionario-alumno2`, {
+ // params: { anio: selectedYear, version },
+ // responseType: "blob",
+ // });
+ // } else if(selectedCuestionario === "cuestionario_programa") {
+ // var res = await axiosInstance.get(`/cuestionario-programa2`, {
+ // params: { anio: selectedYear, version },
+ // responseType: "blob",
+ // });
+ // } else {
+ // Swal.fire({
+ // title: 'Error',
+ // text: 'Seleccione un cuestionario válido.',
+ // icon: 'error',
+ // })
+ // return;
+ // }
+
+ // antes
+
+ console.log("Estos son los datos que se van a enviar para descargar el cuestionario", { selectedCuestionario, version, selectedYear })
+
+ const res = await axiosInstance.get(`/${selectedCuestionario}`, {
params: { anio: selectedYear, version },
responseType: "blob",
});
@@ -85,8 +110,8 @@ export default function Cuestionario({ years, admin, updateIsLoading }: Props) {
setSelectedCuestionario(e.target.value)}>
-
-
+
+
diff --git a/src/components/administrador/informacion-servicio.tsx b/src/components/administrador/informacion-servicio.tsx
index 29b8c08..651f384 100644
--- a/src/components/administrador/informacion-servicio.tsx
+++ b/src/components/administrador/informacion-servicio.tsx
@@ -47,6 +47,7 @@ interface Datos {
fechaLiberacion?: string;
telefono?: string;
direccion?: string;
+ responsableIntermo?: string;
/*
cartaAceptacion?: boolean;
cartaTermino?: boolean;
@@ -145,7 +146,7 @@ export default function InformacionServicio({ admin, imprimirError, updateIsLoad
-
+
{datos.programa?.programa}
@@ -159,6 +160,11 @@ export default function InformacionServicio({ admin, imprimirError, updateIsLoad
{datos.programa?.usuario?.nombre}
+
+
+
{datos?.responsableIntermo || '-'}
+
+
{datos.programa?.usuario?.usuario}
diff --git a/tsconfig.json b/tsconfig.json
index b575f7d..5d606a9 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -15,7 +15,7 @@
"moduleResolution": "bundler",
"resolveJsonModule": true,
"isolatedModules": true,
- "jsx": "react-jsx",
+ "jsx": "preserve",
"incremental": true,
"plugins": [
{