Commit 81c05074 by Billy Larru

listado de estados de asistencias en control de asistencias de policia

parent 1fb6b7df
const URI_LISTAR_PROYECTADO_COMPARATIVO = "";
function initilizeData() {
}
......@@ -102,7 +103,7 @@ function buscar() {
"processing": true,
ajax: {
contentType: 'application/json; charset=utf-8',
url: "http://172.16.2.91:3000/ServletPolicias/accion=listarProyectadoComparativoDatatable",
url: URI_LISTAR_PROYECTADO_COMPARATIVO,
// data: {
// busqueda: busqueda
// }
......
let asistencias = [], sedes = [];
const URI_LISTAR_SEDES = "http://172.16.2.91:666/sedes";
const URI_LISTAR_ESTADO_ASISTENCIA = "http://172.16.2.91:666/estadoAsistencia";
let htmlSedes;
function init() {
listarEstadoAsistencia();
}
function listarSedes() {
if (Object.is(htmlSedes, undefined)) {
......@@ -24,6 +27,12 @@ function listarSedes() {
size: 4
});
$(".btn.dropdown-toggle.bs-placeholder").removeClass("btn-info");
$(".btn.dropdown-toggle.bs-placeholder").css({
border: "1px solid #ddd",
backgroundColor: "#fff"
});
}).catch((error) => {
console.log(error);
});
......@@ -33,10 +42,36 @@ function listarSedes() {
style: 'btn-info',
size: 4
});
$(".btn.dropdown-toggle.bs-placeholder").removeClass("btn-info");
$(".btn.dropdown-toggle.bs-placeholder").css({
border: "1px solid #ddd",
backgroundColor: "#fff"
});
}
}
function listarEstadoAsistencia() {
axios.get(URI_LISTAR_ESTADO_ASISTENCIA).then((result) => {
let estados = result.data;
let html = "";
estados.forEach(e => {
html += `<option value="${e.codigo}">${e.nombre}</option>`;
});
$("#cboEstados").html(html);
$("#cboEstados").selectpicker('refresh');
$('.selectpicker').selectpicker({
style: 'btn-info',
size: 4
});
$(".btn.dropdown-toggle.bs-placeholder").removeClass("btn-info");
$(".btn.dropdown-toggle.bs-placeholder").css({
border: "1px solid #ddd",
backgroundColor: "#fff"
});
debugger;
});
}
......
......@@ -59,13 +59,13 @@
<div class="col-md-4 form-group">
<label>Estado</label>
<select class="selectpicker form-control" name="cboSedes" id="cboSedes" multiple>
<option>PENDIENTE</option>
<select class="selectpicker form-control" name="cboSedes" id="cboEstados" multiple>
<!-- <option>PENDIENTE</option>
<option>FCA</option>
<option>FSA</option>
<option>TEMPRANO</option>
<option>TARDANZA</option>
<option>NO MARCÓ</option>
<option>NO MARCÓ</option>-->
</select>
</div>
</div>
......
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