From bd8c5e305d6d3f6708016bdb66c4dd28e73e881a Mon Sep 17 00:00:00 2001 From: IO420 <320154041@pcpuma.acatlan.unam.mx> Date: Fri, 16 Jan 2026 14:47:32 -0600 Subject: [PATCH 1/3] get alumnno --- app/(private)/AsignacionEquipo/page.tsx | 51 ++++++++++++++++++++--- app/(private)/Inscripcion/inscripcion.css | 15 ++++--- app/(private)/Inscripcion/page.tsx | 13 +++--- app/globals.css | 3 +- 4 files changed, 60 insertions(+), 22 deletions(-) diff --git a/app/(private)/AsignacionEquipo/page.tsx b/app/(private)/AsignacionEquipo/page.tsx index a0a4659..17b4e86 100644 --- a/app/(private)/AsignacionEquipo/page.tsx +++ b/app/(private)/AsignacionEquipo/page.tsx @@ -7,6 +7,30 @@ import Information from "@/app/Components/Global/Information/information"; import ShowError from "@/app/Components/Global/ShowError"; import "@/app/globals.css"; +import Table from "@/app/Components/Global/table"; +import { envConfig } from "@/app/lib/config"; + +async function getInscripcion(idCuenta: number) { + try { + const res = await fetch(`${envConfig.apiUrl}/alumno-inscrito/${idCuenta}`, { + method: "GET", + headers: { + "Content-Type": "application/json", + }, + cache: "no-store", + }); + + if (!res.ok) { + throw new Error(`Error ${res.status}: ${res.statusText}`); + } + + return await res.json(); + } catch (error: any) { + return { error: error.message || "No se pudo cargar la inscripción" }; + } +} + +const headers = ["Inscrito", "Tiempo", "Confirmó"]; export default async function Page(props: { searchParams?: Promise<{ @@ -21,18 +45,37 @@ export default async function Page(props: { const machine = params?.machine ? params.machine : null; let student: any = null; + let inscripcion: any = null; let errorMessage = ""; if (numAcount) { - const result = await GetStudent(parseInt(numAcount)); + const idCuenta = parseInt(numAcount); + const result = await GetStudent(idCuenta); if (result.error) { errorMessage = `${result.error}`; } else { student = result as Student; } + + const inscResult = await getInscripcion(idCuenta); + if (!inscResult.error && Array.isArray(inscResult)) { + inscripcion = inscResult; + } else { + inscripcion = []; + } } + const tableData = Array.isArray(inscripcion) + ? inscripcion.map((ins) => ({ + Inscrito: ins.plataforma?.nombre || "—", + Tiempo: ins.tiempo_disponible + ? `${ins.tiempo_disponible} minutos` + : "—", + Confirmó: ins.platica.data === 1 ? "sí" : "no", + })) + : []; + return (
{errorMessage && } @@ -55,11 +98,7 @@ export default async function Page(props: { NoCuenta={student.id_cuenta} nombre={student.nombre} /> - +
diff --git a/app/globals.css b/app/globals.css index 1626223..2f2018e 100644 --- a/app/globals.css +++ b/app/globals.css @@ -101,7 +101,6 @@ footer p { .containerForm { width: 100%; max-width: 450px; - gap:10px; } .img { @@ -283,7 +282,7 @@ a { .informationKey { font-weight: 600; text-transform: capitalize; - width: 100px; + min-width: 80px; } .informationValue { From f859d4e8d89a00777e6036eb984c75b352b4e6a3 Mon Sep 17 00:00:00 2001 From: IO420 <320154041@pcpuma.acatlan.unam.mx> Date: Fri, 16 Jan 2026 15:47:16 -0600 Subject: [PATCH 2/3] fixed SearchDate --- app/Components/AsignacionMesas.tsx | 2 +- app/Components/ProgramList.tsx | 0 app/Components/Reportes/porRecibo.tsx | 6 +- .../SearchDateBetween/SearchDate.css | 11 ++++ .../SearchDateBetween/SearchDateBetween.tsx | 56 +++++++++++-------- app/Components/SelectAreas.tsx | 1 + tsconfig.json | 2 +- 7 files changed, 51 insertions(+), 27 deletions(-) delete mode 100644 app/Components/ProgramList.tsx create mode 100644 app/Components/SearchDateBetween/SearchDate.css diff --git a/app/Components/AsignacionMesas.tsx b/app/Components/AsignacionMesas.tsx index b87282a..c45239b 100644 --- a/app/Components/AsignacionMesas.tsx +++ b/app/Components/AsignacionMesas.tsx @@ -1,6 +1,6 @@ "use client"; import axios from "axios"; -import { SetStateAction, useEffect, useState } from "react"; +import { useEffect, useState } from "react"; import { envConfig } from "../lib/config"; interface mesas { diff --git a/app/Components/ProgramList.tsx b/app/Components/ProgramList.tsx deleted file mode 100644 index e69de29..0000000 diff --git a/app/Components/Reportes/porRecibo.tsx b/app/Components/Reportes/porRecibo.tsx index 39da5a2..42b63d3 100644 --- a/app/Components/Reportes/porRecibo.tsx +++ b/app/Components/Reportes/porRecibo.tsx @@ -11,7 +11,7 @@ interface Recibo { fecha_registro: string; monto: string; user: { - nombre: string; + usuario: string; }; } @@ -72,7 +72,7 @@ function PorRecibos({ desde, hasta }: Props) { {!loading && recibos.length === 0 && ( - + )} @@ -82,7 +82,7 @@ function PorRecibos({ desde, hasta }: Props) { - + ))} diff --git a/app/Components/SearchDateBetween/SearchDate.css b/app/Components/SearchDateBetween/SearchDate.css new file mode 100644 index 0000000..d11a641 --- /dev/null +++ b/app/Components/SearchDateBetween/SearchDate.css @@ -0,0 +1,11 @@ +.containerDate{ + gap: 10px; + width: 100%; + max-width: 100%; +} +.alingDate{ + display: flex; + justify-content: flex-start; + gap: 10px; + +} \ No newline at end of file diff --git a/app/Components/SearchDateBetween/SearchDateBetween.tsx b/app/Components/SearchDateBetween/SearchDateBetween.tsx index 3ccbba4..7b28e30 100644 --- a/app/Components/SearchDateBetween/SearchDateBetween.tsx +++ b/app/Components/SearchDateBetween/SearchDateBetween.tsx @@ -1,14 +1,15 @@ -'use client'; +"use client"; -import { useState } from 'react'; +import { useState } from "react"; +import "./SearchDate.css"; interface Props { onSearch: (desde: string, hasta: string) => void; } function SearchDateBetween({ onSearch }: Props) { - const [startDate, setStartDate] = useState(''); - const [endDate, setEndDate] = useState(''); + const [startDate, setStartDate] = useState(""); + const [endDate, setEndDate] = useState(""); const handleSubmit = (e: React.FormEvent) => { e.preventDefault(); @@ -17,26 +18,37 @@ function SearchDateBetween({ onSearch }: Props) { }; return ( -
- -
- setStartDate(e.target.value)} - /> + +
+
+ +
+ setStartDate(e.target.value)} + /> +
+
+ +
+ + +
+ setEndDate(e.target.value)} + /> +
+
- -
- setEndDate(e.target.value)} - /> -
- - diff --git a/app/Components/SelectAreas.tsx b/app/Components/SelectAreas.tsx index 85b3521..49fe688 100644 --- a/app/Components/SelectAreas.tsx +++ b/app/Components/SelectAreas.tsx @@ -44,3 +44,4 @@ export default function SelectAreas(props: proms) {
); } +//IO \ No newline at end of file diff --git a/tsconfig.json b/tsconfig.json index e7ff3a2..74f6560 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": [ { From 0f87251a5c2e951c43f605b430688c3582f5f8f2 Mon Sep 17 00:00:00 2001 From: IO420 <320154041@pcpuma.acatlan.unam.mx> Date: Mon, 19 Jan 2026 13:08:36 -0600 Subject: [PATCH 3/3] fixed header --- .../QuitarSancion/QuitarSancion.tsx | 2 +- .../layout/BarNavigation/BarNavigation.css | 41 +++-- .../layout/BarNavigation/BarNavigation.tsx | 144 +++++++++++++++--- 3 files changed, 156 insertions(+), 31 deletions(-) diff --git a/app/Components/QuitarSancion/QuitarSancion.tsx b/app/Components/QuitarSancion/QuitarSancion.tsx index 6f2e601..6924716 100644 --- a/app/Components/QuitarSancion/QuitarSancion.tsx +++ b/app/Components/QuitarSancion/QuitarSancion.tsx @@ -43,7 +43,7 @@ function QuitarSancion({ data }: Props) {
- + diff --git a/app/Components/layout/BarNavigation/BarNavigation.css b/app/Components/layout/BarNavigation/BarNavigation.css index 6e42464..0edffaa 100644 --- a/app/Components/layout/BarNavigation/BarNavigation.css +++ b/app/Components/layout/BarNavigation/BarNavigation.css @@ -21,7 +21,9 @@ cursor: pointer; color: #585858; width: 100%; - transition: background-color 0.3s ease, border 0.3s ease; + transition: + background-color 0.3s ease, + border 0.3s ease; font-size: 1.5rem; } @@ -71,7 +73,9 @@ border-radius: 8px; background-color: #ffffff; transition: color 0.3s ease; - transition: opacity 0.4s ease, max-height 0.4s ease; + transition: + opacity 0.4s ease, + max-height 0.4s ease; } .subMenu ul a { @@ -87,11 +91,6 @@ color: #101113; } -.subMenu:hover ul { - opacity: 1; - max-height: 500px; -} - .subMenu:hover ul a { display: flex; } @@ -138,6 +137,13 @@ tbody { font-size: 1.25rem; } +@media (min-width: 1001px) { + .subMenu:hover ul { + opacity: 1; + max-height: 500px; + } +} + @media (max-width: 1000px) { .menuToggle { display: flex; @@ -153,7 +159,7 @@ tbody { .barNavigation { font-size: 15px; - display: block; + justify-content: end; } .barNavigation ul { @@ -171,7 +177,9 @@ tbody { pointer-events: none; - transition: transform 0.35s ease-in-out, opacity 0.35s ease-in-out, + transition: + transform 0.35s ease-in-out, + opacity 0.35s ease-in-out, visibility 0.35s ease-in-out; } @@ -194,6 +202,10 @@ tbody { padding: 0; } + .barNavigation li { + color: white; + } + .barNavigation li:hover { color: white; border-radius: 0; @@ -205,14 +217,16 @@ tbody { top: 0px; width: 100%; background-color: rgb(1, 92, 184); - max-height: 0; opacity: 0; overflow: hidden; transform: translateY(-5px); - transition: max-height 0.35s ease, opacity 0.3s ease, transform 0.3s ease; + transition: + max-height 0.35s ease, + opacity 0.3s ease, + transform 0.3s ease; } .subMenu.open ul { @@ -221,8 +235,9 @@ tbody { transform: translateY(0); } - .subMenu ul { - opacity: 0; + .subMenu.open ul a{ + display: flex; + pointer-events:auto; } thead, diff --git a/app/Components/layout/BarNavigation/BarNavigation.tsx b/app/Components/layout/BarNavigation/BarNavigation.tsx index c5d7804..7d1bc70 100644 --- a/app/Components/layout/BarNavigation/BarNavigation.tsx +++ b/app/Components/layout/BarNavigation/BarNavigation.tsx @@ -14,6 +14,11 @@ function BarNavigation() { } }; + const closeAllMenus = () => { + setOpenMenu(false); + setOpenSubMenu(null); + }; + return (
No hay recibos en este rangoNo hay recibos en este rango
${Number(recibo.monto).toFixed(2)} {recibo.fecha_recibo} {recibo.fecha_registro}{recibo.user.nombre}{recibo.user.usuario}
Motivo Sanción Duración (semanas) Fecha SanciónPodría utilizar el servicio hastaPodra utilizar el servicio hasta