Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
Asistencia
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Billy Larru
Asistencia
Commits
94b211d3
Commit
94b211d3
authored
Aug 09, 2018
by
Billy Larru
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
agregando criterio de busqueda en proyeccion de asistencia policias
parent
1f31a56b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
47 additions
and
23 deletions
+47
-23
proyectar_asistencia_policias.js
src/main/webapp/js/pages/proyectar_asistencia_policias.js
+31
-22
proyectarAsistenciaPolicias.jsp
src/main/webapp/vistas/proyectarAsistenciaPolicias.jsp
+16
-1
No files found.
src/main/webapp/js/pages/proyectar_asistencia_policias.js
View file @
94b211d3
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
src/main/webapp/vistas/proyectarAsistenciaPolicias.jsp
View file @
94b211d3
...
...
@@ -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>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment