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
f269ed86
Commit
f269ed86
authored
Sep 20, 2018
by
Billy Larru
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ADD registro_periodo_cierre]
parent
5f50934b
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
238 additions
and
0 deletions
+238
-0
registro_periodo_cierre.js
src/main/webapp/js/pages/registro_periodo_cierre.js
+81
-0
habilitarPeriodoCierre.jsp
src/main/webapp/vistas/habilitarPeriodoCierre.jsp
+31
-0
registroperiodocierre.jspf
...ual/mantenimientoPeriodoCierre/registroperiodocierre.jspf
+34
-0
registroPeriodoCierre.jsp
src/main/webapp/vistas/registroPeriodoCierre.jsp
+92
-0
No files found.
src/main/webapp/js/pages/registro_periodo_cierre.js
0 → 100644
View file @
f269ed86
const
mostrarModalNuevoPeriodo
=
()
=>
{
ajaxModal
.
get
(
"cierreasistenciamensual/mantenimientoPeriodoCierre/registroperiodocierre.jspf"
).
then
((
response
)
=>
{
swalWithBootstrapButtons
({
title
:
'<strong>Registrar Periodo</strong>'
,
html
:
response
.
data
,
showCancelButton
:
true
,
showCloseButton
:
true
,
focusConfirm
:
false
,
confirmButtonText
:
'<i class="icon-checkmark2"></i> Registrar'
,
cancelButtonText
:
'<i class="icon-cross3"></i>Cancelar'
,
width
:
'30%'
,
customClass
:
'swal2-overflow'
,
onOpen
:
()
=>
{
inicializarInputsModalNuevoPeriodo
();
}
}).
then
((
result
)
=>
{
if
(
result
.
value
)
{
registrarNuevoPeriodo
();
}
})
})
}
const
inicializarInputsModalNuevoPeriodo
=
()
=>
{
listarTipoPersonal
(
"#cboTipoPersonal"
)
listarMesesCierre
(
"#cboMesesCierre"
)
initDatePicker
(
"#dpFechaInicio"
,
"#dpFechaFin"
)
$
(
"#dpFechaInicio"
).
val
(
""
)
$
(
"#dpFechaFin"
).
val
(
""
)
}
const
registrarNuevoPeriodo
=
()
=>
{
let
tipopersonal_id
=
$
(
"#cboTipoPersonal"
).
val
()
let
tipopersonal_descripcion
=
$
(
"#cboTipoPersonal option:selected"
).
text
()
let
mescierre_id
=
$
(
"#cboMesesCierre"
).
val
()
let
mescierre_descripcion
=
$
(
"#cboMesesCierre option:selected"
).
text
()
let
fecha_inicio
=
$
(
"#dpFechaInicio"
).
val
()
let
fecha_fin
=
$
(
"#dpFechaFin"
).
val
()
let
params
=
{
}
ajaxWebService
.
post
(
URI_PERIODOCIERRE
,
params
).
then
((
response
)
=>
{
})
}
const
listarTipoPersonal
=
(
nodeIdentifier
)
=>
{
ajaxWebService
.
get
(
URI_TIPOPERSONAL
).
then
((
response
)
=>
{
console
.
log
(
response
)
if
(
response
.
status
)
{
let
data
=
response
.
data
let
html
=
""
html
+=
data
.
map
(
tipoPersonal
=>
`<option value="
${
tipoPersonal
.
id
}
">
${
tipoPersonal
.
descripcion
}
</option>`
)
$
(
nodeIdentifier
).
html
(
html
)
}
})
}
const
listarMesesCierre
=
(
nodeIdentifier
)
=>
{
ajaxWebService
.
get
(
URI_MESESCIERRE
).
then
((
response
)
=>
{
if
(
response
.
status
)
{
let
data
=
response
.
data
let
html
=
""
html
+=
data
.
map
(
mesCierre
=>
`<option value="
${
mesCierre
.
id
}
">
${
mesCierre
.
descripcion
}
</option>`
)
$
(
nodeIdentifier
).
html
(
html
)
}
})
}
$
(
document
).
ready
(
function
()
{
$
(
"#btnNuevoPeriodo"
).
click
(
mostrarModalNuevoPeriodo
);
})
\ No newline at end of file
src/main/webapp/vistas/habilitarPeriodoCierre.jsp
0 → 100644
View file @
f269ed86
<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 -->
<!-- / content -->
<jsp:include
page=
"/vistas/templates/footer-body.jsp"
/>
<!--js de la pagina-->
<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>
<!--js-->
</body>
</html>
\ No newline at end of file
src/main/webapp/vistas/modals/cierreasistenciamensual/mantenimientoPeriodoCierre/registroperiodocierre.jspf
0 → 100644
View file @
f269ed86
<div class="panel-body">
<form id="frm" onsubmit="return false;" autocomplete="off">
<div class="row">
<div class="form-group col-md-6">
<label>Tipo de Personal</label>
<select id="cboTipoPersonal" class="select-search form-control"></select>
</div>
<div class="form-group col-md-6">
<label>Mes de cierre</label>
<select id="cboMesesCierre" class="select-search form-control"></select>
</div>
</div>
<div class="row">
<div class="form-group col-md-6">
<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">
</div>
</div>
<div class="form-group col-md-6">
<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">
</div>
</div>
</div>
</form>
</div>
\ No newline at end of file
src/main/webapp/vistas/registroPeriodoCierre.jsp
0 → 100644
View file @
f269ed86
<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-6 col-md-offset-3"
>
<div
class=
"panel panel-primary"
>
<div
class=
"panel-heading"
>
<h5
class=
"panel-title"
>
Búsqueda
</h5>
</div>
<div
class=
"panel-body"
>
<div
class=
"row"
>
<div
class=
"col-md-8 form-group"
>
<label>
Personal
</label>
<select
class=
"select-search form-control"
id=
"cboPersonalFiltro"
>
</select>
</div>
<div
class=
"col-md-4 form-group"
>
<label>
Sede
</label>
<select
class=
"form-control"
id=
"cboSedesFiltro"
>
</select>
</div>
</div>
<div
class=
"row"
>
<div
class=
"col-md-4 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-4 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
class=
"col-md-4 form-group"
>
<label>
Estado
</label>
<select
class=
"form-control selectpicker"
id=
"cboEstadoJustificacionFiltro"
multiple
>
</select>
</div>
</div>
</div>
<div
class=
"panel-footer"
>
<div
class=
"text-center"
>
<button
class=
"btn btn-primary"
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 PERIODOS DE CIERRE
</h6>
<div
class=
"heading-elements"
>
<button
type=
"button"
id=
"btnNuevoPeriodo"
class=
"btn bg-slate border-slate-600 btn-xs"
><i
class=
"glyphicon glyphicon-plus"
></i>
Nuevo periodo
</button>
</div>
</div>
<div
id=
"divDatatable"
></div>
</div>
</div>
<!-- / content -->
<jsp:include
page=
"/vistas/templates/footer-body.jsp"
/>
<!--js de la pagina-->
<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/registro_periodo_cierre.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