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
76e42fb4
Commit
76e42fb4
authored
Jul 20, 2018
by
Billy Larru
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
proyectado de asistencia con datos en memoria
parent
cdff7617
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
119 additions
and
116 deletions
+119
-116
proyectar_asistencia_policias.js
src/main/webapp/js/pages/proyectar_asistencia_policias.js
+92
-0
cierreAsistenciaPolicias.jsp
src/main/webapp/vistas/cierreAsistenciaPolicias.jsp
+25
-0
proyectarAsistenciaPolicias.jsp
src/main/webapp/vistas/proyectarAsistenciaPolicias.jsp
+2
-116
No files found.
src/main/webapp/js/pages/proyectar_asistencia_policias.js
View file @
76e42fb4
let
data
=
[];
function
initializeData
()
{
data
.
push
({
"numero"
:
1
,
"nombres"
:
"DELGADO CHOZO JUAN FRANCISCO"
,
"sede"
:
"CANTA CALLAO 2"
,
"horario"
:
"07:00 - 17:00"
,
"tipo_horario"
:
"REGULAR"
,
"fecha_entrada"
:
"2018-06-15"
,
"marcacion_entrada"
:
"06:59"
,
"marcacion_salida"
:
"00:00"
,
"fecha_salida"
:
"2018-06-15"
});
data
.
push
({
"numero"
:
2
,
"nombres"
:
"DELGADO CHOZO JUAN FRANCISCO"
,
"sede"
:
"CANTA CALLAO 2"
,
"horario"
:
"07:00 - 17:00"
,
"tipo_horario"
:
"REGULAR"
,
"fecha_entrada"
:
"2018-06-15"
,
"marcacion_entrada"
:
"06:59"
,
"marcacion_salida"
:
"00:00"
,
"fecha_salida"
:
"2018-06-15"
});
data
.
push
({
"numero"
:
3
,
"nombres"
:
"DELGADO CHOZO JUAN FRANCISCO"
,
"sede"
:
"CANTA CALLAO 2"
,
"horario"
:
"07:00 - 17:00"
,
"tipo_horario"
:
"REGULAR"
,
"fecha_entrada"
:
"2018-06-15"
,
"marcacion_entrada"
:
"06:59"
,
"marcacion_salida"
:
"00:00"
,
"fecha_salida"
:
"2018-06-15"
});
data
.
push
({
"numero"
:
4
,
"nombres"
:
"DELGADO CHOZO JUAN FRANCISCO"
,
"sede"
:
"CANTA CALLAO 2"
,
"horario"
:
"07:00 - 17:00"
,
"tipo_horario"
:
"REGULAR"
,
"fecha_entrada"
:
"2018-06-15"
,
"marcacion_entrada"
:
"06:59"
,
"marcacion_salida"
:
"00:00"
,
"fecha_salida"
:
"2018-06-15"
});
data
.
push
({
"numero"
:
5
,
"nombres"
:
"DELGADO CHOZO JUAN FRANCISCO"
,
"sede"
:
"CANTA CALLAO 2"
,
"horario"
:
"07:00 - 17:00"
,
"tipo_horario"
:
"REGULAR"
,
"fecha_entrada"
:
"2018-06-15"
,
"marcacion_entrada"
:
"06:59"
,
"marcacion_salida"
:
"00:00"
,
"fecha_salida"
:
"2018-06-15"
});
data
.
push
({
"numero"
:
6
,
"nombres"
:
"DELGADO CHOZO JUAN FRANCISCO"
,
"sede"
:
"CANTA CALLAO 2"
,
"horario"
:
"07:00 - 17:00"
,
"tipo_horario"
:
"REGULAR"
,
"fecha_entrada"
:
"2018-06-15"
,
"marcacion_entrada"
:
"06:59"
,
"marcacion_salida"
:
"00:00"
,
"fecha_salida"
:
"2018-06-15"
});
}
function
mostrarVistaPrevia
()
{
console
.
log
(
"vista previa"
);
console
.
log
(
data
);
$
(
"#tblAsistenciaPolicias"
).
DataTable
().
destroy
();
$
(
"#tblAsistenciaPolicias"
).
DataTable
({
iDisplayLength
:
50
,
bStateSave
:
false
,
autoWidth
:
false
,
responsive
:
true
,
stateSave
:
true
,
columnDefs
:
[{
orderable
:
false
,
width
:
'100px'
,
targets
:
[
7
]
}],
dom
:
'<"datatable-header"fl><"datatable-scroll-wrap"t><"datatable-footer"ip>'
,
"processing"
:
true
,
data
:
data
,
"columns"
:
[
{
"data"
:
"numero"
},
{
"data"
:
"nombres"
},
{
"data"
:
"sede"
},
{
"data"
:
"horario"
},
{
"data"
:
"tipo_horario"
,
"className"
:
"text-center"
,
render
:
(
data
)
=>
{
let
label
=
''
;
switch
(
data
){
case
"REGULAR"
:
label
=
`label bg-slate border-slate-700`
;
break
;
}
return
`<span class="
${
label
}
">
${
data
}
</span>`
;
}
},
{
"data"
:
"fecha_entrada"
,
"className"
:
'text-center'
},
{
"data"
:
"marcacion_entrada"
,
"className"
:
'text-center'
},
{
"data"
:
"marcacion_salida"
,
"className"
:
'text-center'
},
{
"data"
:
"fecha_salida"
,
"className"
:
'text-center'
},
],
rowsGroup
:
[
1
,
2
,
3
,
4
],
fnInitComplete
:
function
(
settings
,
data
)
{
console
.
log
(
data
);
}
});
}
$
(
function
()
{
$
(
"#dpFechaInicio"
).
datepicker
({
minDate
:
new
Date
(
2000
,
1
-
1
,
1
),
maxDate
:
new
Date
(),
...
...
@@ -24,4 +111,8 @@ $(function () {
}
});
$
(
"#dpFechaFin"
).
datepicker
(
'setDate'
,
'now'
);
defaultConfigDataTable
();
initializeData
();
$
(
"#btnVistaPrevia"
).
click
(
mostrarVistaPrevia
);
});
\ No newline at end of file
src/main/webapp/vistas/cierreAsistenciaPolicias.jsp
0 → 100644
View file @
76e42fb4
<
%@
include
file=
"templates/validar.jsp"
%
>
<
%@
page
contentType=
"text/html"
pageEncoding=
"UTF-8"
%
>
<!DOCTYPE html>
<html>
<head>
<
%@
include
file=
"templates/header.jsp"
%
>
<!--template-core-->
<!--css de la pagina-->
<!--css-->
</head>
<body>
<
%@
include
file=
"templates/header-body.jsp"
%
>
<!-- content -->
<!-- / content -->
<
%@
include
file=
"templates/footer-body.jsp"
%
>
<!--js de la pagina-->
<!--js-->
</body>
</html>
\ No newline at end of file
src/main/webapp/vistas/proyectarAsistenciaPolicias.jsp
View file @
76e42fb4
...
...
@@ -68,122 +68,6 @@
</thead>
<tbody>
<tr>
<td
class=
"text-center"
rowspan=
"3"
>
1
</td>
<td
class=
"text-center"
rowspan=
"3"
>
DELGADO CHOZO JUAN FRANCISCO
</td>
<td
class=
"text-center"
rowspan=
"3"
>
CANTA CALLAO 2
</td>
<td
class=
"text-center"
rowspan=
"3"
>
07:00 - 17:00
</td>
<td
class=
"text-center"
rowspan=
"3"
>
<span
class=
"label bg-slate border-slate-700"
title=
"REGULAR"
>
REGULAR
</span>
</td>
<td
class=
"text-center"
>
2018-06-15
</td>
<td
class=
"text-center"
>
6:59
</td>
<td
class=
"text-center"
>
0:0
</td>
<td
class=
"text-center"
>
2018-06-15
</td>
</tr>
<tr>
<td
class=
"text-center"
>
2018-06-16
</td>
<td
class=
"text-center"
>
6:47
</td>
<td
class=
"text-center"
>
0:0
</td>
<td
class=
"text-center"
>
2018-06-16
</td>
</tr>
<tr>
<td
class=
"text-center"
>
2018-06-17
</td>
<td
class=
"text-center"
>
6:46
</td>
<td
class=
"text-center"
>
0:0
</td>
<td
class=
"text-center"
>
2018-06-17
</td>
</tr>
<tr>
<td
class=
"text-center"
rowspan=
"2"
>
2
</td>
<td
class=
"text-center"
rowspan=
"2"
>
APONTE JAIME SEGUNDO FRANCISCO
</td>
<td
class=
"text-center"
rowspan=
"2"
>
CUBA
</td>
<td
class=
"text-center"
rowspan=
"2"
>
07:00 - 17:00
</td>
<td
class=
"text-center"
rowspan=
"2"
>
<span
class=
"label bg-slate border-slate-700"
title=
"REGULAR"
>
REGULAR
</span>
</td>
<td
class=
"text-center"
>
2018-06-15
</td>
<td
class=
"text-center"
>
7:8
</td>
<td
class=
"text-center"
>
6:30
</td>
<td
class=
"text-center"
>
2018-06-15
</td>
</tr>
<tr>
<td
class=
"text-center"
>
2018-06-17
</td>
<td
class=
"text-center"
>
7:9
</td>
<td
class=
"text-center"
>
7:31
</td>
<td
class=
"text-center"
>
2018-06-17
</td>
</tr>
<tr>
<td
class=
"text-center"
>
3
</td>
<td
class=
"text-center"
>
GARCIA TORRES DAVID
</td>
<td
class=
"text-center"
>
PUEBLO LIBRE
</td>
<td
class=
"text-center"
>
07:00 - 17:00
</td>
<td
class=
"text-center"
>
<span
class=
"label bg-slate border-slate-700"
title=
"REGULAR"
>
REGULAR
</span>
</td>
<td
class=
"text-center"
>
2018-06-15
</td>
<td
class=
"text-center"
>
7:19
</td>
<td
class=
"text-center"
>
20:0
</td>
<td
class=
"text-center"
>
2018-06-15
</td>
</tr>
<tr>
<td
class=
"text-center"
>
4
</td>
<td
class=
"text-center"
>
VERA GUEVARA HUGO
</td>
<td
class=
"text-center"
>
BARRANCO
</td>
<td
class=
"text-center"
>
07:00 - 17:00
</td>
<td
class=
"text-center"
>
<span
class=
"label bg-slate border-slate-700"
title=
"REGULAR"
>
REGULAR
</span>
</td>
<td
class=
"text-center"
>
2018-06-16
</td>
<td
class=
"text-center"
>
7:37
</td>
<td
class=
"text-center"
>
14:33
</td>
<td
class=
"text-center"
>
2018-06-16
</td>
</tr>
<tr>
<td
class=
"text-center"
rowspan=
"2"
>
5
</td>
<td
class=
"text-center"
rowspan=
"2"
>
MENDOZA RAMIREZ JORGE
</td>
<td
class=
"text-center"
rowspan=
"2"
>
SAN LUIS
</td>
<td
class=
"text-center"
rowspan=
"2"
>
07:00 - 17:00
</td>
<td
class=
"text-center"
rowspan=
"2"
>
<span
class=
"label bg-slate border-slate-700"
title=
"REGULAR"
>
REGULAR
</span>
</td>
<td
class=
"text-center"
>
2018-06-15
</td>
<td
class=
"text-center"
>
6:48
</td>
<td
class=
"text-center"
>
17:0
</td>
<td
class=
"text-center"
>
2018-06-15
</td>
</tr>
<tr>
<td
class=
"text-center"
>
2018-06-16
</td>
<td
class=
"text-center"
>
6:47
</td>
<td
class=
"text-center"
>
14:2
</td>
<td
class=
"text-center"
>
2018-06-16
</td>
</tr>
<tr>
<td
class=
"text-center"
rowspan=
"3"
>
6
</td>
<td
class=
"text-center"
rowspan=
"3"
>
GUERRERO VELASCO LUIS SEGUNDO
</td>
<td
class=
"text-center"
rowspan=
"3"
>
ROSALES
</td>
<td
class=
"text-center"
rowspan=
"2"
>
07:00 - 17:00
</td>
<td
class=
"text-center"
rowspan=
"3"
>
<span
class=
"label bg-slate border-slate-700"
title=
"REGULAR"
>
REGULAR
</span>
</td>
<td
class=
"text-center"
>
2018-06-15
</td>
<td
class=
"text-center"
>
6:46
</td>
<td
class=
"text-center"
>
6:30
</td>
<td
class=
"text-center"
>
2018-06-15
</td>
</tr>
<tr>
<td
class=
"text-center"
>
2018-06-16
</td>
<td
class=
"text-center"
>
6:56
</td>
<td
class=
"text-center"
>
15:22
</td>
<td
class=
"text-center"
>
2018-06-16
</td>
</tr>
<tr>
<td
class=
"text-center"
>
07:00 - 14:00
</td>
<td
class=
"text-center"
>
2018-06-17
</td>
<td
class=
"text-center"
>
7:14
</td>
<td
class=
"text-center"
>
6:26
</td>
<td
class=
"text-center"
>
2018-06-17
</td>
</tr>
</tbody>
</table>
</div>
...
...
@@ -202,6 +86,8 @@
<script
type=
"text/javascript"
src=
"../plantilla/assets/js/plugins/pickers/daterangepicker.js"
></script>
<script
type=
"text/javascript"
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/dataTables.rowsGroup.js"
type=
"text/javascript"
></script>
<script
src=
"../js/pages/proyectar_asistencia_policias.js"
type=
"text/javascript"
></script>
<!--js-->
...
...
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