SweetAlert erros

This commit is contained in:
2026-02-18 19:01:31 -06:00
parent 9f64f1305f
commit 6abbe700d6
4 changed files with 24 additions and 0 deletions
+11
View File
@@ -31,7 +31,18 @@ export default function AsignacionMesas({ idCuenta, inscripcion }: Props) {
} else {
setBitacora([]);
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
});
}
};
@@ -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 Equipos {
id_equipo: number;
@@ -89,6 +90,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,
});
}
};
@@ -126,6 +132,7 @@ export default function ProgramSelector({
toast.error("Sin programas asignados");
} else {
toast.error("Error al cargar programas");
}
} else {
toast.error("Error inesperado");
+5
View File
@@ -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
});
}
};
+1
View File
@@ -912,6 +912,7 @@
"cpu": [
"ia32"
],
"dev": true,
"license": "MIT",
"optional": true,
"os": [