Merge branch 'Carlos' of repositorio.acatlan.unam.mx:IO/front-AT into Develop
This commit is contained in:
@@ -94,7 +94,7 @@ export default function AddTime({
|
||||
Swal.fire({
|
||||
title: "Tiempo Guardado!",
|
||||
icon: "success",
|
||||
draggable: true
|
||||
draggable: true,
|
||||
});
|
||||
|
||||
setFolio("");
|
||||
@@ -153,6 +153,11 @@ export default function AddTime({
|
||||
|
||||
if (lock && numericValue > 1000) {
|
||||
toast.error("El monto no puede superar $1000.00");
|
||||
Swal.fire({
|
||||
title: "El monto no puede superar $1000.00 Desbloquea el candado !",
|
||||
icon: "error",
|
||||
draggable: true,
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -175,25 +180,25 @@ export default function AddTime({
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="containerButton" style={{ position: 'relative' }}>
|
||||
<div className="containerButton" style={{ position: "relative" }}>
|
||||
<button className="button buttonSearch" type="submit">
|
||||
Guardar
|
||||
</button>
|
||||
|
||||
<button
|
||||
type="button"
|
||||
className={`button buttonCancel ${lock ? "buttonLock" : "buttonOpenLock"
|
||||
}`}
|
||||
className={`button buttonCancel ${
|
||||
lock ? "buttonLock" : "buttonOpenLock"
|
||||
}`}
|
||||
onClick={() => {
|
||||
setLock((prev) => !prev)
|
||||
setAmount('');
|
||||
setLock((prev) => !prev);
|
||||
setAmount("");
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
//IO
|
||||
//IO
|
||||
|
||||
@@ -31,8 +31,18 @@ export default function AsignacionMesas({ idCuenta, inscripcion }: Props) {
|
||||
setBitacora(null);
|
||||
} else {
|
||||
setBitacora([]);
|
||||
if (!result?.error) setError("Equipo");
|
||||
if (!resultMesa?.error) setError("Mesa");
|
||||
if (!result?.error) toast.error("Ya cuentas con un equipo asignado");
|
||||
Swal.fire({
|
||||
title: "Ya cuentas con un equipo asignado!",
|
||||
icon: "error",
|
||||
draggable: true,
|
||||
});
|
||||
if (!resultMesa?.error) toast.error("Ya cuentas con una mesa asignada");
|
||||
Swal.fire({
|
||||
title: "Ya cuentas con mesa asignada!",
|
||||
icon: "error",
|
||||
draggable: true,
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
@@ -118,9 +128,8 @@ export default function AsignacionMesas({ idCuenta, inscripcion }: Props) {
|
||||
Swal.fire({
|
||||
title: "Mesa asignada correctamente!",
|
||||
icon: "success",
|
||||
draggable: true
|
||||
draggable: true,
|
||||
});
|
||||
|
||||
} catch (error) {
|
||||
toast.error("No se pudo asignar la mesa");
|
||||
}
|
||||
@@ -179,7 +188,6 @@ export default function AsignacionMesas({ idCuenta, inscripcion }: Props) {
|
||||
>
|
||||
Asignar Mesa
|
||||
</button>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -3,6 +3,7 @@ import { envConfig } from "@/app/lib/config";
|
||||
import axios from "axios";
|
||||
import { useEffect, useState } from "react";
|
||||
import toast from "react-hot-toast";
|
||||
import Swal from "sweetalert2";
|
||||
|
||||
interface Programa {
|
||||
id_programa: number;
|
||||
@@ -77,6 +78,11 @@ export default function ProgramSelector({
|
||||
toast.error("No se pudo determinar el destino");
|
||||
} catch (error) {
|
||||
toast.error("Error al guardar cambios");
|
||||
Swal.fire({
|
||||
title: "Error al guardar cambios!",
|
||||
icon: "success",
|
||||
draggable: true,
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
@@ -114,6 +120,7 @@ export default function ProgramSelector({
|
||||
toast.error("Sin programas asignados");
|
||||
} else {
|
||||
toast.error("Error al cargar programas");
|
||||
|
||||
}
|
||||
} else {
|
||||
toast.error("Error inesperado");
|
||||
|
||||
@@ -146,7 +146,7 @@ export default function Inscripcion({
|
||||
Swal.fire({
|
||||
title: "Alumno inscrito sin pago!",
|
||||
icon: "success",
|
||||
draggable: true
|
||||
draggable: true,
|
||||
});
|
||||
router.refresh();
|
||||
} catch (err: any) {
|
||||
@@ -211,6 +211,12 @@ export default function Inscripcion({
|
||||
|
||||
if (lock && numericValue > 1000) {
|
||||
toast.error("El monto no puede superar $1000.00");
|
||||
Swal.fire({
|
||||
title:
|
||||
"El monto no puede superar $1000.00 Desbloquea el candado !",
|
||||
icon: "error",
|
||||
draggable: true,
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -233,16 +239,16 @@ export default function Inscripcion({
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="containerButton" style={{ position: 'relative' }}>
|
||||
|
||||
<div className="containerButton" style={{ position: "relative" }}>
|
||||
<button className="button buttonSearch">Inscribir</button>
|
||||
<button
|
||||
type="button"
|
||||
className={`button buttonCancel ${lock ? "buttonLock" : "buttonOpenLock"
|
||||
}`}
|
||||
className={`button buttonCancel ${
|
||||
lock ? "buttonLock" : "buttonOpenLock"
|
||||
}`}
|
||||
onClick={() => {
|
||||
setLock((prev) => !prev)
|
||||
setAmount('');
|
||||
setLock((prev) => !prev);
|
||||
setAmount("");
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
@@ -250,7 +256,6 @@ export default function Inscripcion({
|
||||
</form>
|
||||
)}
|
||||
{conPago === "sin" && (
|
||||
|
||||
<div className="containerButton">
|
||||
<button
|
||||
className="button buttonSearch"
|
||||
|
||||
@@ -74,6 +74,11 @@ function Receipt({ numAcount }: ReceiptsProps) {
|
||||
router.refresh();
|
||||
} catch (err: any) {
|
||||
toast.error(String(err));
|
||||
Swal.fire({
|
||||
title: "Tiket ya existente!",
|
||||
icon: "error",
|
||||
draggable: false
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user