From 32bbfe107f4458c55c52656427d9b897dde9e200 Mon Sep 17 00:00:00 2001 From: IO <320154041@pcpuma.acatlan.unam.mx> Date: Mon, 2 Mar 2026 16:27:55 -0600 Subject: [PATCH] fixed view errors --- app/Components/CheckBoxMesa.tsx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/app/Components/CheckBoxMesa.tsx b/app/Components/CheckBoxMesa.tsx index f90969d..6639c8f 100644 --- a/app/Components/CheckBoxMesa.tsx +++ b/app/Components/CheckBoxMesa.tsx @@ -24,8 +24,8 @@ export default function CheckBoxMesa({ numAcount, table }: props) { const [bitacoraCuenta, setBitacoraCuenta] = useState(null); const [tiempoRestante, setTiempoRestante] = useState(""); const [minutos, setMinutos] = useState(); - const [errorMesa, setErrorMesa] = useState() - const [errorCount, setErrorCount] = useState() + const [errorMesa, setErrorMesa] = useState() + const [errorCount, setErrorCount] = useState() const [loading, setLoading] = useState(false) const bitacora = modo === "Cuenta" ? bitacoraCuenta : bitacoraMesa; @@ -40,6 +40,7 @@ export default function CheckBoxMesa({ numAcount, table }: props) { setBitacoraCuenta(null); } else { setBitacoraCuenta(result); + setErrorCount(null) } }; @@ -51,11 +52,12 @@ export default function CheckBoxMesa({ numAcount, table }: props) { setBitacoraMesa(null); } else { setBitacoraMesa(result); + setErrorMesa(null) } }; useEffect(() => { - if (!numAcount) return; + if (modo !== "Cuenta" || !numAcount) return; const idCuenta = parseInt(numAcount); if (isNaN(idCuenta)) return; @@ -63,7 +65,7 @@ export default function CheckBoxMesa({ numAcount, table }: props) { }, [numAcount]); useEffect(() => { - if (!table) return; + if (modo !== "Mesa" || !table) return; const idEquipo = table; if (isNaN(idEquipo)) return;