fixed view errors
This commit is contained in:
@@ -24,8 +24,8 @@ export default function CheckBoxMesa({ numAcount, table }: props) {
|
||||
const [bitacoraCuenta, setBitacoraCuenta] = useState<any>(null);
|
||||
const [tiempoRestante, setTiempoRestante] = useState<string>("");
|
||||
const [minutos, setMinutos] = useState<number>();
|
||||
const [errorMesa, setErrorMesa] = useState()
|
||||
const [errorCount, setErrorCount] = useState()
|
||||
const [errorMesa, setErrorMesa] = useState<string | null>()
|
||||
const [errorCount, setErrorCount] = useState<string | null>()
|
||||
const [loading, setLoading] = useState<boolean>(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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user