Commit c422a8ee by Billy Larru

arreglando bugs en control de asistencia

parent 865d1229
......@@ -213,7 +213,7 @@ function mostrarMensajeResultadoModal(result = {}) {
}
function mostrarModalRegistroAsistencia(data = {}) {
axios.get("modals/policias/controlAsistencia/registrarAsistencia.jsp").then((response) => {
ajaxModal.get("policias/controlAsistencia/registrarAsistencia.jsp").then((response) => {
swal({
title: '<strong>Registrar Asistencia</strong>',
html: response.data,
......@@ -234,18 +234,17 @@ function mostrarModalRegistroAsistencia(data = {}) {
});
}
function listarAsistencias(objParams = {}) {
axios.get(URI_POLICIAS_ASISTENCIA, objParams).then((response) => {
response.data = formatResponse(response);
ajaxWebService.get(URI_POLICIAS_ASISTENCIA, objParams).then((response) => {
let columns = getColumns();
let columnDefs = getColumnDefs();
let wrapsNameDatatable = `divAsistencias`;
let classNameForDatatable = `display table table-bordered`;
let footer = false;
debugger
makeDatatable(
{
data: response.data.data,
data: response.data,
columns,
columnDefs,
wrapsNameDatatable,
......@@ -262,7 +261,7 @@ function listarAsistencias(objParams = {}) {
}
function listarSedes(selectorName) {
axios.get(URI_SEDES).then((result) => {
ajaxWebService.get(URI_SEDES).then((result) => {
let sedes = result.data;
sedes = _.orderBy(sedes, s => s.descripcion);
let html = `<option value="">[TODOS]</option>`;
......@@ -273,7 +272,7 @@ function listarSedes(selectorName) {
}
function listarPolicias(selectorName) {
axios.get(URI_POLICIAS).then((result) => {
ajaxWebService.get(URI_POLICIAS).then((result) => {
let policias = result.data;
policias = _.orderBy(policias, p => p.nombres);
let html = `<option value="">[TODOS]</option>`;
......@@ -285,7 +284,7 @@ function listarPolicias(selectorName) {
function listarEstadoAsistencia() {
axios.get(URI_ESTADO_ASISTENCIA).then((response) => {
ajaxWebService.get(URI_ESTADO_ASISTENCIA).then((response) => {
let estados = response.data;
let html = "";
estados.forEach(e => html += `<option value="${e.codigo}">${e.nombre}</option>`);
......@@ -366,7 +365,6 @@ $().ready(function () {
listarEstadoAsistencia();
listarPolicias("#cboPoliciasFiltro");
listarSedes("#cboSedesFiltro");
defaultConfigDataTable();
$('.selectpicker').selectpicker({
style: 'btn-info',
size: 4
......
......@@ -104,7 +104,7 @@ function listarRolesPolicias(objParams = {}) {
let data = nodes.datatable.DataTable().row($(this).parents("tr")).data();
console.log(data);
ajaxWebService.get("modals/policias/mantenimientoRol/detalleRol.jspf").then((response) => {
ajaxModal.get("policias/mantenimientoRol/detalleRol.jspf").then((response) => {
debugger
swal({
title: '<strong>Detalle de rol</strong>',
......@@ -295,7 +295,7 @@ function guardarCambios() {
function mostrarModalNuevoRol() {
ajaxModal.get("modals/policias/mantenimientoRol/crearRol.jspf").then((response) => {
ajaxModal.get("policias/mantenimientoRol/crearRol.jspf").then((response) => {
swal({
title: '<strong>Nuevo Rol</strong>',
// type: 'info',
......
......@@ -14,7 +14,7 @@ function initializeData() {
function listarSedes(selectorName) {
axios.get(URI_SEDES).then((result) => {
ajaxWebService.get(URI_SEDES).then((result) => {
let sedes = result.data;
sedes = _.orderBy(sedes, s => s.descripcion);
listaSedes = _.map(sedes, s => s.descripcion);
......@@ -26,7 +26,7 @@ function listarSedes(selectorName) {
}
function listarPolicias(selectorName) {
axios.get(URI_POLICIAS).then((result) => {
ajaxWebService.get(URI_POLICIAS).then((result) => {
let policias = result.data;
policias = _.orderBy(policias, p => p.nombres);
let html = `<option value="">[TODOS]</option>`;
......@@ -51,7 +51,7 @@ function defaultConfigHandsonTable() {
function mostrarVistaPrevia() {
axios.get(URI_ROL_POLICIA).then((response) => {
ajaxWebService.get(URI_ROL_POLICIA).then((response) => {
debugger
if (response.data.status) {
handsonTable.destroy();
......
......@@ -358,9 +358,9 @@
<!--js de la pagina-->
<script src="../plantilla/assets/js/plugins/tables/datatables/datatables.min.js" type="text/javascript"></script>
<script src="../plantilla/assets/js/core/libraries/jquery_ui/interactions.min.js"></script>
<script src="../plantilla/assets/js/core/libraries/jquery_ui/widgets.min.js"></script>
<script src="../plantilla/assets/js/plugins/tables/datatables/datatables.min.js" type="text/javascript"></script>
<script src="../js/lib/bootstrap-select/bootstrap-select.min.js" type="text/javascript"></script>
<!--<script src="../plantilla/assets/js/plugins/pickers/datepicker.js" type="text/javascript"></script>-->
<script src="../plantilla/assets/js/plugins/pickers/daterangepicker.js"></script>
......
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