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
c206fa00
Commit
c206fa00
authored
6 years ago
by
Billy Larru
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mostrando roles en la proyeccion, se agrega boton guardar cambios
parent
c422a8ee
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
43 additions
and
25 deletions
+43
-25
crearRolPolicia.js
src/main/webapp/js/pages/crearRolPolicia.js
+32
-18
proyectar_asistencia_policias.js
src/main/webapp/js/pages/proyectar_asistencia_policias.js
+7
-6
proyectarAsistenciaPolicias.jsp
src/main/webapp/vistas/proyectarAsistenciaPolicias.jsp
+4
-1
No files found.
src/main/webapp/js/pages/crearRolPolicia.js
View file @
c206fa00
...
@@ -94,13 +94,13 @@ function listarRolesPolicias(objParams = {}) {
...
@@ -94,13 +94,13 @@ function listarRolesPolicias(objParams = {}) {
makeDatatable
({
makeDatatable
({
data
:
response
.
data
,
data
:
response
.
data
,
columns
:
columns
,
columns
,
columnDefs
:
columnDefs
,
columnDefs
,
wrapsNameDatatable
:
wrapsNameDatatable
,
wrapsNameDatatable
,
classNameForDatatable
:
classNameForDatatable
,
classNameForDatatable
,
footer
:
footer
footer
}).
then
((
nodes
)
=>
{
}).
then
((
nodes
)
=>
{
nodes
.
container
.
on
(
"click"
,
".ver-detalle"
,
function
()
{
nodes
.
container
.
o
ff
().
o
n
(
"click"
,
".ver-detalle"
,
function
()
{
let
data
=
nodes
.
datatable
.
DataTable
().
row
(
$
(
this
).
parents
(
"tr"
)).
data
();
let
data
=
nodes
.
datatable
.
DataTable
().
row
(
$
(
this
).
parents
(
"tr"
)).
data
();
console
.
log
(
data
);
console
.
log
(
data
);
...
@@ -136,10 +136,10 @@ function listarRolesPolicias(objParams = {}) {
...
@@ -136,10 +136,10 @@ function listarRolesPolicias(objParams = {}) {
}
}
function
listarTipoRoles
()
{
function
listarTipoRoles
()
{
ajaxWebService
.
get
(
URI_TIPOROL_POLICIA
).
then
((
res
ult
)
=>
{
ajaxWebService
.
get
(
URI_TIPOROL_POLICIA
).
then
((
res
ponse
)
=>
{
let
roles
=
result
.
data
;
let
tipoRoles
=
response
.
data
;
let
html
=
"<option>[SELECCIONE]</option>"
;
let
html
=
"<option>[SELECCIONE]</option>"
;
roles
.
forEach
(
rol
=>
html
+=
`<option value="
${
rol
.
codigo
}
">
${
rol
.
descripcion
}
</option>`
);
tipoRoles
.
forEach
(
tp
=>
html
+=
`<option data-hora-entrada="
${
tp
.
hora_entrada
}
" data-hora-salida="
${
tp
.
hora_salida
}
" value="
${
tp
.
codigo
}
">
${
tp
.
descripcion
}
</option>`
);
$
(
"#cboTipoRol"
).
html
(
html
);
$
(
"#cboTipoRol"
).
html
(
html
);
});
});
}
}
...
@@ -205,20 +205,34 @@ function registrarRolPolicia() {
...
@@ -205,20 +205,34 @@ function registrarRolPolicia() {
let
sede_descripcion
=
$
(
"#cboSedesModal option:selected"
).
text
();
let
sede_descripcion
=
$
(
"#cboSedesModal option:selected"
).
text
();
let
estado
=
1
;
let
estado
=
1
;
let
policia_dni
=
$
(
"#cboPolicias option:selected"
).
attr
(
"documento_identidad"
);
let
policia_dni
=
$
(
"#cboPolicias option:selected"
).
attr
(
"documento_identidad"
);
let
hora_entrada
=
$
(
"#cboTipoRol option:selected"
).
data
(
'hora-entrada'
);
let
hora_salida
=
$
(
"#cboTipoRol option:selected"
).
data
(
'hora-salida'
);
debugger
debugger
let
fechas
=
generarFechas
(
fecha_inicio
,
fecha_fin
);
let
fechas
=
generarFechas
(
fecha_inicio
,
fecha_fin
);
let
detalles_rol
=
[];
let
detalles_rol
=
[];
let
numero
=
1
;
let
numero
=
1
;
fechas
.
forEach
((
f
)
=>
{
let
detalle_rol
=
{
fechas
id
:
numero
++
,
.
map
((
f
)
=>
{
fecha_entrada
:
f
,
let
obj
=
{
fecha_salida
:
f
,
fecha_entrada
:
`
${
f
}
${
hora_entrada
}
`
,
estado
:
1
fecha_salida
:
`
${
f
}
${
hora_salida
}
`
};
}
detalles_rol
.
push
(
detalle_rol
);
});
return
obj
;
})
.
forEach
((
f
)
=>
{
debugger
let
detalle_rol
=
{
id
:
numero
++
,
fecha_entrada
:
f
.
fecha_entrada
,
fecha_salida
:
f
.
fecha_salida
,
estado
:
1
};
detalles_rol
.
push
(
detalle_rol
);
});
let
params
=
{
let
params
=
{
numeroFila
:
policia_id
,
numeroFila
:
policia_id
,
...
...
This diff is collapsed.
Click to expand it.
src/main/webapp/js/pages/proyectar_asistencia_policias.js
View file @
c206fa00
...
@@ -53,17 +53,17 @@ function defaultConfigHandsonTable() {
...
@@ -53,17 +53,17 @@ function defaultConfigHandsonTable() {
function
mostrarVistaPrevia
()
{
function
mostrarVistaPrevia
()
{
ajaxWebService
.
get
(
URI_ROL_POLICIA
).
then
((
response
)
=>
{
ajaxWebService
.
get
(
URI_ROL_POLICIA
).
then
((
response
)
=>
{
debugger
debugger
if
(
response
.
data
.
status
)
{
if
(
response
.
status
)
{
handsonTable
.
destroy
();
handsonTable
.
destroy
();
let
container
=
document
.
getElementById
(
"tblProyectado"
);
let
container
=
document
.
getElementById
(
"tblProyectado"
);
let
filas
=
[];
let
filas
=
[];
debugger
response
.
data
.
forEach
(
d
=>
{
response
.
data
.
data
.
forEach
(
d
=>
{
d
.
detalles_rol
.
forEach
(
dr
=>
{
d
.
detalles_rol
.
forEach
(
dr
=>
{
dr
.
horario
=
`
${
dr
.
fecha_entrada
.
split
(
" "
)[
1
]}
-
${
dr
.
fecha_salida
.
split
(
" "
)[
1
]}
`
;
dr
.
fecha_entrada
=
dr
.
fecha_entrada
.
split
(
" "
)[
0
];
dr
.
fecha_entrada
=
dr
.
fecha_entrada
.
split
(
" "
)[
0
];
dr
.
fecha_salida
=
dr
.
fecha_salida
.
split
(
" "
)[
0
];
dr
.
fecha_salida
=
dr
.
fecha_salida
.
split
(
" "
)[
0
];
debugger
let
objFila
=
{
let
objFila
=
{
policia_dni
:
d
.
policia_dni
,
policia_dni
:
d
.
policia_dni
,
policia_nombres
:
d
.
policia_nombres
,
policia_nombres
:
d
.
policia_nombres
,
...
@@ -71,7 +71,8 @@ function mostrarVistaPrevia() {
...
@@ -71,7 +71,8 @@ function mostrarVistaPrevia() {
fecha_salida
:
dr
.
fecha_salida
,
fecha_salida
:
dr
.
fecha_salida
,
sede_id
:
d
.
sede_id
,
sede_id
:
d
.
sede_id
,
sede_descripcion
:
d
.
sede_descripcion
,
sede_descripcion
:
d
.
sede_descripcion
,
horario
:
dr
.
horario
,
tiporol_descripcion
:
d
.
tiporol_descripcion
};
};
filas
.
push
(
objFila
);
filas
.
push
(
objFila
);
});
});
...
@@ -110,7 +111,7 @@ function mostrarVistaPrevia() {
...
@@ -110,7 +111,7 @@ function mostrarVistaPrevia() {
readOnly
:
true
readOnly
:
true
},
},
{
{
"data"
:
"tipo
_horario
"
,
"data"
:
"tipo
rol_descripcion
"
,
"className"
:
"text-center"
,
"className"
:
"text-center"
,
readOnly
:
true
readOnly
:
true
},
},
...
...
This diff is collapsed.
Click to expand it.
src/main/webapp/vistas/proyectarAsistenciaPolicias.jsp
View file @
c206fa00
...
@@ -52,7 +52,7 @@
...
@@ -52,7 +52,7 @@
</div>
</div>
<div
class=
"panel-footer"
>
<div
class=
"panel-footer"
>
<div
class=
"text-center"
>
<div
class=
"text-center"
>
<button
class=
"btn btn-primary"
id=
"btnVistaPrevia"
><i
class=
"icon-eye4"
></i>
V
ista previa
</button>
<button
class=
"btn btn-primary"
id=
"btnVistaPrevia"
><i
class=
"icon-eye4"
></i>
V
er
</button>
<!--<button class="btn btn-warning" id="btnLimpiar"><i class="fa fa-eraser"></i> Limpiar</button>-->
<!--<button class="btn btn-warning" id="btnLimpiar"><i class="fa fa-eraser"></i> Limpiar</button>-->
</div>
</div>
</div>
</div>
...
@@ -64,6 +64,9 @@
...
@@ -64,6 +64,9 @@
<div
class=
"panel panel-primary card-3"
>
<div
class=
"panel panel-primary card-3"
>
<div
class=
"panel-heading"
>
<div
class=
"panel-heading"
>
<h6
class=
"panel-title"
style=
"font-size: 15px; font-family: inherit"
><i
class=
"icon icon-search4"
></i>
ASISTENCIAS PROYECTADAS
</h6>
<h6
class=
"panel-title"
style=
"font-size: 15px; font-family: inherit"
><i
class=
"icon icon-search4"
></i>
ASISTENCIAS PROYECTADAS
</h6>
<div
class=
"heading-elements"
>
<button
type=
"button"
id=
"btnGuardarCambios"
class=
"btn bg-slate border-slate-600 btn-xs"
><i
class=
"glyphicon glyphicon-plus"
></i>
Guardar cambios
</button>
</div>
</div>
</div>
<div
id=
"tblProyectado"
>
<div
id=
"tblProyectado"
>
<!-- <table class="table table-responsive dataTable table-striped table-sm table-bordered" id="tblAsistenciaPolicias">
<!-- <table class="table table-responsive dataTable table-striped table-sm table-bordered" id="tblAsistenciaPolicias">
...
...
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