Commit 893ca942 by Billy Larru

crear rol policias arreglado

parent 1055284d
function initDatePicker(selectorName) {
$(selectorName).datepicker({
minDate: new Date(2000, 1 - 1, 1), maxDate: new Date(),
dateFormat: 'dd/mm/yy',
defaultDate: new Date(),
changeMonth: true,
changeYear: true,
yearRange: '-18:+0',
zIndexOffset: 3000,
onSelect: function () {
// $(this).valid();
}
});
$(selectorName).datepicker('setDate', 'now');
}
function listarRolesPolicias(objParams = {}) { function listarRolesPolicias(objParams = {}) {
ajaxWebService.get(URI_ROL_POLICIA, objParams).then((response) => { ajaxWebService.get(URI_ROL_POLICIA, objParams).then((response) => {
...@@ -78,9 +62,9 @@ function listarRolesPolicias(objParams = {}) { ...@@ -78,9 +62,9 @@ function listarRolesPolicias(objParams = {}) {
]; ];
let columnDefs = [ let columnDefs = [
{orderable: false, width: '5%', targets: 0, className: "text-center"}, {orderable: false, width: '1%', targets: 0, className: "text-center"},
{orderable: false, width: '5%', targets: 1}, {orderable: false, width: '8%', targets: 1},
{orderable: false, width: '30%', targets: 2, className: "text-center"}, {orderable: false, width: '10%', targets: 2, className: "text-center"},
{orderable: false, width: '7%', targets: 3, className: "text-center"}, {orderable: false, width: '7%', targets: 3, className: "text-center"},
{orderable: false, width: '7%', targets: 4, className: "text-center"}, {orderable: false, width: '7%', targets: 4, className: "text-center"},
{orderable: false, width: '10%', targets: 5, className: "text-center"}, {orderable: false, width: '10%', targets: 5, className: "text-center"},
...@@ -90,16 +74,14 @@ function listarRolesPolicias(objParams = {}) { ...@@ -90,16 +74,14 @@ function listarRolesPolicias(objParams = {}) {
let wrapsNameDatatable = `divRoles`; let wrapsNameDatatable = `divRoles`;
let classNameForDatatable = `display table table-bordered`; let classNameForDatatable = `display table table-bordered`;
let footer = false
makeDatatable({ makeDatatable(wrapsNameDatatable,
{
data: response.data, data: response.data,
columns, columns,
columnDefs, columnDefs,
wrapsNameDatatable, },
classNameForDatatable, classNameForDatatable).then((nodes) => {
footer
}).then((nodes) => {
nodes.container.off().on("click", ".ver-detalle", function () { nodes.container.off().on("click", ".ver-detalle", function () {
let data = nodes.datatable.DataTable().row($(this).parents("tr")).data(); let data = nodes.datatable.DataTable().row($(this).parents("tr")).data();
console.log(data); console.log(data);
...@@ -418,8 +400,7 @@ function buscarRoles() { ...@@ -418,8 +400,7 @@ function buscarRoles() {
} }
$().ready(function () { $().ready(function () {
initDatePicker("#dpFechaInicio"); initDatePicker("#dpFechaInicio", "#dpFechaFin");
initDatePicker("#dpFechaFin");
listarSedes("#cboSedesFiltro"); listarSedes("#cboSedesFiltro");
listarPolicias("#cboPoliciasFiltro"); listarPolicias("#cboPoliciasFiltro");
$('#servicio13').click(modificarServicio); $('#servicio13').click(modificarServicio);
......
...@@ -64,7 +64,7 @@ ...@@ -64,7 +64,7 @@
</div> </div>
<div class="col-md-10 col-md-offset-1"> <div class="col-md-8 col-md-offset-2">
<div class="panel panel-primary card-3" style="margin-top: 30px"> <div class="panel panel-primary card-3" style="margin-top: 30px">
<div class="panel-heading" style="padding: 8px 15px"> <div class="panel-heading" style="padding: 8px 15px">
<h6 class="panel-title" style="font-size: 15px; font-family: inherit">LISTADO DE ROLES</h6> <h6 class="panel-title" style="font-size: 15px; font-family: inherit">LISTADO DE ROLES</h6>
......
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