Commit 94b211d3 by Billy Larru

agregando criterio de busqueda en proyeccion de asistencia policias

parent 1f31a56b
let data = [];
let sedes = [];
let handsonTable;
function initializeData() {
data.push({"dni": "12345678", "nombres": "DELGADO CHOZO JUAN FRANCISCO", "sede": "CANTA CALLAO 2", "horario": "07:00 - 17:00", "tipo_horario": "REGULAR",
"fecha_entrada": "15/06/2018", "marcacion_entrada": "06:59", "marcacion_salida": "00:00", "fecha_salida": "2018-06-15"});
data.push({"dni": "12345678", "nombres": "DELGADO CHOZO JUAN FRANCISCO", "sede": "CANTA CALLAO 2", "horario": "07:00 - 17:00", "tipo_horario": "REGULAR",
"fecha_entrada": "16/06/2018", "marcacion_entrada": "06:59", "marcacion_salida": "00:00", "fecha_salida": "2018-06-16"});
"fecha_entrada": "15/06/2018", "marcacion_entrada": "06:59", "marcacion_salida": "00:00", "fecha_salida": "15/06/2018"});
data.push({"dni": "12345678", "nombres": "DELGADO CHOZO JUAN FRANCISCO", "sede": "CANTA CALLAO 2", "horario": "07:00 - 17:00", "tipo_horario": "REGULAR",
"fecha_entrada": "17/06/2018", "marcacion_entrada": "06:59", "marcacion_salida": "00:00", "fecha_salida": "2018-06-17"});
"fecha_entrada": "16/06/2018", "marcacion_entrada": "06:59", "marcacion_salida": "00:00", "fecha_salida": "16/06/2018"});
data.push({"dni": "12345678", "nombres": "DELGADO CHOZO JUAN FRANCISCO", "sede": "CANTA CALLAO 2", "horario": "07:00 - 07:00", "tipo_horario": "AMANECIDA 24h",
"fecha_entrada": "17/06/2018", "marcacion_entrada": "06:59", "marcacion_salida": "00:00", "fecha_salida": "18/06/2018"});
sedes = ["LINCE", "MONTESORI", "AREQUIPA", "ARENALES", "CUBA", "COCALENOS", "BELISARIO", "BERTONELLI", "VILLA EL SALVADOR"];
}
function defaultConfigHandsonTable(){
let container = document.getElementById("tblProyectado");
handsonTable = new Handsontable(container, {
data: [],
stretchH: 'all',
rowHeaders: true,
colHeaders: ['DNI', 'Apellidos y Nombres', 'Sede', 'Horario', 'Rol', 'Fecha Entrada', 'Hora entrada', 'Hora Salida', 'Fecha Salida'],
columns: [{}, {}, {}, {}, {}, {}, {}, {} ,{}]
});
}
function mostrarVistaPrevia() {
handsonTable.destroy();
let container = document.getElementById("tblProyectado");
handsonTable = new Handsontable(container, {
data: data,
......@@ -49,25 +65,15 @@ function mostrarVistaPrevia() {
{
"data": "tipo_horario",
"className": "text-center",
readOnly: true,
// render: (data) => {
// let label = '';
//
// switch (data) {
// case "REGULAR":
// label = `label bg-slate border-slate-700`;
// break;
// }
//
// return `<span class="${label}">${data}</span>`;
// }
readOnly: true
},
{
"data": "fecha_entrada",
"className": 'text-center',
type: 'date',
dateFormat: 'DD/MM/YYYY'
dateFormat: 'DD/MM/YYYY',
readOnly: true
},
{
data: "marcacion_entrada",
......@@ -89,7 +95,8 @@ function mostrarVistaPrevia() {
data: "fecha_salida",
className: 'text-center',
type: 'date',
dateFormat: 'DD/MM/YYYY'
dateFormat: 'DD/MM/YYYY',
readOnly: true
}
]
});
......@@ -122,6 +129,7 @@ $(function () {
});
$("#dpFechaFin").datepicker('setDate', 'now');
// defaultConfigDataTable();
defaultConfigHandsonTable();
initializeData();
$("#btnVistaPrevia").click(mostrarVistaPrevia);
});
\ No newline at end of file
......@@ -12,7 +12,7 @@
<body>
<%@include file="templates/header-body.jsp" %>
<!-- content -->
<div class="col-md-4 col-md-offset-4">
<div class="col-md-6 col-md-offset-3">
<div class="panel panel-primary">
<div class="panel-heading">
<h5 class="panel-title">Proyección de Asistencias</h5>
......@@ -21,6 +21,21 @@
<div class="panel-body">
<div class="row">
<div class="col-md-6 form-group">
<label>Busqueda Por</label>
<select id="cboCriterio" class="form-control">
<option value="">[SELECCIONE]</option>
<option value="">DNI</option>
<option value="">APELLIDOS</option>
</select>
</div>
<div class="col-md-6 form-group">
<label>Criterio</label>
<input type="text" class="form-control"></input>
</div>
</div>
<div class="row">
<div class="col-md-6 form-group">
<label>Fecha Inicio</label>
<div class="input-group">
<span class="input-group-addon"><i class="icon-calendar"></i></span>
......
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