SweetAlert erros
This commit is contained in:
@@ -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");
|
||||
|
||||
@@ -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
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Generated
+1
@@ -912,6 +912,7 @@
|
||||
"cpu": [
|
||||
"ia32"
|
||||
],
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
|
||||
Reference in New Issue
Block a user