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
c88b36d5
Commit
c88b36d5
authored
Aug 31, 2018
by
Billy Larru
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
filtrar por rango de fechas en control de asistencia
parent
0879fead
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
16 deletions
+26
-16
general.js
src/main/webapp/js/general.js
+20
-2
control_asistencia_policias.js
src/main/webapp/js/pages/control_asistencia_policias.js
+4
-0
crearRolPolicia.js
src/main/webapp/js/pages/crearRolPolicia.js
+1
-14
controlAsistenciaPolicias.jsp
src/main/webapp/vistas/controlAsistenciaPolicias.jsp
+1
-0
No files found.
src/main/webapp/js/general.js
View file @
c88b36d5
...
...
@@ -487,7 +487,7 @@ const setSelects = (nodeIdentifier) => {
if
(
repo
.
loading
)
{
return
repo
.
text
;
}
var
markup
=
`
<div class='select2-result-repository clearfix'>
<div class='select2-result-repository__title'>
${
repo
.
nombres
}
</div>`
;
...
...
@@ -500,11 +500,28 @@ const setSelects = (nodeIdentifier) => {
return
markup
;
}
function
formatRepoSelection
(
repo
)
{
function
formatRepoSelection
(
repo
)
{
if
(
repo
.
id
)
{
return
repo
.
nombres
;
}
else
{
return
repo
.
text
;
}
}
}
const
generarFechas
=
(
desde
,
hasta
)
=>
{
let
reverseDesde
=
desde
.
split
(
"/"
).
reverse
().
join
(
"/"
);
let
reverseHasta
=
hasta
.
split
(
"/"
).
reverse
().
join
(
"/"
);
desde
=
moment
(
reverseDesde
);
hasta
=
moment
(
reverseHasta
);
let
diaActual
=
desde
;
let
fechas
=
[];
while
(
diaActual
.
isSameOrBefore
(
hasta
))
{
fechas
.
push
(
diaActual
.
format
(
'DD/MM/YYYY'
));
diaActual
.
add
(
1
,
'days'
);
}
return
fechas
;
}
\ No newline at end of file
src/main/webapp/js/pages/control_asistencia_policias.js
View file @
c88b36d5
...
...
@@ -354,11 +354,15 @@ function buscar() {
let
policia_id
=
$
(
"#cboPoliciasFiltro"
).
val
();
let
sede_id
=
$
(
"#cboSedesFiltro"
).
val
();
let
estadoAsistencia
=
$
(
"#cboEstadoAsistencia"
).
val
();
let
fechaInicio
=
$
(
"#dpFechaInicio"
).
val
();
let
fechaFin
=
$
(
"#dpFechaFin"
).
val
();
let
rangoFechas
=
generarFechas
(
fechaInicio
,
fechaFin
);
let
params
=
cleanQueryParams
({
policia_id
,
sede_id
,
fecha_entrada
:
rangoFechas
,
estado
:
estadoAsistencia
});
debugger
...
...
src/main/webapp/js/pages/crearRolPolicia.js
View file @
c88b36d5
...
...
@@ -297,20 +297,7 @@ function registrarRolPolicia() {
});
}
function
generarFechas
(
desde
,
hasta
)
{
let
reverseDesde
=
desde
.
split
(
"/"
).
reverse
().
join
(
"/"
);
let
reverseHasta
=
hasta
.
split
(
"/"
).
reverse
().
join
(
"/"
);
desde
=
moment
(
reverseDesde
);
hasta
=
moment
(
reverseHasta
);
let
diaActual
=
desde
;
let
fechas
=
[];
while
(
diaActual
.
isSameOrBefore
(
hasta
))
{
fechas
.
push
(
diaActual
.
format
(
'DD/MM/YYYY'
));
diaActual
.
add
(
1
,
'days'
);
}
return
fechas
;
}
function
cancelar
()
{
$
(
"#detalle_rol"
).
removeClass
(
"hidden"
);
...
...
src/main/webapp/vistas/controlAsistenciaPolicias.jsp
View file @
c88b36d5
...
...
@@ -362,6 +362,7 @@
<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="../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>
<script
src=
"../plantilla/assets/js/plugins/forms/selects/select2.min.js"
></script>
<script
src=
"../plantilla/assets/js/plugins/extensions/contextmenu.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