From ee4a4be907e786be658867af0de1d16113452b70 Mon Sep 17 00:00:00 2001 From: IO <320154041@pcpuma.acatlan.unam.mx> Date: Tue, 24 Feb 2026 11:53:29 -0600 Subject: [PATCH] fixed checkbox --- app/(private)/AsignacionMesas/page.tsx | 1 - app/(private)/Impresiones/page.tsx | 2 +- app/Components/CheckBoxEquipo.tsx | 8 ++++++-- app/Components/CheckBoxMesa.tsx | 5 +++-- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/app/(private)/AsignacionMesas/page.tsx b/app/(private)/AsignacionMesas/page.tsx index 0cd3305..7563c92 100644 --- a/app/(private)/AsignacionMesas/page.tsx +++ b/app/(private)/AsignacionMesas/page.tsx @@ -20,7 +20,6 @@ export default async function Page(props: { const numAcount = params?.numAcount ?? null; const table = params?.table ?? null; - let student: any = null; let platica: any = null; let inscripcion: any[] = []; diff --git a/app/(private)/Impresiones/page.tsx b/app/(private)/Impresiones/page.tsx index 221e05b..d40abda 100644 --- a/app/(private)/Impresiones/page.tsx +++ b/app/(private)/Impresiones/page.tsx @@ -7,11 +7,11 @@ import ShowError from "@/app/Components/Global/ShowError"; import { cookies } from "next/headers"; import { GetStudentWhitoutSancion } from "@/app/lib/getStudentWhitoutSancion"; +import { envConfig } from "@/app/lib/config"; import axios from "axios"; import "@/app/globals.css"; -import { envConfig } from "@/app/lib/config"; export default async function Page(props: { searchParams?: Promise<{ diff --git a/app/Components/CheckBoxEquipo.tsx b/app/Components/CheckBoxEquipo.tsx index b7486fa..e368098 100644 --- a/app/Components/CheckBoxEquipo.tsx +++ b/app/Components/CheckBoxEquipo.tsx @@ -37,6 +37,7 @@ export default function CheckBoxEquipo({ numAcount, machine }: Props) { const [tiempoRestante, setTiempoRestante] = useState(""); const [minutos, setMinutos] = useState(); const [error, setError] = useState() + const [loading, setLoading] = useState(false) const fetchByCuenta = async (idCuenta: number) => { const result = await getEquipoByCount(idCuenta); @@ -102,6 +103,7 @@ export default function CheckBoxEquipo({ numAcount, machine }: Props) { const handleButton = async (e: React.MouseEvent) => { e.preventDefault(); + setLoading(false) await axios.patch( `${envConfig.apiUrl}/bitacora/cancelar/${bitacora.id_bitacora}`, @@ -122,6 +124,7 @@ export default function CheckBoxEquipo({ numAcount, machine }: Props) { if (modo === "Equipo" && machine) { fetchByEquipo(parseInt(machine)); } + setLoading(true) }; return ( @@ -155,7 +158,7 @@ export default function CheckBoxEquipo({ numAcount, machine }: Props) {

{error}

- {bitacora && ( + {bitacora && tiempoRestante !== "agotado" && ( <> + diff --git a/app/Components/CheckBoxMesa.tsx b/app/Components/CheckBoxMesa.tsx index 8e6ba70..4ae7044 100644 --- a/app/Components/CheckBoxMesa.tsx +++ b/app/Components/CheckBoxMesa.tsx @@ -141,7 +141,7 @@ export default function CheckBoxMesa({ numAcount, table }: props) {

{error}

- {bitacora && ( + {bitacora && tiempoRestante !== "agotado" && ( <> +