delete all toast and modified botton add equipo
This commit is contained in:
@@ -62,7 +62,7 @@ export default function Inscripcion({
|
||||
}
|
||||
|
||||
if (!folio) {
|
||||
|
||||
|
||||
Swal.fire({
|
||||
title: "Ingresa el folio del ticket!",
|
||||
icon: "error",
|
||||
@@ -72,7 +72,7 @@ export default function Inscripcion({
|
||||
}
|
||||
|
||||
if (!amount) {
|
||||
|
||||
|
||||
Swal.fire({
|
||||
title: "Coloca el monto a depositar!",
|
||||
icon: "error",
|
||||
@@ -82,7 +82,7 @@ export default function Inscripcion({
|
||||
}
|
||||
|
||||
if (!date) {
|
||||
|
||||
|
||||
Swal.fire({
|
||||
title: "Coloca la fecha!",
|
||||
icon: "error",
|
||||
@@ -92,7 +92,7 @@ export default function Inscripcion({
|
||||
}
|
||||
|
||||
if (!plataformaSeleccionada) {
|
||||
|
||||
|
||||
Swal.fire({
|
||||
title: "Selecciona una plataforma!",
|
||||
icon: "error",
|
||||
@@ -132,13 +132,17 @@ export default function Inscripcion({
|
||||
error.response?.data?.message ||
|
||||
error.message ||
|
||||
"Error desconocido al crear recibo";
|
||||
toast.error(String(msg));
|
||||
Swal.fire({
|
||||
title: msg,
|
||||
icon: "error",
|
||||
draggable: true
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
const handleInscripcionSinPago = async () => {
|
||||
if (!numAcount) {
|
||||
|
||||
|
||||
Swal.fire({
|
||||
title: "busca de nuevo al estudiante!",
|
||||
icon: "error",
|
||||
@@ -148,7 +152,7 @@ export default function Inscripcion({
|
||||
}
|
||||
|
||||
if (!plataformaSeleccionada) {
|
||||
|
||||
|
||||
Swal.fire({
|
||||
title: "Selecciona una plataforma!",
|
||||
icon: "error",
|
||||
@@ -177,7 +181,7 @@ export default function Inscripcion({
|
||||
throw new Error(data.message || "Error al inscribir");
|
||||
}
|
||||
|
||||
|
||||
|
||||
Swal.fire({
|
||||
title: "Alumno inscrito sin pago!",
|
||||
icon: "success",
|
||||
@@ -185,7 +189,11 @@ export default function Inscripcion({
|
||||
});
|
||||
router.refresh();
|
||||
} catch (err: any) {
|
||||
toast.error(err.message);
|
||||
Swal.fire({
|
||||
title: err.message,
|
||||
icon: "error",
|
||||
draggable: true,
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
@@ -200,7 +208,6 @@ export default function Inscripcion({
|
||||
value={conPago}
|
||||
onChange={(e) => setConPago(e.target.value as "con" | "sin")}
|
||||
style={{
|
||||
marginBottom: "1rem",
|
||||
maxWidth: "120px",
|
||||
minWidth: "120px",
|
||||
}}
|
||||
@@ -245,7 +252,7 @@ export default function Inscripcion({
|
||||
const numericValue = parseFloat(value);
|
||||
|
||||
if (lock && numericValue > 1000) {
|
||||
|
||||
|
||||
Swal.fire({
|
||||
title:
|
||||
"El monto no puede superar $1000.00 Desbloquea el candado !",
|
||||
@@ -257,7 +264,7 @@ export default function Inscripcion({
|
||||
|
||||
|
||||
if (numericValue > 10000) {
|
||||
|
||||
|
||||
Swal.fire({
|
||||
title:
|
||||
"El monto no puede superar $10000.00 pesos",
|
||||
|
||||
@@ -33,42 +33,42 @@ function Receipt({ numAcount }: ReceiptsProps) {
|
||||
|
||||
const handleSaveReceipt = async () => {
|
||||
if (!numAcount) {
|
||||
|
||||
|
||||
Swal.fire({
|
||||
title: "busca de nuevo al estudiante!",
|
||||
icon: "error",
|
||||
draggable: true
|
||||
});
|
||||
title: "busca de nuevo al estudiante!",
|
||||
icon: "error",
|
||||
draggable: true
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
if (!folio) {
|
||||
|
||||
|
||||
Swal.fire({
|
||||
title: "Ingresa el folio del ticket!",
|
||||
icon: "error",
|
||||
draggable: true
|
||||
});
|
||||
title: "Ingresa el folio del ticket!",
|
||||
icon: "error",
|
||||
draggable: true
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
if (!amount) {
|
||||
|
||||
|
||||
Swal.fire({
|
||||
title: "Coloca el monto a depositar!",
|
||||
icon: "error",
|
||||
draggable: true
|
||||
});
|
||||
title: "Coloca el monto a depositar!",
|
||||
icon: "error",
|
||||
draggable: true
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
if (!date) {
|
||||
|
||||
|
||||
Swal.fire({
|
||||
title: "Coloca la fecha!",
|
||||
icon: "error",
|
||||
draggable: true
|
||||
});
|
||||
title: "Coloca la fecha!",
|
||||
icon: "error",
|
||||
draggable: true
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -84,7 +84,7 @@ function Receipt({ numAcount }: ReceiptsProps) {
|
||||
setAmount("");
|
||||
setDate(todayISO);
|
||||
|
||||
|
||||
|
||||
Swal.fire({
|
||||
title: "Recibo Guardado Correctamente!",
|
||||
icon: "success",
|
||||
@@ -93,9 +93,8 @@ function Receipt({ numAcount }: ReceiptsProps) {
|
||||
|
||||
router.refresh();
|
||||
} catch (err: any) {
|
||||
toast.error(String(err));
|
||||
Swal.fire({
|
||||
title: "Tiket ya existente!",
|
||||
title: err,
|
||||
icon: "error",
|
||||
draggable: false
|
||||
});
|
||||
@@ -139,7 +138,7 @@ function Receipt({ numAcount }: ReceiptsProps) {
|
||||
const numericValue = parseFloat(value);
|
||||
|
||||
if (lock && numericValue > 1000) {
|
||||
|
||||
|
||||
Swal.fire({
|
||||
title:
|
||||
"El monto no puede superar $1000.00 Desbloquea el candado !",
|
||||
@@ -150,7 +149,7 @@ function Receipt({ numAcount }: ReceiptsProps) {
|
||||
}
|
||||
|
||||
if (numericValue > 10000) {
|
||||
|
||||
|
||||
Swal.fire({
|
||||
title:
|
||||
"El monto no puede superar $10000.00 pesos",
|
||||
|
||||
Reference in New Issue
Block a user