delete toast
This commit is contained in:
@@ -48,27 +48,50 @@ export default function AddTime({
|
||||
|
||||
const handleSaveReceipt = async () => {
|
||||
if (!numAcount) {
|
||||
toast.error("Busca de nuevo al estudiante");
|
||||
Swal.fire({
|
||||
title: " Busca de nuevo al estudiante!",
|
||||
icon: "error",
|
||||
draggable: true,
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
if (!plataformaSeleccionada) {
|
||||
toast.error("Selecciona una plataforma");
|
||||
Swal.fire({
|
||||
title: " Selecciona una plataforma!",
|
||||
icon: "error",
|
||||
draggable: true,
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
if (!folio) {
|
||||
toast.error("Ingresa el folio del ticket");
|
||||
|
||||
Swal.fire({
|
||||
title: " Ingresa el folio del tiket!",
|
||||
icon: "error",
|
||||
draggable: true,
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
if (!amount) {
|
||||
toast.error("Coloca el monto a depositar");
|
||||
|
||||
Swal.fire({
|
||||
title: " Coloca el monto a depositar!",
|
||||
icon: "error",
|
||||
draggable: true,
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
if (!date) {
|
||||
toast.error("Coloca la fecha");
|
||||
Swal.fire({
|
||||
title: " Coloca la fecha!",
|
||||
icon: "error",
|
||||
draggable: true,
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -152,21 +175,19 @@ export default function AddTime({
|
||||
const numericValue = parseFloat(value);
|
||||
|
||||
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 !",
|
||||
title:
|
||||
"El monto no puede superar $1000.00 Desbloquea el candado !",
|
||||
icon: "error",
|
||||
draggable: true,
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (numericValue > 10000) {
|
||||
toast.error("El monto no puede superar $10000.00");
|
||||
|
||||
Swal.fire({
|
||||
title:
|
||||
"El monto no puede superar $10000.00 pesos",
|
||||
title: "El monto no puede superar $10000.00 pesos",
|
||||
icon: "error",
|
||||
draggable: true,
|
||||
});
|
||||
@@ -199,8 +220,9 @@ export default function AddTime({
|
||||
|
||||
<button
|
||||
type="button"
|
||||
className={`button buttonCancel ${lock ? "buttonLock" : "buttonOpenLock"
|
||||
}`}
|
||||
className={`button buttonCancel ${
|
||||
lock ? "buttonLock" : "buttonOpenLock"
|
||||
}`}
|
||||
onClick={() => {
|
||||
setLock((prev) => !prev);
|
||||
setAmount("");
|
||||
|
||||
Reference in New Issue
Block a user