added new login
This commit is contained in:
@@ -105,7 +105,7 @@ export default function Page() {
|
||||
</button>
|
||||
|
||||
<button
|
||||
className={`button buttonSearch`}
|
||||
className={`button buttonCharge`}
|
||||
style={{margin:"5px"}}
|
||||
onClick={handleNuevo}
|
||||
>
|
||||
|
||||
@@ -20,7 +20,8 @@ export default function CheckBoxMesa({ numAcount, table }: props) {
|
||||
const [bitacora, setBitacora] = useState<any>(null);
|
||||
const [tiempoRestante, setTiempoRestante] = useState<string>("");
|
||||
const [minutos, setMinutos] = useState<number>();
|
||||
const [error,setError]=useState()
|
||||
const [error, setError] = useState()
|
||||
const [loading, setLoading] = useState<boolean>(false)
|
||||
|
||||
const fetchByCuenta = async (idCuenta: number) => {
|
||||
const result = await getMesaByCount(idCuenta);
|
||||
@@ -86,13 +87,13 @@ export default function CheckBoxMesa({ numAcount, table }: props) {
|
||||
|
||||
const handleButton = async (e: React.MouseEvent<HTMLButtonElement>) => {
|
||||
e.preventDefault();
|
||||
setLoading(false)
|
||||
|
||||
await axios.patch(
|
||||
`${envConfig.apiUrl}/bitacora-mesa/cancelar/${bitacora.id_bitacora_mesa}`,
|
||||
{ tiempo_asignado: minutos },
|
||||
);
|
||||
|
||||
|
||||
Swal.fire({
|
||||
title: "Tiempo cancelado correctamente!",
|
||||
icon: "success",
|
||||
@@ -106,6 +107,7 @@ export default function CheckBoxMesa({ numAcount, table }: props) {
|
||||
if (modo === "Mesa" && table) {
|
||||
fetchByEquipo(table);
|
||||
}
|
||||
setLoading(true)
|
||||
};
|
||||
|
||||
return (
|
||||
@@ -137,7 +139,7 @@ export default function CheckBoxMesa({ numAcount, table }: props) {
|
||||
{modo === "Cuenta" && <SearchUser value={numAcount ?? null} />}
|
||||
{modo === "Mesa" && <SearchMesa />}
|
||||
|
||||
<h2 style={{marginTop:"10px"}}>{error}</h2>
|
||||
<h2 style={{ marginTop: "10px" }}>{error}</h2>
|
||||
|
||||
{bitacora && (
|
||||
<>
|
||||
@@ -151,6 +153,7 @@ export default function CheckBoxMesa({ numAcount, table }: props) {
|
||||
className="button buttonSearch"
|
||||
style={{ marginTop: "1rem" }}
|
||||
onClick={handleButton}
|
||||
disabled={loading}
|
||||
>
|
||||
Cancelar tiempo
|
||||
</button>
|
||||
|
||||
@@ -9,6 +9,7 @@ import axios from "axios";
|
||||
function QuitarSancion({ id_cuenta }: { id_cuenta: number }) {
|
||||
const [alumno, setAlumno] = useState<Alumno>();
|
||||
const [alumnoSanciones, setAlumnoSanciones] = useState<AlumnoSancion[]>([]);
|
||||
const [loading, setLoading] = useState<boolean>(false)
|
||||
|
||||
const fetchAlumnoSanciones = async () => {
|
||||
try {
|
||||
@@ -31,9 +32,10 @@ function QuitarSancion({ id_cuenta }: { id_cuenta: number }) {
|
||||
|
||||
const handleButton = async (e: React.MouseEvent<HTMLButtonElement>) => {
|
||||
e.preventDefault();
|
||||
|
||||
setLoading(true)
|
||||
await axios.delete(`${envConfig.apiUrl}/alumno-sancion/${id_cuenta}`)
|
||||
setAlumnoSanciones([])
|
||||
setLoading(false)
|
||||
}
|
||||
|
||||
return (
|
||||
@@ -44,6 +46,7 @@ function QuitarSancion({ id_cuenta }: { id_cuenta: number }) {
|
||||
className="button buttonSearch"
|
||||
style={{ margin: "1rem 0" }}
|
||||
onClick={handleButton}
|
||||
disabled={loading}
|
||||
>
|
||||
Quitar sancion
|
||||
</button>
|
||||
|
||||
@@ -293,7 +293,8 @@ export default function Inscripcion({
|
||||
</div>
|
||||
|
||||
<div className="containerButton" style={{ position: "relative" }}>
|
||||
<button className="button buttonSearch">Inscribir</button>
|
||||
<button className="button buttonSearch" disabled={!plataformaSeleccionada}
|
||||
>Inscribir</button>
|
||||
<button
|
||||
type="button"
|
||||
className={`button buttonCancel ${lock ? "buttonLock" : "buttonOpenLock"
|
||||
|
||||
Reference in New Issue
Block a user