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
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
12 additions
and
196 deletions
+12
-196
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
+0
-0
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
This diff is collapsed.
Click to expand it.
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