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
74717651
Commit
74717651
authored
Sep 15, 2018
by
Billy Larru
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ADD justificacion, registro de justificacion]
parent
93c49878
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
796 additions
and
415 deletions
+796
-415
general.js
src/main/webapp/js/general.js
+55
-2
crear_rol_policia.js
src/main/webapp/js/pages/crear_rol_policia.js
+415
-413
mantenimiento_justificacion.js
src/main/webapp/js/pages/mantenimiento_justificacion.js
+105
-0
registroJustificacion.js
src/main/webapp/js/pages/registroJustificacion.js
+40
-0
mantenimientoJustificacion.jsp
src/main/webapp/vistas/mantenimientoJustificacion.jsp
+85
-0
registroJustificacion.jsp
src/main/webapp/vistas/registroJustificacion.jsp
+96
-0
No files found.
src/main/webapp/js/general.js
View file @
74717651
...
@@ -22,7 +22,6 @@ const ajaxModal = axios.create({
...
@@ -22,7 +22,6 @@ const ajaxModal = axios.create({
//<editor-fold> MODULO DE POLICIAS
//<editor-fold> MODULO DE POLICIAS
const
URI_TIPOROL_POLICIA
=
"tipoRolPolicias"
;
const
URI_TIPOROL_POLICIA
=
"tipoRolPolicias"
;
const
URI_FRECUENCIA_ROL_POLICIA
=
"frecuenciaRolPolicias"
;
const
URI_FRECUENCIA_ROL_POLICIA
=
"frecuenciaRolPolicias"
;
const
URI_SEDES
=
"sedes"
;
const
URI_ESTADO_ASISTENCIA
=
"estadoAsistencia"
;
const
URI_ESTADO_ASISTENCIA
=
"estadoAsistencia"
;
const
URI_POLICIAS
=
"policias"
;
const
URI_POLICIAS
=
"policias"
;
const
URI_ROL_POLICIA
=
"rolesPolicias"
;
const
URI_ROL_POLICIA
=
"rolesPolicias"
;
...
@@ -47,6 +46,8 @@ const URI_ADMINISTRATIVOS_DESCUENTO_MENSUAL = "descuentoMensualAdministrativos";
...
@@ -47,6 +46,8 @@ const URI_ADMINISTRATIVOS_DESCUENTO_MENSUAL = "descuentoMensualAdministrativos";
const
URI_ADMINISTRATIVOS_DESCUENTO_MENSUAL_DETALLADO
=
"descuentoAsistenciaAdministrativaDetallado"
;
const
URI_ADMINISTRATIVOS_DESCUENTO_MENSUAL_DETALLADO
=
"descuentoAsistenciaAdministrativaDetallado"
;
//</editor-fold>
//</editor-fold>
const
URI_SEDES
=
"sedes"
;
const
URI_JUSTIFICACION_TIPO
=
"tipoJustificacion"
//</editor-fold>
//</editor-fold>
...
@@ -445,7 +446,7 @@ const cleanQueryParams = (params = {}) => {
...
@@ -445,7 +446,7 @@ const cleanQueryParams = (params = {}) => {
return
params
;
return
params
;
}
}
le
t
initDatePicker
=
(...
selectorName
)
=>
{
cons
t
initDatePicker
=
(...
selectorName
)
=>
{
selectorName
.
forEach
(
id
=>
{
selectorName
.
forEach
(
id
=>
{
let
options
=
{
let
options
=
{
format
:
"dd/mm/yyyy"
,
format
:
"dd/mm/yyyy"
,
...
@@ -462,6 +463,58 @@ let initDatePicker = (...selectorName) => {
...
@@ -462,6 +463,58 @@ let initDatePicker = (...selectorName) => {
}
}
const
initDateRangePicker
=
(
nodeIdentifier
)
=>
{
let
options
=
{
"autoApply"
:
true
,
"locale"
:
{
"format"
:
"DD/MM/YYYY"
,
"separator"
:
" - "
,
"applyLabel"
:
"Apply"
,
"cancelLabel"
:
"Cancel"
,
"fromLabel"
:
"From"
,
"toLabel"
:
"To"
,
"customRangeLabel"
:
"Custom"
,
"weekLabel"
:
"W"
,
"daysOfWeek"
:
[
"Do"
,
"Lu"
,
"Ma"
,
"Mi"
,
"Ju"
,
"Vi"
,
"Sa"
],
"monthNames"
:
[
"Enero"
,
"Febrero"
,
"Marzo"
,
"Abril"
,
"Mayo"
,
"Junio"
,
"Julio"
,
"Agosto"
,
"Setiembre"
,
"Octubre"
,
"Noviembre"
,
"Diciembre"
],
"firstDay"
:
1
},
"startDate"
:
"17/08/2018"
,
"endDate"
:
"23/08/2018"
};
$
(
nodeIdentifier
).
daterangepicker
(
options
);
}
const
pickersNoConflict
=
()
=>
{
$
.
fn
.
datepicker
.
noConflict
=
function
()
{
$
.
fn
.
datepicker
=
old
;
return
this
;
};
}
const
initSelect2
=
(
nodeIdentifier
,
URI
,
{
title
,
subtitle
}
=
{})
=>
{
const
initSelect2
=
(
nodeIdentifier
,
URI
,
{
title
,
subtitle
}
=
{})
=>
{
$
(
`
${
nodeIdentifier
}
`
).
select2
({
$
(
`
${
nodeIdentifier
}
`
).
select2
({
containerCssClass
:
'select-xs'
,
containerCssClass
:
'select-xs'
,
...
...
src/main/webapp/js/pages/crear_rol_policia.js
View file @
74717651
function
listarRolesPolicias
(
objParams
=
{})
{
function
listarRolesPolicias
(
objParams
=
{})
{
ajaxWebService
.
get
(
URI_ROL_POLICIA
,
objParams
).
then
((
response
)
=>
{
ajaxWebService
.
get
(
URI_ROL_POLICIA
,
objParams
).
then
((
response
)
=>
{
debugger
debugger
let
columns
=
[
let
columns
=
[
{
{
title
:
`N°`
,
title
:
`N°`
,
// data: `numeroFila`
// data: `numeroFila`
data
:
`id`
data
:
`id`
},
},
{
{
title
:
`APELLIDOS Y NOMBRES`
,
title
:
`APELLIDOS Y NOMBRES`
,
data
:
`policia_nombres`
data
:
`policia_nombres`
},
},
{
{
title
:
`SEDE`
,
title
:
`SEDE`
,
data
:
`sede_descripcion`
data
:
`sede_descripcion`
},
},
{
{
title
:
`FECHA INICIO`
,
title
:
`FECHA INICIO`
,
data
:
`fecha_inicio`
data
:
`fecha_inicio`
},
},
{
{
title
:
`FECHA FIN`
,
title
:
`FECHA FIN`
,
data
:
`fecha_fin`
data
:
`fecha_fin`
},
},
{
{
title
:
`TIPO`
,
title
:
`TIPO`
,
data
:
`tiporol_descripcion`
data
:
`tiporol_descripcion`
},
},
{
{
title
:
`FRECUENCIA`
,
title
:
`FRECUENCIA`
,
data
:
`frecuencia_descripcion`
data
:
`frecuencia_descripcion`
},
},
{
{
title
:
`ESTADO`
,
title
:
`ESTADO`
,
data
:
`estado`
,
data
:
`estado`
,
render
:
(
data
)
=>
{
render
:
(
data
)
=>
{
if
(
Object
.
is
(
data
,
1
))
{
if
(
Object
.
is
(
data
,
1
))
{
return
`<span class="label label-success">ACTIVO</span>`
;
return
`<span class="label label-success">ACTIVO</span>`
;
}
else
{
}
else
{
return
`<span class="label label-danger">INACTIVO</span>`
;
return
`<span class="label label-danger">INACTIVO</span>`
;
}
}
}
}
},
},
{
{
title
:
`ACCIONES`
,
title
:
`ACCIONES`
,
data
:
`estado`
,
data
:
`estado`
,
className
:
'text-center'
,
className
:
'text-center'
,
render
:
(
data
)
=>
{
render
:
(
data
)
=>
{
let
editar
=
""
;
let
editar
=
""
;
let
eliminar
=
""
;
let
eliminar
=
""
;
let
acciones
=
""
;
let
acciones
=
""
;
console
.
log
(
data
);
console
.
log
(
data
);
if
(
data
===
1
)
{
if
(
data
===
1
)
{
editar
=
`<span data-placement="left" title="Ver detalle" data-toggle="tooltip" style="cursor: pointer"> <i class='ver-detalle icon-calendar2 text-primary-700'></i> </span>`
;
editar
=
`<span data-placement="left" title="Ver detalle" data-toggle="tooltip" style="cursor: pointer"> <i class='ver-detalle icon-calendar2 text-primary-700'></i> </span>`
;
eliminar
=
`<span data-placement="left" title="Desactivar Rol" style="cursor: pointer"> <i class="eliminar fa fa-power-off text-danger-700"></i> </span>`
;
eliminar
=
`<span data-placement="left" title="Desactivar Rol" style="cursor: pointer"> <i class="eliminar fa fa-power-off text-danger-700"></i> </span>`
;
}
else
{
}
else
{
eliminar
=
`<span data-placement="left" title="Eliminar" style="cursor: pointer"> <i class="eliminar fa fa-power-off text-success-700"></i> </span>`
;
eliminar
=
`<span data-placement="left" title="Eliminar" style="cursor: pointer"> <i class="eliminar fa fa-power-off text-success-700"></i> </span>`
;
}
}
acciones
=
editar
+
eliminar
;
acciones
=
editar
+
eliminar
;
return
acciones
;
return
acciones
;
}
}
}
}
];
];
let
columnDefs
=
[
let
columnDefs
=
[
{
orderable
:
false
,
width
:
'1%'
,
targets
:
0
,
className
:
"text-center"
},
{
orderable
:
false
,
width
:
'1%'
,
targets
:
0
,
className
:
"text-center"
},
{
orderable
:
false
,
width
:
'8%'
,
targets
:
1
},
{
orderable
:
false
,
width
:
'8%'
,
targets
:
1
},
{
orderable
:
false
,
width
:
'10%'
,
targets
:
2
,
className
:
"text-center"
},
{
orderable
:
false
,
width
:
'10%'
,
targets
:
2
,
className
:
"text-center"
},
{
orderable
:
false
,
width
:
'7%'
,
targets
:
3
,
className
:
"text-center"
},
{
orderable
:
false
,
width
:
'7%'
,
targets
:
3
,
className
:
"text-center"
},
{
orderable
:
false
,
width
:
'7%'
,
targets
:
4
,
className
:
"text-center"
},
{
orderable
:
false
,
width
:
'7%'
,
targets
:
4
,
className
:
"text-center"
},
{
orderable
:
false
,
width
:
'10%'
,
targets
:
5
,
className
:
"text-center"
},
{
orderable
:
false
,
width
:
'10%'
,
targets
:
5
,
className
:
"text-center"
},
{
orderable
:
false
,
width
:
'8%'
,
targets
:
6
,
className
:
"text-center"
},
{
orderable
:
false
,
width
:
'8%'
,
targets
:
6
,
className
:
"text-center"
},
{
orderable
:
false
,
width
:
'8%'
,
targets
:
7
,
className
:
"text-center"
}
{
orderable
:
false
,
width
:
'8%'
,
targets
:
7
,
className
:
"text-center"
}
];
];
let
wrapsNameDatatable
=
`divRoles`
;
let
wrapsNameDatatable
=
`divRoles`
;
let
classNameForDatatable
=
`display table table-bordered`
;
let
classNameForDatatable
=
`display table table-bordered`
;
makeDatatable
(
wrapsNameDatatable
,
makeDatatable
(
wrapsNameDatatable
,
{
{
data
:
response
.
data
,
data
:
response
.
data
,
columns
,
columns
,
columnDefs
,
columnDefs
,
},
},
classNameForDatatable
).
then
((
nodes
)
=>
{
classNameForDatatable
).
then
((
nodes
)
=>
{
nodes
.
container
.
off
();
nodes
.
container
.
off
();
nodes
.
container
.
on
(
"click"
,
".ver-detalle"
,
function
()
{
nodes
.
container
.
on
(
"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
);
ajaxModal
.
get
(
"policias/mantenimientoRol/detalleRol.jspf"
).
then
((
response
)
=>
{
ajaxModal
.
get
(
"policias/mantenimientoRol/detalleRol.jspf"
).
then
((
response
)
=>
{
debugger
debugger
swal
({
swal
({
title
:
'<strong>Detalle de rol</strong>'
,
title
:
'<strong>Detalle de rol</strong>'
,
html
:
response
.
data
,
html
:
response
.
data
,
showCloseButton
:
true
,
showCloseButton
:
true
,
showCancelButton
:
true
,
showCancelButton
:
true
,
focusConfirm
:
false
,
focusConfirm
:
false
,
confirmButtonText
:
'<i class="fa fa-thumbs-up"></i> Great!'
,
confirmButtonText
:
'<i class="fa fa-thumbs-up"></i> Great!'
,
confirmButtonAriaLabel
:
'Thumbs up, great!'
,
confirmButtonAriaLabel
:
'Thumbs up, great!'
,
cancelButtonText
:
'Cancelar'
,
cancelButtonText
:
'Cancelar'
,
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
);
$
(
"#spanSede"
).
html
(
data
.
sede_descripcion
);
$
(
"#spanHorario"
).
html
(
`
${
data
.
tiporol_descripcion
}
${
data
.
frecuencia_descripcion
}
`
);
$
(
"#spanHorario"
).
html
(
`
${
data
.
tiporol_descripcion
}
${
data
.
frecuencia_descripcion
}
`
);
$
(
"#spanRangoFechas"
).
html
(
`
${
data
.
fecha_inicio
}
-
${
data
.
fecha_fin
}
`
);
$
(
"#spanRangoFechas"
).
html
(
`
${
data
.
fecha_inicio
}
-
${
data
.
fecha_fin
}
`
);
let
htmlList
=
``
;
let
htmlList
=
``
;
initDateRangePicker
(
"#dpDetalleRol"
);
initDatePickerMultiDate
()
(
"#dpDetalleRol"
);
let
fechas
=
data
.
detalles_rol
.
map
(
dr
=>
dr
.
fecha_entrada
.
split
(
" "
)[
0
]);
let
fechas
=
data
.
detalles_rol
.
map
(
dr
=>
dr
.
fecha_entrada
.
split
(
" "
)[
0
]);
$
(
"#dpDetalleRol"
).
datepicker
(
"setDates"
,
fechas
);
$
(
"#dpDetalleRol"
).
datepicker
(
"setDates"
,
fechas
);
// data.detalles_rol.forEach(x => htmlList += `<li class="list-group-item" id="${x.id}">${x.fecha_entrada}</li>`);
// data.detalles_rol.forEach(x => htmlList += `<li class="list-group-item" id="${x.id}">${x.fecha_entrada}</li>`);
// $("#listaDias").html(htmlList);
// $("#listaDias").html(htmlList);
}
}
});
});
});
});
});
});
nodes
.
container
.
on
(
"click"
,
".eliminar"
,
function
()
{
nodes
.
container
.
on
(
"click"
,
".eliminar"
,
function
()
{
let
data
=
nodes
.
datatable
.
DataTable
().
row
(
$
(
this
).
parents
(
"tr"
)).
data
();
let
data
=
nodes
.
datatable
.
DataTable
().
row
(
$
(
this
).
parents
(
"tr"
)).
data
();
mostrarModalEliminacion
(
data
);
mostrarModalEliminacion
(
data
);
});
});
});
});
});
});
}
}
const
mostrarModalEliminacion
=
(
data
)
=>
{
const
mostrarModalEliminacion
=
(
data
)
=>
{
let
{
id
,
estado
}
=
data
;
let
{
id
,
estado
}
=
data
;
let
titulo
=
""
;
let
titulo
=
""
;
let
textoConfirmacion
=
""
let
textoConfirmacion
=
""
let
tituloOperacion
=
""
;
let
tituloOperacion
=
""
;
if
(
estado
)
{
if
(
estado
)
{
titulo
=
'Está seguro de eliminar el rol?'
;
titulo
=
'Está seguro de eliminar el rol?'
;
textoConfirmacion
=
'Sí, eliminar!'
;
textoConfirmacion
=
'Sí, eliminar!'
;
tituloOperacion
=
'¡Eliminado exitosamente!'
;
tituloOperacion
=
'¡Eliminado exitosamente!'
;
estado
=
0
;
estado
=
0
;
}
else
{
}
else
{
titulo
=
'Está seguro de activar?'
;
titulo
=
'Está seguro de activar?'
;
textoConfirmacion
=
'Sí, activar!'
;
textoConfirmacion
=
'Sí, activar!'
;
tituloOperacion
=
'¡Activado exitosamente!'
;
tituloOperacion
=
'¡Activado exitosamente!'
;
estado
=
1
;
estado
=
1
;
}
}
swal
({
swal
({
title
:
titulo
,
title
:
titulo
,
text
:
""
,
text
:
""
,
type
:
'warning'
,
type
:
'warning'
,
showCancelButton
:
true
,
showCancelButton
:
true
,
confirmButtonColor
:
'#3085d6'
,
confirmButtonColor
:
'#3085d6'
,
cancelButtonColor
:
'#d33'
,
cancelButtonColor
:
'#d33'
,
confirmButtonText
:
textoConfirmacion
confirmButtonText
:
textoConfirmacion
}).
then
((
result
)
=>
{
}).
then
((
result
)
=>
{
if
(
result
.
value
)
{
if
(
result
.
value
)
{
ajaxWebService
.
patch
(
`
${
URI_ROL_POLICIA
}
/
${
id
}
`
,
{
estado
}).
then
((
response
)
=>
{
ajaxWebService
.
patch
(
`
${
URI_ROL_POLICIA
}
/
${
id
}
`
,
{
estado
}).
then
((
response
)
=>
{
if
(
response
.
status
)
{
if
(
response
.
status
)
{
swal
({
swal
({
type
:
'success'
,
type
:
'success'
,
title
:
tituloOperacion
,
title
:
tituloOperacion
,
showConfirmButton
:
false
,
showConfirmButton
:
false
,
timer
:
1500
timer
:
1500
});
});
listarRolesPolicias
();
listarRolesPolicias
();
}
}
});
});
}
}
});
});
};
};
const
listarTipoRoles
=
()
=>
{
const
listarTipoRoles
=
()
=>
{
ajaxWebService
.
get
(
URI_TIPOROL_POLICIA
).
then
((
response
)
=>
{
ajaxWebService
.
get
(
URI_TIPOROL_POLICIA
).
then
((
response
)
=>
{
let
tipoRoles
=
response
.
data
;
let
tipoRoles
=
response
.
data
;
let
html
=
"<option>[SELECCIONE]</option>"
;
let
html
=
"<option>[SELECCIONE]</option>"
;
tipoRoles
.
forEach
(
tp
=>
html
+=
`<option data-hora-entrada="
${
tp
.
hora_entrada
}
" data-hora-salida="
${
tp
.
hora_salida
}
" value="
${
tp
.
codigo
}
">
${
tp
.
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
);
});
});
}
}
function
listarFrecuenciaRol
()
{
function
listarFrecuenciaRol
()
{
ajaxWebService
.
get
(
URI_FRECUENCIA_ROL_POLICIA
).
then
((
result
)
=>
{
ajaxWebService
.
get
(
URI_FRECUENCIA_ROL_POLICIA
).
then
((
result
)
=>
{
let
frecuenciasRol
=
result
.
data
;
let
frecuenciasRol
=
result
.
data
;
let
html
=
"<option>[SELECCIONE]</option>"
;
let
html
=
"<option>[SELECCIONE]</option>"
;
frecuenciasRol
.
forEach
(
f
=>
html
+=
`<option value="
${
f
.
codigo
}
">
${
f
.
descripcion
}
</option>`
);
frecuenciasRol
.
forEach
(
f
=>
html
+=
`<option value="
${
f
.
codigo
}
">
${
f
.
descripcion
}
</option>`
);
$
(
"#cboFrecuenciaRol"
).
html
(
html
);
$
(
"#cboFrecuenciaRol"
).
html
(
html
);
});
});
}
}
function
listarSedes
(
selectorName
)
{
function
listarSedes
(
selectorName
)
{
ajaxWebService
.
get
(
URI_SEDES
).
then
((
result
)
=>
{
ajaxWebService
.
get
(
URI_SEDES
).
then
((
result
)
=>
{
let
sedes
=
result
.
data
;
let
sedes
=
result
.
data
;
sedes
=
_
.
orderBy
(
sedes
,
s
=>
s
.
descripcion
);
sedes
=
_
.
orderBy
(
sedes
,
s
=>
s
.
descripcion
);
let
html
=
`<option value="">[SELECCIONE]</option>`
;
let
html
=
`<option value="">[SELECCIONE]</option>`
;
sedes
.
forEach
(
sede
=>
html
+=
`<option value="
${
sede
.
codigo
}
">
${
sede
.
descripcion
}
</option>`
);
sedes
.
forEach
(
sede
=>
html
+=
`<option value="
${
sede
.
codigo
}
">
${
sede
.
descripcion
}
</option>`
);
$
(
`
${
selectorName
}
`
).
html
(
html
);
$
(
`
${
selectorName
}
`
).
html
(
html
);
});
});
}
}
function
listarPolicias
(
selectorName
)
{
function
listarPolicias
(
selectorName
)
{
ajaxWebService
.
get
(
URI_POLICIAS
).
then
((
result
)
=>
{
ajaxWebService
.
get
(
URI_POLICIAS
).
then
((
result
)
=>
{
let
policias
=
result
.
data
;
let
policias
=
result
.
data
;
policias
=
_
.
orderBy
(
policias
,
p
=>
p
.
nombres
);
policias
=
_
.
orderBy
(
policias
,
p
=>
p
.
nombres
);
let
html
=
`<option value="">[SELECCIONE]</option>`
;
let
html
=
`<option value="">[SELECCIONE]</option>`
;
policias
.
forEach
(
p
=>
html
+=
`<option documento_identidad="
${
p
.
dni
}
" value="
${
p
.
id
}
">
${
p
.
nombres
}
</option>`
);
policias
.
forEach
(
p
=>
html
+=
`<option documento_identidad="
${
p
.
dni
}
" value="
${
p
.
id
}
">
${
p
.
nombres
}
</option>`
);
$
(
`
${
selectorName
}
`
).
html
(
html
);
$
(
`
${
selectorName
}
`
).
html
(
html
);
$
(
'.select-search'
).
select2
();
$
(
'.select-search'
).
select2
();
});
});
}
}
function
modificarServicio
()
{
function
modificarServicio
()
{
// debugger
// debugger
$
(
"#detalle_rol"
).
addClass
(
"hidden"
);
$
(
"#detalle_rol"
).
addClass
(
"hidden"
);
$
(
"#editar_rol"
).
removeClass
(
"hidden"
);
$
(
"#editar_rol"
).
removeClass
(
"hidden"
);
$
(
"#modal-title"
).
html
(
'Cambiar servicio'
);
$
(
"#modal-title"
).
html
(
'Cambiar servicio'
);
$
(
"#modal-header"
).
removeClass
(
'bg-primary'
);
$
(
"#modal-header"
).
removeClass
(
'bg-primary'
);
$
(
"#modal-header"
).
addClass
(
'bg-jade'
);
$
(
"#modal-header"
).
addClass
(
'bg-jade'
);
$
(
"#botones-editar"
).
removeClass
(
'hidden'
);
$
(
"#botones-editar"
).
removeClass
(
'hidden'
);
$
(
"#btnCerrar"
).
addClass
(
"hidden"
);
$
(
"#btnCerrar"
).
addClass
(
"hidden"
);
animar
();
animar
();
// e.preventDefault();
// e.preventDefault();
}
}
function
registrarRolPolicia
()
{
function
registrarRolPolicia
()
{
let
policia_nombres
=
$
(
"#cboPolicias option:selected"
).
text
();
let
policia_nombres
=
$
(
"#cboPolicias option:selected"
).
text
();
let
policia_id
=
$
(
"#cboPolicias"
).
val
();
let
policia_id
=
$
(
"#cboPolicias"
).
val
();
let
tiporol_id
=
$
(
"#cboTipoRol"
).
val
();
let
tiporol_id
=
$
(
"#cboTipoRol"
).
val
();
let
tiporol_descripcion
=
$
(
"#cboTipoRol option:selected"
).
text
();
let
tiporol_descripcion
=
$
(
"#cboTipoRol option:selected"
).
text
();
let
rango_fechas
=
$
(
"#dpRangoFechas"
).
val
();
let
rango_fechas
=
$
(
"#dpRangoFechas"
).
val
();
let
split_fechas
=
rango_fechas
.
split
(
"-"
).
map
(
f
=>
f
.
trim
());
let
split_fechas
=
rango_fechas
.
split
(
"-"
).
map
(
f
=>
f
.
trim
());
let
fecha_inicio
=
split_fechas
[
0
];
let
fecha_inicio
=
split_fechas
[
0
];
let
fecha_fin
=
split_fechas
[
1
];
let
fecha_fin
=
split_fechas
[
1
];
let
frecuencia_id
=
$
(
"#cboFrecuenciaRol"
).
val
();
let
frecuencia_id
=
$
(
"#cboFrecuenciaRol"
).
val
();
let
frecuencia_descripcion
=
$
(
"#cboFrecuenciaRol option:selected"
).
text
();
let
frecuencia_descripcion
=
$
(
"#cboFrecuenciaRol option:selected"
).
text
();
let
sede_id
=
$
(
"#cboSedesModal"
).
val
();
let
sede_id
=
$
(
"#cboSedesModal"
).
val
();
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_entrada
=
$
(
"#cboTipoRol option:selected"
).
data
(
'hora-entrada'
);
let
hora_salida
=
$
(
"#cboTipoRol option:selected"
).
data
(
'hora-salida'
);
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
fechas_rol
;
let
fechas_rol
;
switch
(
frecuencia_descripcion
)
{
switch
(
frecuencia_descripcion
)
{
case
"PAR"
:
case
"PAR"
:
fechas_rol
=
fechas
fechas_rol
=
fechas
.
map
(
f
=>
{
.
map
(
f
=>
{
return
{
return
{
number
:
f
.
split
(
"/"
)[
0
],
number
:
f
.
split
(
"/"
)[
0
],
fecha
:
f
fecha
:
f
}
}
})
})
.
filter
(
f
=>
f
.
number
%
2
==
0
)
.
filter
(
f
=>
f
.
number
%
2
==
0
)
.
map
(
f
=>
f
.
fecha
);
.
map
(
f
=>
f
.
fecha
);
break
;
break
;
case
"IMPAR"
:
case
"IMPAR"
:
fechas_rol
=
fechas
fechas_rol
=
fechas
.
map
(
f
=>
{
.
map
(
f
=>
{
return
{
return
{
number
:
f
.
split
(
"/"
)[
0
],
number
:
f
.
split
(
"/"
)[
0
],
fecha
:
f
fecha
:
f
}
}
})
})
.
filter
(
f
=>
f
.
number
%
2
==
1
)
.
filter
(
f
=>
f
.
number
%
2
==
1
)
.
map
(
f
=>
f
.
fecha
);
.
map
(
f
=>
f
.
fecha
);
break
;
break
;
case
"DIARIO"
:
case
"DIARIO"
:
fechas_rol
=
fechas
;
fechas_rol
=
fechas
;
break
;
break
;
}
}
let
detalles_rol
=
[];
let
detalles_rol
=
[];
let
numero
=
1
;
let
numero
=
1
;
fechas_rol
fechas_rol
.
map
((
f
)
=>
{
.
map
((
f
)
=>
{
let
obj
=
{
let
obj
=
{
fecha_entrada
:
`
${
f
}
${
hora_entrada
}
`
,
fecha_entrada
:
`
${
f
}
${
hora_entrada
}
`
,
fecha_salida
:
`
${
f
}
${
hora_salida
}
`
fecha_salida
:
`
${
f
}
${
hora_salida
}
`
}
}
return
obj
;
return
obj
;
})
})
.
forEach
((
f
)
=>
{
.
forEach
((
f
)
=>
{
debugger
debugger
let
detalle_rol
=
{
let
detalle_rol
=
{
id
:
numero
++
,
id
:
numero
++
,
fecha_entrada
:
f
.
fecha_entrada
,
fecha_entrada
:
f
.
fecha_entrada
,
fecha_salida
:
f
.
fecha_salida
,
fecha_salida
:
f
.
fecha_salida
,
estado
:
1
estado
:
1
};
};
detalles_rol
.
push
(
detalle_rol
);
detalles_rol
.
push
(
detalle_rol
);
});
});
let
params
=
{
let
params
=
{
numeroFila
:
policia_id
,
numeroFila
:
policia_id
,
policia_id
,
policia_id
,
policia_dni
,
policia_dni
,
policia_nombres
,
policia_nombres
,
sede_id
,
sede_id
,
sede_descripcion
,
sede_descripcion
,
fecha_inicio
,
fecha_inicio
,
fecha_fin
,
fecha_fin
,
tiporol_id
,
tiporol_id
,
tiporol_descripcion
,
tiporol_descripcion
,
frecuencia_id
,
frecuencia_id
,
frecuencia_descripcion
,
frecuencia_descripcion
,
detalles_rol
,
detalles_rol
,
estado
estado
};
};
ajaxWebService
.
post
(
URI_ROL_POLICIA
,
params
)
ajaxWebService
.
post
(
URI_ROL_POLICIA
,
params
)
.
then
((
response
)
=>
{
.
then
((
response
)
=>
{
debugger
;
debugger
;
if
(
response
.
status
)
{
if
(
response
.
status
)
{
swal
({
swal
({
type
:
'success'
,
type
:
'success'
,
title
:
'¡Rol registrado exitosamente!'
,
title
:
'¡Rol registrado exitosamente!'
,
showConfirmButton
:
false
,
showConfirmButton
:
false
,
timer
:
1500
timer
:
1500
})
})
listarRolesPolicias
();
listarRolesPolicias
();
console
.
log
(
response
.
data
);
console
.
log
(
response
.
data
);
}
else
{
}
else
{
}
}
})
})
.
catch
(
error
=>
{
.
catch
(
error
=>
{
console
.
log
(
error
);
console
.
log
(
error
);
});
});
}
}
function
cancelar
()
{
function
cancelar
()
{
$
(
"#detalle_rol"
).
removeClass
(
"hidden"
);
$
(
"#detalle_rol"
).
removeClass
(
"hidden"
);
$
(
"#editar_rol"
).
addClass
(
"hidden"
);
$
(
"#editar_rol"
).
addClass
(
"hidden"
);
$
(
"#modal-title"
).
html
(
'Ver detalle rol'
);
$
(
"#modal-title"
).
html
(
'Ver detalle rol'
);
$
(
"#modal-header"
).
addClass
(
'bg-primary'
);
$
(
"#modal-header"
).
addClass
(
'bg-primary'
);
$
(
"#modal-header"
).
removeClass
(
'bg-jade'
);
$
(
"#modal-header"
).
removeClass
(
'bg-jade'
);
$
(
"#botones-editar"
).
addClass
(
'hidden'
);
$
(
"#botones-editar"
).
addClass
(
'hidden'
);
$
(
"#btnCerrar"
).
removeClass
(
"hidden"
);
$
(
"#btnCerrar"
).
removeClass
(
"hidden"
);
animar
();
animar
();
}
}
function
animar
()
{
function
animar
()
{
let
animation
=
`fadeIn`
;
let
animation
=
`fadeIn`
;
$
(
"#modal_body_tombo2"
).
addClass
(
`animated
${
animation
}
`
).
one
(
"webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend"
,
function
()
{
$
(
"#modal_body_tombo2"
).
addClass
(
`animated
${
animation
}
`
).
one
(
"webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend"
,
function
()
{
$
(
this
).
removeClass
(
`animated
${
animation
}
`
);
$
(
this
).
removeClass
(
`animated
${
animation
}
`
);
});
});
}
}
function
guardarCambios
()
{
function
guardarCambios
()
{
cancelar
();
cancelar
();
$
(
"#servicio13"
).
css
(
"background-color"
,
"lightpink"
);
$
(
"#servicio13"
).
css
(
"background-color"
,
"lightpink"
);
}
}
function
mostrarModalNuevoRol
()
{
function
mostrarModalNuevoRol
()
{
ajaxModal
.
get
(
"policias/mantenimientoRol/crearRol.jspf"
).
then
((
response
)
=>
{
ajaxModal
.
get
(
"policias/mantenimientoRol/crearRol.jspf"
).
then
((
response
)
=>
{
swal
({
swal
({
title
:
'<strong>Nuevo Rol</strong>'
,
title
:
'<strong>Nuevo Rol</strong>'
,
// type: 'info',
// type: 'info',
html
:
response
.
data
,
html
:
response
.
data
,
showCloseButton
:
true
,
showCloseButton
:
true
,
showCancelButton
:
true
,
showCancelButton
:
true
,
focusConfirm
:
false
,
focusConfirm
:
false
,
confirmButtonText
:
'<i class="fa fa-thumbs-up"></i> Registrar rol'
,
confirmButtonText
:
'<i class="fa fa-thumbs-up"></i> Registrar rol'
,
confirmButtonAriaLabel
:
'Registrar rol'
,
confirmButtonAriaLabel
:
'Registrar rol'
,
cancelButtonText
:
'Cancelar'
,
cancelButtonText
:
'Cancelar'
,
cancelButtonAriaLabel
:
'Thumbs down'
,
cancelButtonAriaLabel
:
'Thumbs down'
,
width
:
'30%'
,
width
:
'30%'
,
customClass
:
'swal2-overflow'
,
customClass
:
'swal2-overflow'
,
onOpen
:
()
=>
{
onOpen
:
()
=>
{
listarTipoRoles
();
listarTipoRoles
();
listarFrecuenciaRol
();
listarFrecuenciaRol
();
listarSedes
(
"#cboSedesModal"
);
listarSedes
(
"#cboSedesModal"
);
listarPolicias
(
"#cboPolicias"
);
listarPolicias
(
"#cboPolicias"
);
$
(
'.selectpicker'
).
selectpicker
({
$
(
'.selectpicker'
).
selectpicker
({
style
:
'btn-info'
,
style
:
'btn-info'
,
size
:
4
size
:
4
});
});
$
(
'.select-search'
).
select2
();
$
(
'.select-search'
).
select2
();
$
(
".btn.dropdown-toggle.bs-placeholder"
).
removeClass
(
"btn-info"
);
$
(
".btn.dropdown-toggle.bs-placeholder"
).
removeClass
(
"btn-info"
);
$
(
".btn.dropdown-toggle.bs-placeholder"
).
css
({
$
(
".btn.dropdown-toggle.bs-placeholder"
).
css
({
border
:
"1px solid #ddd"
,
border
:
"1px solid #ddd"
,
backgroundColor
:
"#fff"
backgroundColor
:
"#fff"
});
});
$
(
"#dpRangoFechas"
).
daterangepicker
({
initDateRangePicker
(
"#dpRangoFechas"
)
"autoApply"
:
true
,
// $("#dpRangoFechas").daterangepicker({
"locale"
:
{
// "autoApply": true,
"format"
:
"DD/MM/YYYY"
,
// "locale": {
"separator"
:
" - "
,
// "format": "DD/MM/YYYY",
"applyLabel"
:
"Apply"
,
// "separator": " - ",
"cancelLabel"
:
"Cancel"
,
// "applyLabel": "Apply",
"fromLabel"
:
"From"
,
// "cancelLabel": "Cancel",
"toLabel"
:
"To"
,
// "fromLabel": "From",
"customRangeLabel"
:
"Custom"
,
// "toLabel": "To",
"weekLabel"
:
"W"
,
// "customRangeLabel": "Custom",
"daysOfWeek"
:
[
// "weekLabel": "W",
"Do"
,
// "daysOfWeek": [
"Lu"
,
// "Do",
"Ma"
,
// "Lu",
"Mi"
,
// "Ma",
"Ju"
,
// "Mi",
"Vi"
,
// "Ju",
"Sa"
// "Vi",
],
// "Sa"
"monthNames"
:
[
// ],
"Enero"
,
// "monthNames": [
"Febrero"
,
// "Enero",
"Marzo"
,
// "Febrero",
"Abril"
,
// "Marzo",
"Mayo"
,
// "Abril",
"Junio"
,
// "Mayo",
"Julio"
,
// "Junio",
"Agosto"
,
// "Julio",
"Setiembre"
,
// "Agosto",
"Octubre"
,
// "Setiembre",
"Noviembre"
,
// "Octubre",
"Diciembre"
// "Noviembre",
],
// "Diciembre"
"firstDay"
:
1
// ],
},
// "firstDay": 1
"startDate"
:
"17/08/2018"
,
// },
"endDate"
:
"23/08/2018"
// "startDate": "17/08/2018",
},
function
(
start
,
end
,
label
)
{
// "endDate": "23/08/2018"
// console.log('New date range selected: ' + start.format('YYYY-MM-DD') + ' to ' + end.format('YYYY-MM-DD') + ' (predefined range: ' + label + ')');
// }, function (start, end, label) {
});
//// console.log('New date range selected: ' + start.format('YYYY-MM-DD') + ' to ' + end.format('YYYY-MM-DD') + ' (predefined range: ' + label + ')');
// });
// $("#dpRangoFechas").datepicker('setDate', 'now');
// $("#dpRangoFechas").datepicker('setDate', 'now');
defaultConfigDatePicker
();
//
defaultConfigDatePicker();
}
}
}).
then
((
result
)
=>
{
}).
then
((
result
)
=>
{
if
(
result
.
value
)
{
if
(
result
.
value
)
{
registrarRolPolicia
();
registrarRolPolicia
();
}
}
});
});
});
});
}
}
function
buscarRoles
()
{
function
buscarRoles
()
{
let
policia_id
=
$
(
"#cboPoliciasFiltro"
).
val
();
let
policia_id
=
$
(
"#cboPoliciasFiltro"
).
val
();
let
sede_id
=
$
(
"#cboSedesFiltro"
).
val
();
let
sede_id
=
$
(
"#cboSedesFiltro"
).
val
();
let
fecha_inicio
=
$
(
"#dpFechaInicio"
).
val
();
let
fecha_inicio
=
$
(
"#dpFechaInicio"
).
val
();
let
fecha_fin
=
$
(
"#dpFechaFin"
).
val
();
let
fecha_fin
=
$
(
"#dpFechaFin"
).
val
();
let
rangoFechas
=
generarFechas
(
fecha_inicio
,
fecha_fin
);
let
rangoFechas
=
generarFechas
(
fecha_inicio
,
fecha_fin
);
let
params
=
cleanQueryParams
({
let
params
=
cleanQueryParams
({
policia_id
,
policia_id
,
sede_id
,
sede_id
,
fecha_inicio
:
rangoFechas
fecha_inicio
:
rangoFechas
});
});
console
.
log
(
params
);
console
.
log
(
params
);
listarRolesPolicias
({
params
});
listarRolesPolicias
({
params
});
}
}
const
initDate
RangePicker
=
(
dp
)
=>
{
const
initDate
PickerMultiDate
=
(
nodeIdentifier
)
=>
{
$
(
dp
).
datepicker
({
$
(
nodeIdentifier
).
datepicker
({
format
:
"dd/mm/yyyy"
,
format
:
"dd/mm/yyyy"
,
language
:
"es"
,
language
:
"es"
,
multidate
:
true
,
multidate
:
true
,
multidateSeparator
:
","
multidateSeparator
:
","
});
});
}
}
$
().
ready
(
function
()
{
$
().
ready
(
function
()
{
$
.
fn
.
datepicker
.
noConflict
=
function
()
{
$
.
fn
.
datepicker
.
noConflict
=
function
()
{
$
.
fn
.
datepicker
=
old
;
$
.
fn
.
datepicker
=
old
;
return
this
;
return
this
;
};
};
initDatePicker
(
"#dpFechaInicio"
,
"#dpFechaFin"
);
initDatePicker
(
"#dpFechaInicio"
,
"#dpFechaFin"
);
listarSedes
(
"#cboSedesFiltro"
);
listarSedes
(
"#cboSedesFiltro"
);
listarPolicias
(
"#cboPoliciasFiltro"
);
listarPolicias
(
"#cboPoliciasFiltro"
);
$
(
'#servicio13'
).
click
(
modificarServicio
);
$
(
'#servicio13'
).
click
(
modificarServicio
);
$
(
"#btnCancelar"
).
click
(
cancelar
);
$
(
"#btnCancelar"
).
click
(
cancelar
);
$
(
"#btnGuardarCambios"
).
click
(
guardarCambios
);
$
(
"#btnGuardarCambios"
).
click
(
guardarCambios
);
$
(
"#btnNuevoRol"
).
click
(
mostrarModalNuevoRol
);
$
(
"#btnNuevoRol"
).
click
(
mostrarModalNuevoRol
);
$
(
"#btnAplicarFiltro"
).
click
(
buscarRoles
);
$
(
"#btnAplicarFiltro"
).
click
(
buscarRoles
);
$
(
"#btnMostrarTodo"
).
click
(
listarRolesPolicias
);
$
(
"#btnMostrarTodo"
).
click
(
listarRolesPolicias
);
});
});
\ No newline at end of file
src/main/webapp/js/pages/mantenimiento_justificacion.js
0 → 100644
View file @
74717651
function
getColumns
()
{
let
columns
=
[
{
title
:
"N°"
,
data
:
"id"
,
className
:
"text-center"
},
{
title
:
`APELLIDOS Y NOMBRES`
,
data
:
null
,
className
:
`text-center`
,
render
:
(
data
)
=>
{
let
nombresCompletos
;
let
nombres
=
data
.
trabajador_nombres
;
let
apellidos
=
data
.
trabajador_apellidos
;
nombresCompletos
=
`
${
apellidos
}
${
nombres
}
`
;
return
nombresCompletos
;
}
},
{
title
:
"FECHA INICIO"
,
data
:
"fecha_asistencia"
,
className
:
"text-center"
},
{
title
:
`FECHA FIN`
,
data
:
`marcacion_entrada`
,
className
:
'text-center'
},
{
title
:
`MOTIVO`
,
data
:
`descuento`
,
className
:
'text-center'
,
render
:
(
data
)
=>
{
return
`<span class="text-danger">
${
parseFloat
(
data
).
toFixed
(
2
)}
</span>`
;
}
},
{
title
:
`ESTADO`
,
data
:
`tipo_registro`
,
className
:
'text-center'
,
render
:
(
data
)
=>
{
let
label
=
""
;
let
contenido
=
""
;
if
(
data
==
1
)
{
label
=
"label label-info"
contenido
=
"HUELLA"
}
else
{
label
=
"label label-warning"
contenido
=
"MANUAL"
}
return
`<span class="
${
label
}
">
${
contenido
}
</span>`
}
},
{
title
:
`ACCIONES`
,
data
:
null
,
className
:
'text-center'
,
render
:
(
data
)
=>
{
let
acciones
=
""
;
let
registrar
=
""
;
let
verdetalle
=
""
;
verdetalle
=
`<span data-toggle="tooltip" data-placement="left" title="Ver detalle" style="cursor: pointer"> <i class='verdetalle icon-list text-primary-700'></i> </span>`
;
acciones
=
verdetalle
;
return
acciones
;
}
}
];
return
columns
;
}
const
listarJustificaciones
=
(
objParams
=
{})
=>
{
ajaxWebService
.
get
(
URI_JUSTIFICACION
,
objParams
).
then
((
response
)
=>
{
let
columns
=
getColumns
();
let
wrapsNameDatatable
=
`divDatatable`
;
let
classNameForDatatable
=
`display table table-bordered`
;
makeDatatable
(
wrapsNameDatatable
,
{
data
:
response
.
data
,
columns
,
},
classNameForDatatable
,
).
then
((
nodes
)
=>
{
nodes
.
container
.
off
()
.
on
(
"click"
,
"#chkSelectAll"
,
(
e
)
=>
seleccionarCheckBoxTodo
(
$
(
e
.
currentTarget
)))
// .on("click", ".verdetalle", function () {
// let data = nodes.datatable.DataTable().row($(this).parents("tr")).data();
// mostrarModalVerDetalleDescuentoAsistencia(data);
// })
});
});
};
$
(
document
).
ready
(
function
()
{
});
\ No newline at end of file
src/main/webapp/js/pages/registroJustificacion.js
0 → 100644
View file @
74717651
const
listarPersonal
=
(
selectorName
)
=>
{
initSelect2
(
selectorName
,
baseURLRest
+
URI_TRABAJADORES
,
{
title
:
"nombresapellidos"
,
subtitle
:
"documentoidentidad"
});
};
const
listarTipoJustificacion
=
(
nodeIdentifier
)
=>
{
ajaxWebService
.
get
(
URI_JUSTIFICACION_TIPO
).
then
((
response
)
=>
{
let
data
=
response
.
data
let
html
=
"<option>[SELECCIONE]</option>"
html
+=
data
.
map
((
tipoJustificacion
)
=>
`<option value="
${
tipoJustificacion
.
id
}
">
${
tipoJustificacion
.
descripcion
}
</option>`
)
$
(
nodeIdentifier
).
html
(
html
)
})
}
const
formControls
=
{
init
()
{
this
.
initializeRadioButton
()
this
.
initializeChooseFile
()
pickersNoConflict
()
initDateRangePicker
(
"#dpRangoFechas"
)
},
initializeRadioButton
()
{
$
(
".styled, .multiselect-container input"
).
uniform
({
radioClass
:
'choice'
});
},
initializeChooseFile
()
{
$
(
".file-styled-primary"
).
uniform
({
fileButtonClass
:
'action btn bg-blue'
});
}
}
$
(
document
).
ready
(
function
()
{
formControls
.
init
()
listarTipoJustificacion
(
"#cboTipoJustificacion"
)
listarPersonal
(
"#cboPersonal"
)
});
\ No newline at end of file
src/main/webapp/vistas/mantenimientoJustificacion.jsp
0 → 100644
View file @
74717651
<jsp:include
page=
"/vistas/templates/validar.jsp"
/>
<
%@
page
contentType=
"text/html"
pageEncoding=
"UTF-8"
%
>
<!DOCTYPE html>
<html>
<head>
<jsp:include
page=
"/vistas/templates/header.jsp"
/>
<!--template-core-->
<!--css de la pagina-->
<link
href=
"../css/lib/sweetalert2.min.css"
rel=
"stylesheet"
type=
"text/css"
/>
<!--css-->
</head>
<body>
<jsp:include
page=
"/vistas/templates/header-body.jsp"
/>
<!-- content -->
<div
class=
"col-md-4 col-md-offset-4"
>
<div
class=
"panel panel-primary"
>
<div
class=
"panel-heading"
>
<h5
class=
"panel-title"
>
Busqueda
</h5>
</div>
<div
class=
"panel-body"
>
<div
class=
"row"
>
<div
class=
"col-md-12 form-group"
>
<label>
Personal
</label>
<select
class=
"select-search form-control"
id=
"cboPersonalFiltro"
>
</select>
</div>
</div>
<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=
"dpFechaInicioFiltro"
>
</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=
"dpFechaFinFiltro"
>
</div>
</div>
</div>
</div>
<div
class=
"panel-footer"
>
<div
class=
"text-center"
>
<button
class=
"btn btn-info"
id=
"btnAplicarFiltro"
><i
class=
"fa fa-search"
></i>
Aplicar filtro
</button>
<button
class=
"btn btn-primary"
id=
"btnMostrarTodo"
><i
class=
"icon-eye4"
></i>
Mostrar Todo
</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 justificaciones
</h6>
<div
class=
"heading-elements"
>
<button
type=
"button"
class=
"btn btn-success btn-icon heading-btn"
><i
class=
"icon-plus2"
></i></button>
</div>
</div>
<div
id=
"divDatatable"
></div>
</div>
</div>
<!-- / content -->
<jsp:include
page=
"/vistas/templates/footer-body.jsp"
/>
<!--js de la pagina-->
<!--<script src="${pageContext.request.contextPath}/plantilla/assets/js/plugins/tables/datatables/datatables.min.js" type="text/javascript"></script>-->
<script
src=
"../plantilla/assets/js/core/libraries/jquery_ui/widgets.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=
"../plantilla/assets/js/plugins/forms/selects/select2.min.js"
></script>
<script
src=
"../js/lib/lodash.js"
type=
"text/javascript"
></script>
<script
src=
"../js/pages/mantenimiento_justificacion.js"
type=
"text/javascript"
></script>
<!--js-->
</body>
</html>
\ No newline at end of file
src/main/webapp/vistas/registroJustificacion.jsp
0 → 100644
View file @
74717651
<jsp:include
page=
"/vistas/templates/validar.jsp"
/>
<
%@
page
contentType=
"text/html"
pageEncoding=
"UTF-8"
%
>
<!DOCTYPE html>
<html>
<head>
<jsp:include
page=
"/vistas/templates/header.jsp"
/>
<!--template-core-->
<!--css de la pagina-->
<link
href=
"../css/lib/sweetalert2.min.css"
rel=
"stylesheet"
type=
"text/css"
/>
<!--css-->
</head>
<body>
<jsp:include
page=
"/vistas/templates/header-body.jsp"
/>
<!-- content -->
<div
class=
"col-md-12"
>
<div
class=
"panel panel-primary"
>
<div
class=
"panel-heading"
>
<h5
class=
"panel-title"
>
REGISTRO DE JUSTIFICACIÓN
</h5>
</div>
<div
class=
"panel-body"
>
<div
class=
"row"
>
<div
class=
"col-md-4 form-group"
>
<label>
Personal
</label>
<select
class=
"select-search form-control"
id=
"cboPersonal"
>
</select>
</div>
<div
class=
"col-md-4 form-group"
>
<label>
Fecha(s) a justificar
</label>
<div
class=
"input-group"
>
<span
class=
"input-group-addon"
><i
class=
"icon-calendar"
></i></span>
<input
type=
"text"
class=
"form-control"
id=
"dpRangoFechas"
>
</div>
</div>
<div
class=
"col-md-4 form-group"
>
<label>
Justificacion por
</label>
<select
id=
"cboTipoJustificacion"
class=
"form-control"
></select>
</div>
</div>
<div
class=
"row"
>
<div
class=
"col-md-12 form-group"
>
<label>
Motivo
</label>
<input
type=
"text"
class=
"form-control"
id=
"txtMotivo"
>
</div>
</div>
<div
class=
"row"
>
<div
class=
"col-md-12 form-group"
>
<label>
Observación/Fundamento
</label>
<textarea
name=
""
id=
""
cols=
"30"
rows=
"5"
class=
"form-control"
id=
"txtObservacion"
></textarea>
</div>
</div>
<div
class=
"row"
>
<div
class=
"col-md-6 form-group"
>
<label>
Nro documentos adjuntos
</label>
<input
type=
"text"
class=
"form-control"
id=
"txtNumeroDocumentosAdjuntos"
>
</div>
<div
class=
"form-group col-md-6"
>
<label
class=
"control-label"
>
Adjuntar documentos
</label>
<input
type=
"file"
class=
"file-styled-primary form-control"
>
</div>
</div>
</div>
<div
class=
"panel-footer"
>
<div
class=
"text-center"
>
<button
class=
"btn btn-success"
id=
"btnRegistrar"
><i
class=
"fa fa-plus"
></i>
Registrar
</button>
<button
class=
"btn btn-warning"
id=
"btnMostrarTodo"
><i
class=
"fa fa-eraser"
></i>
Limpiar
</button>
</div>
</div>
</div>
</div>
<!-- / content -->
<jsp:include
page=
"/vistas/templates/footer-body.jsp"
/>
<!--js de la pagina-->
<!--<script src="${pageContext.request.contextPath}/plantilla/assets/js/plugins/tables/datatables/datatables.min.js" type="text/javascript"></script>-->
<script
src=
"../plantilla/assets/js/core/libraries/jquery_ui/widgets.min.js"
></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"
></script>
<script
src=
"../plantilla/assets/js/plugins/pickers/daterangepicker.js"
></script>
<script
src=
"../js/lib/sweetalert2.min.js"
type=
"text/javascript"
></script>
<script
src=
"../js/lib/lodash.js"
type=
"text/javascript"
></script>
<script
src=
"../plantilla/assets/js/plugins/forms/selects/select2.min.js"
></script>
<script
src=
"../js/lib/bootstrap-select.min.js"
type=
"text/javascript"
></script>
<script
src=
"../js/pages/registroJustificacion.js"
type=
"text/javascript"
></script>
<!--js-->
</body>
</html>
\ 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