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
8e6f0395
Commit
8e6f0395
authored
Sep 01, 2018
by
Billy Larru
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avance control asistencia administrativa
parent
1282480e
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
55 additions
and
349 deletions
+55
-349
general.js
src/main/webapp/js/general.js
+7
-7
bootstrap-select.min.js
src/main/webapp/js/lib/bootstrap-select.min.js
+0
-0
comparativo_proyeccion_policias.js
src/main/webapp/js/pages/comparativo_proyeccion_policias.js
+1
-1
control_asistencia_administrativa.js
...main/webapp/js/pages/control_asistencia_administrativa.js
+2
-186
controlAsistenciaAdministrativa.jsp
src/main/webapp/vistas/controlAsistenciaAdministrativa.jsp
+43
-153
controlAsistenciaPolicias.jsp
src/main/webapp/vistas/controlAsistenciaPolicias.jsp
+1
-1
crearRolPolicia.jsp
src/main/webapp/vistas/crearRolPolicia.jsp
+1
-1
No files found.
src/main/webapp/js/general.js
View file @
8e6f0395
...
...
@@ -444,11 +444,11 @@ let initDatePicker = (...selectorName) => {
}
const
setSelects
=
(
nodeIdentifier
)
=>
{
const
initSelect2
=
(
nodeIdentifier
,
URI
,
{
id
,
title
,
subtitle
}
=
{}
)
=>
{
$
(
`
${
nodeIdentifier
}
`
).
select2
({
containerCssClass
:
'select-xs'
,
ajax
:
{
url
:
`http://sistem16:666/policias`
,
url
:
URI
,
dataType
:
`json`
,
delay
:
1000
,
data
:
function
(
params
)
{
...
...
@@ -490,10 +490,10 @@ const setSelects = (nodeIdentifier) => {
var
markup
=
`
<div class='select2-result-repository clearfix'>
<div class='select2-result-repository__title'>
${
repo
.
nombres
}
</div>`
;
<div class='select2-result-repository__title'>
${
repo
[
title
]
}
</div>`
;
markup
+=
`
<div class='select2-result-repository__statistics'>
<div class='select2-result-repository__forks'>
${
repo
.
dni
}
</div>
<div class='select2-result-repository__forks'>
${
repo
[
subtitle
]
}
</div>
</div>
</div>`
...
...
@@ -501,12 +501,12 @@ const setSelects = (nodeIdentifier) => {
}
function
formatRepoSelection
(
repo
)
{
if
(
repo
.
id
)
{
return
repo
.
nombres
;
if
(
repo
[
id
]
)
{
return
repo
[
title
]
;
}
else
{
return
repo
.
text
;
}
}
}
}
...
...
src/main/webapp/js/lib/bootstrap-select
/bootstrap-select
.min.js
→
src/main/webapp/js/lib/bootstrap-select.min.js
View file @
8e6f0395
File moved
src/main/webapp/js/pages/comparativo_proyeccion_policias.js
View file @
8e6f0395
...
...
@@ -115,7 +115,7 @@ function getColumnDefs() {
function
listarPolicias
(
selectorName
)
{
setSelects
(
selectorName
);
initSelect2
(
selectorName
,
"http://sistem16:666/policias"
,
{
title
:
"nombres"
,
subtitle
:
"dni"
}
);
}
function
verReporte
()
{
...
...
src/main/webapp/js/pages/control_asistencia_administrativa.js
View file @
8e6f0395
let
data
=
[];
function
initilizeData
()
{
// axios.get('http://172.16.2.91:3000/ServletAdministrativos/accion=listarAsistencias')
// .then(function (response) {
// // handle success
// console.log(response);
// })
// .catch(function (error) {
// // handle error
// console.log(error);
// })
// .then(function () {
// // always executed
// });
}
function
cargarDatatable
()
{
let
datos
=
data
;
let
numero
=
1
;
datos
.
forEach
(
p
=>
p
[
"numeroFila"
]
=
numero
++
);
$
(
"#tblAsistencias"
).
DataTable
().
destroy
();
$
(
"#tblAsistencias"
).
DataTable
({
"language"
:
{
"lengthMenu"
:
"Mostrar: _MENU_"
,
"zeroRecords"
:
" No se encontraron resultados"
,
"info"
:
" Mostrando del _START_ al _END_ de un total de _TOTAL_ registros"
,
"infoEmpty"
:
" Mostrando 0 de 0 registros"
,
"search"
:
"Filtrar:"
,
"loadingRecords"
:
"Cargando..."
,
"processing"
:
'<span style="width:100%;"><img src="http://www.snacklocal.com/images/ajaxload.gif"></span>'
,
"paginate"
:
{
"first"
:
"First"
,
"last"
:
"Last"
,
"next"
:
"Siguiente"
,
"previous"
:
"Anterior"
}
},
"bSort"
:
false
,
"bFilter"
:
false
,
"aaSorting"
:
[],
"ordering"
:
false
,
"bLengthChange"
:
false
,
"bInfo"
:
true
,
"paging"
:
true
,
iDisplayLength
:
25
,
bStateSave
:
false
,
autoWidth
:
false
,
responsive
:
true
,
stateSave
:
true
,
columnDefs
:
[
{
orderable
:
false
,
width
:
'5%'
,
targets
:
0
,
className
:
"text-center"
},
{
orderable
:
false
,
width
:
'25%'
,
targets
:
1
},
{
orderable
:
false
,
width
:
'15%'
,
targets
:
2
},
{
orderable
:
false
,
width
:
'10%'
,
targets
:
3
,
className
:
"text-center"
},
{
orderable
:
false
,
width
:
'10%'
,
targets
:
4
,
className
:
"text-center"
},
{
orderable
:
false
,
width
:
'10%'
,
targets
:
5
,
className
:
"text-center"
},
{
orderable
:
false
,
width
:
'8%'
,
targets
:
6
,
className
:
"text-center"
},
],
dom
:
'<"datatable-header"fl><"datatable-scroll-wrap"t><"datatable-footer"ip>'
,
"processing"
:
true
,
ajax
:
{
contentType
:
'application/json; charset=utf-8'
,
url
:
"http://172.16.2.91:3000/asistenciasPersonalAdministrativoDatatable"
,
// data: {
// busqueda: busqueda
// }
// ,
beforeSend
:
function
()
{
// cargando();
},
complete
:
function
()
{
// localStorage.removeItem("dniBuscar");
// dniBuscar=null;
// cerrar_cargando();
}
},
columns
:
[
{
data
:
"numeroFila"
,
className
:
"text-center"
},
{
data
:
"nombres"
},
{
data
:
"cargo"
},
{
data
:
"horario"
},
{
data
:
"fecha"
},
{
data
:
"hora_marcacion"
},
{
data
:
"estado"
,
className
:
"text-center"
,
render
:
(
data
)
=>
{
if
(
data
===
null
)
{
return
`<span class="label bg-purple" style="font-size: 12px">PENDIENTE</span>`
;
}
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>`
;
}
},
{
data
:
"hora_marcacion"
,
render
:
(
data
)
=>
{
if
(
data
===
null
)
{
let
html
=
`<span data-toggle="modal" data-target="#modal_entrada_pendiente" data-placement="left" title="Editar" style="cursor: pointer"> <i class='registrar icon-plus-circle2 text-success-700'></i> </span>
<span data-toggle="tooltip" data-placement="left" title="Editar" style="cursor: pointer"> <i class='editar icon-pencil text-slate-800'></i> </span>
<span data-toggle="tooltip" data-placement="left" title="Aprobar" style="cursor: pointer"> <i class='aprobar icon-checkmark-circle text-success-700'></i> </span>
<span data-toggle="tooltip" data-placement="left" title="Anular" style="cursor: pointer"> <i class='anular icon-cancel-circle2 text-danger-700'></i> </span>`
;
return
html
;
}
return
null
;
}
},
],
fnInitComplete
:
function
(
settings
,
data
)
{
$
(
'th'
).
removeClass
(
'sorting_asc'
);
// console.log(data);
}
});
}
$
().
ready
(
function
()
{
initilizeData
();
cargarDatatable
();
$
(
'.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"
});
$
(
"#dpFechaInicio"
).
datepicker
({
minDate
:
new
Date
(
2000
,
1
-
1
,
1
),
maxDate
:
new
Date
(
2018
,
6
,
31
),
dateFormat
:
'dd/mm/yy'
,
// defaultDate: new Date(),
changeMonth
:
true
,
changeYear
:
true
,
yearRange
:
'-18:0'
,
onSelect
:
function
()
{
// $(this).valid();
}
});
$
(
"#dpFechaInicio"
).
datepicker
(
'setDate'
,
'now'
);
$
(
"#dpFechaFin"
).
datepicker
({
minDate
:
new
Date
(
2000
,
1
-
1
,
1
),
maxDate
:
new
Date
(
2018
,
6
,
31
),
dateFormat
:
'dd/mm/yy'
,
defaultDate
:
new
Date
(),
changeMonth
:
true
,
changeYear
:
true
,
yearRange
:
'-18:+0'
,
onSelect
:
function
()
{
// $(this).valid();
}
});
$
(
"#dpFechaFin"
).
datepicker
(
'setDate'
,
'now'
);
});
});
\ No newline at end of file
src/main/webapp/vistas/controlAsistenciaAdministrativa.jsp
View file @
8e6f0395
...
...
@@ -6,188 +6,78 @@
<
%@
include
file=
"templates/header.jsp"
%
>
<!--template-core-->
<!--css de la pagina-->
<link
href=
"../css/lib/sweetalert2.min.css"
rel=
"stylesheet"
type=
"text/css"
/>
<!--css-->
</head>
<body>
<
%@
include
file=
"templates/header-body.jsp"
%
>
<!-- content -->
<div
class=
"col-md-6 col-md-offset-3"
>
<div
class=
"col-md-6 col-md-offset-3"
>
<div
class=
"panel panel-primary"
>
<div
class=
"panel-heading"
>
<h5
class=
"panel-title"
>
Control de Asistencia de Administrativ
os
</h5>
<h5
class=
"panel-title"
>
Filtr
os
</h5>
</div>
<form
id=
"frmAsistencia"
onsubmit=
"return false;"
autocomplete=
"off"
>
<div
class=
"panel-body"
>
<div
class=
"row"
>
<div
class=
"col-md-3 form-group"
>
<label>
Busqueda por
</label>
<select
class=
"form-control"
id=
"cboCriterio"
>
<option>
SEDE
</option>
<option>
APELLIDOS
</option>
<option>
DNI
</option>
</select>
</div>
<div
class=
"col-md-9 form-group"
>
<!-- <label>Busqueda</label>
<input type="text" class="form-control"/>-->
<div
id=
"divCriterio"
><label>
Sede
</label>
<select
class=
"form-control"
id=
"cboSedes"
>
<option>
LINCE
</option>
<option>
AREQUIPA
</option>
<option>
LINCE
</option>
<option>
MONTESORI
</option>
</select>
</div>
</div>
<div
class=
"panel-body"
>
<div
class=
"row"
>
<div
class=
"col-md-6 form-group"
>
<label>
Personal
</label>
<select
class=
"select-search form-control"
id=
"cboPersonalFiltro"
>
</select>
</div>
<div
class=
"col-md-6 form-group"
>
<label>
Sede
</label>
<select
id=
"cboSedesFiltro"
class=
"select-search form-control"
>
<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>
<input
type=
"text"
class=
"form-control"
id=
"dpFechaInicio"
name=
"dpFechaInicio"
placeholder=
"Fecha inicio …"
>
</div>
</div>
<div
class=
"col-md-6 form-group"
>
<label>
Fecha Fin
</label>
<div
class=
"input-group"
>
<span
class=
"input-group-addon"
><i
class=
"icon-calendar"
></i></span>
<input
type=
"text"
class=
"form-control"
id=
"dpFechaFin"
name=
"dpFechaFin"
placeholder=
"Fecha fin …"
>
</div>
</div>
</select>
</div>
</div>
<div
class=
"row"
>
<div
class=
"col-md-10 form-group"
>
<label>
Estado
</label>
<select
class=
"selectpicker form-control"
name=
"cboSedes"
id=
"cboSedes"
multiple
>
<option>
PENDIENTE
</option>
<option>
FCA
</option>
<option>
FSA
</option>
<option>
TEMPRANO
</option>
<option>
TARDANZA
</option>
<option>
NO MARCÓ
</option>
</select>
<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>
<input
type=
"text"
class=
"form-control"
name=
"dpFechaInicio"
id=
"dpFechaInicio"
>
</div>
</div>
</div
>
<div
class=
"panel-footer
"
>
<div
class=
"text-center"
>
<button
class=
"btn btn-primary"
id=
"btnBuscar"
><i
class=
"fa fa-search"
></i>
Buscar
</button>
<
button
class=
"btn btn-warning"
id=
"btnLimpiar"
><i
class=
"fa fa-eraser"
></i>
Limpiar
</button
>
<div
class=
"col-md-6 form-group"
>
<label>
Fecha Fin
</label
>
<div
class=
"input-group
"
>
<span
class=
"input-group-addon"
><i
class=
"icon-calendar"
></i></span
>
<input
type=
"text"
class=
"form-control"
name=
"dpFechaFin"
id=
"dpFechaFin"
>
<
/div
>
</div>
</div>
</form>
</div>
</div>
<div
class=
"col-md-8 col-md-offset-2"
>
<div
class=
"panel panel-primary card-3"
style=
"margin-top: 30px"
>
<div
class=
"panel-heading"
style=
"padding: 8px 15px"
>
<h6
class=
"panel-title"
style=
"font-size: 15px; font-family: inherit"
><i
class=
"icon icon-search4"
></i>
LISTADO DE ASISTENCIAS
</h6>
</div>
<div>
<table
class=
"table dataTable table-striped table-hover table-sm table-bordered"
id=
"tblAsistencias"
>
<thead>
<tr>
<th>
Nº
</th>
<th>
APELLIDOS Y NOMBRES
</th>
<th>
CARGO
</th>
<th>
HORARIO
</th>
<th>
FECHA
</th>
<th>
HORA MARCACIÓN
</th>
<th>
ESTADO
</th>
<th>
ACCIONES
</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
<div
class=
"panel-footer"
>
<div
class=
"text-center"
>
<button
class=
"btn btn-primary"
id=
"btnAplicarFiltro"
><i
class=
"icon-eye4"
></i>
Aplicar filtro
</button>
<button
class=
"btn btn-primary"
id=
"btnMostrarTodo"
><i
class=
"icon-eye4"
></i>
Mostrar Todo
</button>
</div>
</div>
</div>
</div>
<div
id=
"modal_entrada_pendiente"
class=
"modal fade"
>
<div
class=
"modal-dialog modal-sm"
>
<div
class=
"modal-content"
>
<div
class=
"modal-header bg-primary"
>
<h5
class=
"modal-title"
>
Registrar Asistencia
</h5>
</div>
<div
class=
"modal-body"
>
<div>
<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=
"12/08/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"
>
ACUÑA LAZO CYNTHYA ESTEFANI
</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>
</div>
</div>
<div
class=
"modal-footer text-center"
>
<button
class=
"btn btn-success"
id=
"btnGuardarCambios"
data-dismiss=
"modal"
><i
class=
"fa fa-search"
></i>
Guardar Cambios
</button>
<button
type=
"button"
class=
"btn btn-warning"
id=
"btnCancelar"
data-dismiss=
"modal"
><i
class=
"fa fa-eraser"
></i>
Cancelar
</button>
</div>
</div>
</div>
</div>
<div
class=
"col-md-10 col-md-offset-1"
>
<div
class=
"panel panel-primary card-3"
style=
"margin-top: 30px"
>
<div
class=
"panel-heading"
style=
"padding: 8px 15px"
>
<h6
class=
"panel-title"
style=
"font-size: 15px; font-family: inherit"
>
LISTADO DE ASISTENCIAS ADMINISTRATIVAS
</h6>
</div>
<div
id=
"divDatatable"
></div>
</div>
</div>
<!-- / content -->
<
%@
include
file=
"templates/footer-body.jsp"
%
>
<!--js de la pagina-->
<script
src=
"../plantilla/assets/js/plugins/tables/datatables/datatables.min.js"
type=
"text/javascript"
></script>
<script
src=
"../plantilla/assets/js/plugins/ui/moment/moment.min.js"
type=
"text/javascript"
></script>
<script
src=
"../plantilla/assets/js/plugins/pickers/daterangepicker.js"
type=
"text/javascript"
></script>
<script
src=
"../plantilla/assets/js/core/libraries/jquery_ui/widgets.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/ui/moment/moment.min.js"
type=
"text/javascript"
></script>
<script
src=
"../plantilla/assets/js/plugins/pickers/datepicker.js"
type=
"text/javascript"
></script>
<script
src=
"../js/lib/bootstrap-select.min.js"
type=
"text/javascript"
></script>
<script
src=
"../js/lib/lodash.js"
type=
"text/javascript"
></script>
<script
src=
"../js/lib/axios
.min.js"
type=
"text/javascript"
></script>
<script
src=
"../js/lib/sweetalert2
.min.js"
type=
"text/javascript"
></script>
<script
src=
"../js/pages/control_asistencia_administrativa.js"
type=
"text/javascript"
></script>
<!--js-->
...
...
src/main/webapp/vistas/controlAsistenciaPolicias.jsp
View file @
8e6f0395
...
...
@@ -360,7 +360,7 @@
<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=
"../js/lib/bootstrap-select
/bootstrap-select
.min.js"
type=
"text/javascript"
></script>
<script
src=
"../js/lib/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/ui/moment/moment.min.js"
></script>
<script
src=
"../plantilla/assets/js/plugins/pickers/daterangepicker.js"
></script>
...
...
src/main/webapp/vistas/crearRolPolicia.jsp
View file @
8e6f0395
...
...
@@ -880,7 +880,7 @@
<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=
"../js/lib/bootstrap-select
/bootstrap-select
.min.js"
></script>
<script
src=
"../js/lib/bootstrap-select.min.js"
></script>
<script
src=
"../plantilla/assets/js/plugins/forms/selects/select2.min.js"
></script>
...
...
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