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
8971d075
Commit
8971d075
authored
6 years ago
by
Billy Larru
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
listando asistencia de policias
parent
b893705d
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
163 additions
and
48 deletions
+163
-48
general.js
src/main/webapp/js/general.js
+1
-0
control_asistencia_policias.js
src/main/webapp/js/pages/control_asistencia_policias.js
+162
-48
controlAsistenciaPolicias.jsp
src/main/webapp/vistas/controlAsistenciaPolicias.jsp
+0
-0
No files found.
src/main/webapp/js/general.js
View file @
8971d075
...
...
@@ -17,6 +17,7 @@ const URI_SEDES = "http://172.16.2.91:666/sedes";
const
URI_ESTADO_ASISTENCIA
=
"http://172.16.2.91:666/estadoAsistencia"
;
const
URI_POLICIAS
=
"http://172.16.2.91:666/policias"
;
const
URI_ROL_POLICIA
=
"http://172.16.2.91:666/rolesPolicias"
;
const
URI_POLICIAS_ASISTENCIA
=
"http://sistem16:666/asistenciaPolicias"
;
//</editor-fold>
...
...
This diff is collapsed.
Click to expand it.
src/main/webapp/js/pages/control_asistencia_policias.js
View file @
8971d075
...
...
@@ -5,49 +5,168 @@ function init() {
listarEstadoAsistencia
();
}
//function listarSedes() {
//
// if (Object.is(htmlSedes, undefined)) {
// axios.get(URI_LISTAR_SEDES).then((result) => {
// debugger
// let sedes = result.data;
// htmlSedes = `<label>Sede</label>
// <select class="selectpicker form-control" name="busqueda" id="busqueda" multiple>`;
// sedes.forEach((s) => {
// htmlSedes += `<option value="${s.codigo}">${s.descripcion}</option>`;
// });
// htmlSedes += `</select>`;
// debugger
// $('#divCriterio').html(htmlSedes);
// $('.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"
// });
//
// }).catch((error) => {
// console.log(error);
// });
// } else {
// $('#divCriterio').html(htmlSedes);
// $('.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"
// });
// }
//
//}
function
listarAsistencias
(
objParams
=
{})
{
axios
.
get
(
URI_POLICIAS_ASISTENCIA
,
objParams
).
then
((
response
)
=>
{
response
.
data
=
formatResponse
(
response
);
debugger
let
columns
=
[
{
title
:
`N°`
,
data
:
`id`
},
{
title
:
`APELLIDOS Y NOMBRES`
,
data
:
`policia_nombres`
},
{
title
:
`SEDE`
,
data
:
`sede_descripcion`
},
{
title
:
`HORARIO`
,
data
:
`horario`
},
{
title
:
`TIPO`
,
data
:
`tiporol_descripcion`
},
{
title
:
`FRECUENCIA`
,
data
:
`frecuencia_descripcion`
},
{
title
:
`FECHA ENTRADA`
,
data
:
`fecha_entrada`
},
{
title
:
`MARC. ENTRADA`
,
data
:
null
,
render
:
data
=>
{
let
clase
=
""
;
if
(
data
.
marcacion_entrada
===
null
)
{
return
null
;
}
if
(
data
.
huella_entrada
===
1
)
{
clase
=
"text-migration font-weight-bold"
;
}
else
if
(
data
.
huella_entrada
===
0
)
{
clase
=
"text-default"
;
}
return
`<span class="
${
clase
}
">
${
data
.
marcacion_entrada
}
</span>`
;
}
},
{
title
:
`MARC. SALIDA`
,
data
:
`marcacion_salida`
},
{
title
:
`FECHA SALIDA`
,
data
:
`fecha_salida`
},
{
title
:
`ESTADO`
,
data
:
null
,
render
:
(
data
)
=>
{
// if (data.marcacion_entrada == null && data.marcacion_salida == null) {
// return `<span class="label bg-purple">PENDIENTE</span>`;
// }
// else if (data.marcacion_entrada == null) {
// return `<span class="label bg-purple">ENTRADA PENDIENTE</span>`;
// } else if (data.marcacion_salida == null) {
// return `<span class="label bg-purple">SALIDA PENDIENTE</span>`;
// }
let
label
=
""
;
let
estado
=
""
;
switch
(
data
.
estado
)
{
case
1
:
label
=
"label label-success"
;
estado
=
"TEMPRANO"
;
break
;
case
2
:
label
=
"label label-warning"
;
estado
=
"TARDANZA"
;
break
;
case
3
:
label
=
"label label-danger"
;
estado
=
"FCA"
;
break
;
case
4
:
label
=
"label label-danger"
;
estado
=
"FSA"
;
break
;
case
5
:
label
=
"label label-default"
;
estado
=
"NO MARCÓ"
;
break
;
case
9
:
label
=
"label label-info"
;
estado
=
"LSGH"
;
break
;
case
10
:
label
=
"label bg-purple"
;
estado
=
"ENTRADA PENDIENTE"
;
break
;
case
11
:
label
=
"label bg-purple"
;
estado
=
"SALIDA PENDIENTE"
;
break
;
case
null
:
label
=
"label bg-purple"
;
estado
=
"PENDIENTE"
;
break
;
}
return
`<span class="
${
label
}
">
${
estado
}
</span>`
;
}
},
{
title
:
`ACCIONES`
,
data
:
null
,
render
:
(
data
)
=>
{
return
null
;
}
}
];
let
columnDefs
=
[
{
orderable
:
false
,
width
:
'5%'
,
targets
:
0
,
className
:
"text-center"
},
{
orderable
:
false
,
width
:
'5%'
,
targets
:
1
},
{
orderable
:
false
,
width
:
'30%'
,
targets
:
2
,
className
:
"text-center"
},
{
orderable
:
false
,
width
:
'7%'
,
targets
:
3
,
className
:
"text-center"
},
{
orderable
:
false
,
width
:
'7%'
,
targets
:
4
,
className
:
"text-center"
},
{
orderable
:
false
,
width
:
'10%'
,
targets
:
5
,
className
:
"text-center"
},
{
orderable
:
false
,
width
:
'8%'
,
targets
:
6
,
className
:
"text-center"
},
{
orderable
:
false
,
width
:
'8%'
,
targets
:
7
,
className
:
"text-center"
},
{
orderable
:
false
,
width
:
'8%'
,
targets
:
8
,
className
:
"text-center"
},
{
orderable
:
false
,
width
:
'8%'
,
targets
:
9
,
className
:
"text-center"
},
{
orderable
:
false
,
width
:
'8%'
,
targets
:
10
,
className
:
"text-center"
},
{
orderable
:
false
,
width
:
'8%'
,
targets
:
11
,
className
:
"text-center"
},
{
orderable
:
false
,
width
:
'8%'
,
targets
:
12
,
className
:
"text-center"
}
];
let
wrapsNameDatatable
=
`divAsistencias`
;
let
classNameForDatatable
=
`display table table-bordered`
;
let
footer
=
false
;
makeDatatable
({
data
:
response
.
data
.
data
,
columns
:
columns
,
columnDefs
:
columnDefs
,
wrapsNameDatatable
:
wrapsNameDatatable
,
classNameForDatatable
:
classNameForDatatable
,
footer
:
footer
}).
then
((
response
)
=>
{
});
});
}
function
listarSedes
(
selectorName
)
{
axios
.
get
(
URI_SEDES
).
then
((
result
)
=>
{
...
...
@@ -287,11 +406,6 @@ function evtChange() {
}
$
().
ready
(
function
()
{
listarPolicias
(
"#cboPoliciasFiltro"
);
listarSedes
(
"#cboSedesFiltro"
);
...
...
@@ -341,7 +455,7 @@ $().ready(function () {
defaultConfigDatePicker
();
seleccionCriterio
();
$
(
"#btnVerTodos"
).
click
(
listarAsistencias
);
});
This diff is collapsed.
Click to expand it.
src/main/webapp/vistas/controlAsistenciaPolicias.jsp
View file @
8971d075
This diff is collapsed.
Click to expand it.
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