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
64b8ca7a
Commit
64b8ca7a
authored
Aug 22, 2018
by
Billy Larru
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
trabajando modal de registro de asistencia en control de asistencia
parent
2ad48978
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
31 additions
and
147 deletions
+31
-147
control_asistencia_policias.js
src/main/webapp/js/pages/control_asistencia_policias.js
+18
-102
controlAsistenciaPolicias.jsp
src/main/webapp/vistas/controlAsistenciaPolicias.jsp
+1
-0
helperHeader.jsp
src/main/webapp/vistas/modals/helperHeader.jsp
+11
-0
registrarAsistencia.jsp
...modals/policias/controlAsistencia/registrarAsistencia.jsp
+1
-8
registrarAsistencia.jspf
...odals/policias/controlAsistencia/registrarAsistencia.jspf
+0
-37
No files found.
src/main/webapp/js/pages/control_asistencia_policias.js
View file @
64b8ca7a
...
@@ -2,10 +2,8 @@ let asistencias = [], sedes = [];
...
@@ -2,10 +2,8 @@ let asistencias = [], sedes = [];
let
htmlSedes
;
let
htmlSedes
;
function
listarAsistencias
(
objParams
=
{})
{
function
listarAsistencias
(
objParams
=
{})
{
debugger
axios
.
get
(
URI_POLICIAS_ASISTENCIA
,
objParams
).
then
((
response
)
=>
{
axios
.
get
(
URI_POLICIAS_ASISTENCIA
,
objParams
).
then
((
response
)
=>
{
response
.
data
=
formatResponse
(
response
);
response
.
data
=
formatResponse
(
response
);
debugger
let
columns
=
[
let
columns
=
[
{
{
title
:
`N°`
,
title
:
`N°`
,
...
@@ -204,7 +202,7 @@ function listarAsistencias(objParams = {}) {
...
@@ -204,7 +202,7 @@ function listarAsistencias(objParams = {}) {
let
data
=
$
(
datatable
).
DataTable
().
row
(
$
(
this
).
parents
(
"tr"
)).
data
();
let
data
=
$
(
datatable
).
DataTable
().
row
(
$
(
this
).
parents
(
"tr"
)).
data
();
console
.
log
(
data
);
console
.
log
(
data
);
axios
.
get
(
"modals/policias/controlAsistencia/registrarAsistencia.jsp
f
"
).
then
((
response
)
=>
{
axios
.
get
(
"modals/policias/controlAsistencia/registrarAsistencia.jsp"
).
then
((
response
)
=>
{
debugger
debugger
swal
({
swal
({
title
:
'<strong>Registrar Asistencia</strong>'
,
title
:
'<strong>Registrar Asistencia</strong>'
,
...
@@ -218,13 +216,20 @@ function listarAsistencias(objParams = {}) {
...
@@ -218,13 +216,20 @@ function listarAsistencias(objParams = {}) {
cancelButtonAriaLabel
:
'Thumbs down'
,
cancelButtonAriaLabel
:
'Thumbs down'
,
width
:
'30%'
,
width
:
'30%'
,
onOpen
:
()
=>
{
onOpen
:
()
=>
{
// $("#spanNombres").html(data.policia_nombres);
$
(
"#spanNombres"
).
html
(
data
.
policia_nombres
);
// $("#spanSede").html(data.sede_descripcion);
$
(
"#dpAsistencia"
).
datepicker
({
// $("#spanHorario").html(`${data.tiporol_descripcion} ${data.frecuencia_descripcion}`);
minDate
:
new
Date
(
2000
,
1
-
1
,
1
),
maxDate
:
new
Date
(),
// $("#spanRangoFechas").html(`${data.fecha_inicio} - ${data.fecha_fin}`);
dateFormat
:
'dd/mm/yy'
,
// let htmlList = ``;
setDate
:
'now'
,
// data.detalles_rol.forEach(x => htmlList += `<li class="list-group-item" id="${x.id}">${x.fecha_entrada}</li>`);
changeMonth
:
true
,
// $("#listaDias").html(htmlList);
changeYear
:
true
,
yearRange
:
'-18:+0'
,
onSelect
:
function
()
{
// $(this).valid();
}
});
$
(
"#dpAsistencia"
).
datepicker
(
'setDate'
,
data
.
fecha_entrada
);
$
(
"#cboTipoRegistro"
).
change
(
cambioTipoRegistro
);
}
}
});
});
});
});
...
@@ -277,94 +282,6 @@ function listarEstadoAsistencia() {
...
@@ -277,94 +282,6 @@ function listarEstadoAsistencia() {
});
});
}
}
function
buscar
()
{
let
criterio
=
$
(
"#cboCriterio"
).
val
();
let
busqueda
=
$
(
"#busqueda"
);
let
fechaInicio
=
$
(
"#dpFechaInicio"
).
val
();
let
fechaFin
=
$
(
"#dpFechaFin"
).
val
();
let
estadoAsistencia
=
$
(
"#cboEstados"
);
$
(
"#tblAsistenciaPolicias"
).
DataTable
().
destroy
();
$
(
"#tblAsistenciaPolicias"
).
DataTable
({
iDisplayLength
:
5
,
bStateSave
:
false
,
autoWidth
:
false
,
responsive
:
true
,
stateSave
:
true
,
columnDefs
:
[{
orderable
:
false
,
width
:
'100px'
,
targets
:
[
8
]
}],
dom
:
'<"datatable-header"fl><"datatable-scroll-wrap"t><"datatable-footer"ip>'
,
"processing"
:
true
,
"serverSide"
:
false
,
"data"
:
asistencias
,
"columns"
:
[{
"data"
:
"fila"
},
{
"data"
:
"nombres"
},
{
"data"
:
"dni"
},
// {"data": "sede"},
{
"data"
:
"area"
},
{
"data"
:
"cargo"
},
{
"data"
:
"fecha_asistencia"
,
"className"
:
'text-center'
},
{
"data"
:
"hora_ingreso"
,
"className"
:
'text-center'
},
{
"data"
:
"hora_salida"
,
"className"
:
'text-center'
},
{
"data"
:
"observacion"
,
"className"
:
'text-center'
,
render
:
function
(
data
)
{
let
label
=
''
;
let
obs
=
[
''
,
'Asistió'
,
'No marcó'
,
'Falta con aviso'
,
'Falta sin aviso'
,
'Tardanza'
,
'Vacaciones'
,
'Feriado'
,
'LSGH'
,
'LCGH'
];
debugger
switch
(
data
)
{
case
"1"
:
//Asistió
label
=
"label label-success"
;
break
;
case
"2"
:
//No marco
label
=
'label label-info'
;
break
;
case
"3"
:
//'Falta con aviso'
case
"4"
:
//'Falta sin aviso'
label
=
'label label-danger'
;
break
;
case
"5"
:
//'Tardanza'
label
=
'label label-warning'
;
break
;
case
"6"
:
//'Vacaciones'
case
"7"
:
//'Feriado'
case
"8"
:
//'LSGH'
case
"9"
:
//'LCGH'
label
=
'label label-primary'
;
break
;
default
:
label
=
'label label-default'
;
}
debugger
console
.
log
(
label
);
return
`<span class="
${
label
}
" style="font-size: 12px">
${
obs
[
data
]}
</span>`
;
}
}
],
fnInitComplete
:
function
(
settings
,
data
)
{
console
.
log
(
data
);
}
});
}
function
seleccionCriterio
()
{
function
seleccionCriterio
()
{
$
(
"#cboCriterio"
).
change
(
function
()
{
$
(
"#cboCriterio"
).
change
(
function
()
{
let
criterio
=
$
(
this
).
val
();
let
criterio
=
$
(
this
).
val
();
...
@@ -396,7 +313,8 @@ function seleccionCriterio() {
...
@@ -396,7 +313,8 @@ function seleccionCriterio() {
function
evtChange
()
{
function
cambioTipoRegistro
()
{
debugger
let
criterio
=
$
(
this
).
val
();
let
criterio
=
$
(
this
).
val
();
console
.
log
(
criterio
);
console
.
log
(
criterio
);
if
(
criterio
==
0
)
{
if
(
criterio
==
0
)
{
...
@@ -466,6 +384,7 @@ function buscarAsistencias() {
...
@@ -466,6 +384,7 @@ function buscarAsistencias() {
}
}
$
().
ready
(
function
()
{
$
().
ready
(
function
()
{
defaultConfigDatePicker
();
listarEstadoAsistencia
();
listarEstadoAsistencia
();
listarPolicias
(
"#cboPoliciasFiltro"
);
listarPolicias
(
"#cboPoliciasFiltro"
);
listarSedes
(
"#cboSedesFiltro"
);
listarSedes
(
"#cboSedesFiltro"
);
...
@@ -508,11 +427,8 @@ $().ready(function () {
...
@@ -508,11 +427,8 @@ $().ready(function () {
});
});
$
(
"#dpFechaFin"
).
datepicker
(
'setDate'
,
'now'
);
$
(
"#dpFechaFin"
).
datepicker
(
'setDate'
,
'now'
);
$
(
"#cboTipoAsistencia"
).
change
(
evtChange
);
defaultConfigDatePicker
();
seleccionCriterio
();
seleccionCriterio
();
$
(
"#btnVerTodos"
).
click
(
listarAsistencias
);
$
(
"#btnVerTodos"
).
click
(
listarAsistencias
);
$
(
"#btnVerAsistencias"
).
click
(
buscarAsistencias
);
$
(
"#btnVerAsistencias"
).
click
(
buscarAsistencias
);
...
...
src/main/webapp/vistas/controlAsistenciaPolicias.jsp
View file @
64b8ca7a
...
@@ -362,6 +362,7 @@
...
@@ -362,6 +362,7 @@
<script
src=
"../plantilla/assets/js/core/libraries/jquery_ui/interactions.min.js"
></script>
<script
src=
"../plantilla/assets/js/core/libraries/jquery_ui/interactions.min.js"
></script>
<script
src=
"../plantilla/assets/js/core/libraries/jquery_ui/widgets.min.js"
></script>
<script
src=
"../plantilla/assets/js/core/libraries/jquery_ui/widgets.min.js"
></script>
<script
src=
"../js/lib/bootstrap-select/bootstrap-select.min.js"
type=
"text/javascript"
></script>
<script
src=
"../js/lib/bootstrap-select/bootstrap-select.min.js"
type=
"text/javascript"
></script>
<!--<script src="../plantilla/assets/js/plugins/pickers/datepicker.js" type="text/javascript"></script>-->
<script
src=
"../plantilla/assets/js/plugins/pickers/daterangepicker.js"
></script>
<script
src=
"../plantilla/assets/js/plugins/pickers/daterangepicker.js"
></script>
<script
src=
"../plantilla/assets/js/plugins/forms/selects/select2.min.js"
></script>
<script
src=
"../plantilla/assets/js/plugins/forms/selects/select2.min.js"
></script>
<script
src=
"../plantilla/assets/js/plugins/extensions/contextmenu.js"
></script>
<script
src=
"../plantilla/assets/js/plugins/extensions/contextmenu.js"
></script>
...
...
src/main/webapp/vistas/modals/helperHeader.jsp
0 → 100644
View file @
64b8ca7a
<link href="https://fonts.googleapis.com/css?family=Roboto:400,300,100,500,700,900" rel="stylesheet" type="text/css">
<link href="${pageContext.request.contextPath}/plantilla/assets/css/icons/icomoon/styles.css" rel="stylesheet" type="text/css">
<link href="${pageContext.request.contextPath}/plantilla/assets/css/icons/fontawesome/styles.min.css" rel="stylesheet" type="text/css">
<link href="${pageContext.request.contextPath}/plantilla/assets/css/bootstrap.css" rel="stylesheet" type="text/css">
<link href="${pageContext.request.contextPath}/plantilla/assets/css/core.css" rel="stylesheet" type="text/css">
<link href="${pageContext.request.contextPath}/plantilla/assets/css/components.css" rel="stylesheet" type="text/css">
<link href="${pageContext.request.contextPath}/plantilla/assets/css/colors.css" rel="stylesheet" type="text/css">
<link href="${pageContext.request.contextPath}/css/general.css" rel="stylesheet" type="text/css"/>
<!--<link href="${pageContext.request.contextPath}/num/num.css" rel="stylesheet" type="text/css"/>-->
<!-- /global stylesheets -->
<script src="${pageContext.request.contextPath}/js/lib/cookies.js" type="text/javascript"></script>
src/main/webapp/vistas/modals/policias/controlAsistencia/registrarAsistencia.jsp
View file @
64b8ca7a
<link href="https://fonts.googleapis.com/css?family=Roboto:400,300,100,500,700,900" rel="stylesheet" type="text/css">
<%--<jsp:include page="/vistas/modals/helperHeader.jsp"/>--%>
<link href="../plantilla/assets/css/icons/icomoon/styles.css" rel="stylesheet" type="text/css">
<link href="../plantilla/assets/css/icons/fontawesome/styles.min.css" rel="stylesheet" type="text/css">
<link href="../plantilla/assets/css/bootstrap.css" rel="stylesheet" type="text/css">
<link href="../plantilla/assets/css/core.css" rel="stylesheet" type="text/css">
<link href="../plantilla/assets/css/components.css" rel="stylesheet" type="text/css">
<link href="../plantilla/assets/css/colors.css" rel="stylesheet" type="text/css">
<link href="../css/general.css" rel="stylesheet" type="text/css"/>
<div class="row">
<div class="row">
<div class="form-group col-md-12">
<div class="form-group col-md-12">
<label>Fecha de asistencia</label>
<label>Fecha de asistencia</label>
...
...
src/main/webapp/vistas/modals/policias/controlAsistencia/registrarAsistencia.jspf
deleted
100644 → 0
View file @
2ad48978
<div class="row">
<div class="form-group col-md-12">
<label>Fecha de asistencia</label>
<div class="input-group">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
<input class="datepicker form-control" type="text" id="txtFechaAsistencia" value="26/06/2018" disabled>
</div>
</div>
</div>
<div class="row">
<div class="form-group col-md-12">
<label>Policia</label>
<span class="label label-left border-left-primary label-striped form-control">DEZA CORREA OSCAR MIGUEL</span>
</div>
</div>
<div class="row">
<div class="form-group col-md-12">
<label style="font-size: small">
Tipo de registro:
</label>
<span class="text-danger"> (*)</span>
<select id="cboTipoAsistencia" class="form-control">
<option value="0">[SELECCIONE]</option>
<option value="1">Registro Autorizado</option>
<option value="3">Falta con Aviso</option>
<option value="4">Falta sin Aviso</option>
</select>
</div>
</div>
<div class="row" id="divFiltro">
</div>
\ No newline at end of file
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