Commit d0222fb9 by Billy Larru

se corrige bug de acciones en crear rol policias

parent 68982c86
......@@ -51,7 +51,7 @@ function listarRolesPolicias(objParams = {}) {
console.log(data);
if (Object.is(data, 1)) {
return ` <span data-placement="left" title="Ver detalle" data-toggle="tooltip" style="cursor: pointer"> <i class='ver-detalle icon-calendar2 text-primary-700'></i>&nbsp;&nbsp; </span>
<span data-toggle="tooltip" data-placement="left" title="Desactivar Rol" style="cursor: pointer"> <i class='anular icon-cancel-circle2 text-danger-700'></i>&nbsp;&nbsp; </span>
<span data-toggle="tooltip" data-placement="left" title="Desactivar Rol" style="cursor: pointer"> <i class='eliminar icon-cancel-circle2 text-danger-700'></i>&nbsp;&nbsp; </span>
`;
} else {
return null;
......@@ -82,7 +82,8 @@ function listarRolesPolicias(objParams = {}) {
columnDefs,
},
classNameForDatatable).then((nodes) => {
nodes.container.off().on("click", ".ver-detalle", function () {
nodes.container.off();
nodes.container.on("click", ".ver-detalle", function () {
let data = nodes.datatable.DataTable().row($(this).parents("tr")).data();
console.log(data);
......@@ -112,6 +113,17 @@ function listarRolesPolicias(objParams = {}) {
});
});
nodes.container.on("click", ".eliminar", function () {
let data = nodes.datatable.DataTable().row($(this).parents("tr")).data();
swal({
type: 'success',
title: '¡Eliminado correctamente!',
showConfirmButton: false,
timer: 1500
});
});
});
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment