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
059207f0
Commit
059207f0
authored
Sep 08, 2018
by
Billy Larru
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ADD - tolerancia masiva]
parent
6b79b668
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
80 additions
and
3 deletions
+80
-3
tolerancia_masiva.js
src/main/webapp/js/pages/tolerancia_masiva.js
+55
-1
registroTolerancia.jsp
.../administrativos/tolerancia/masiva/registroTolerancia.jsp
+23
-0
toleranciaMasiva.jsp
src/main/webapp/vistas/toleranciaMasiva.jsp
+2
-2
No files found.
src/main/webapp/js/pages/tolerancia_masiva.js
View file @
059207f0
...
...
@@ -79,7 +79,7 @@ const filtrarPersonalPorCargo = () => {
html
=
trabajadores
.
map
((
trabajador
)
=>
`<option value="
${
trabajador
.
id
}
">
${
trabajador
.
apellidos
}
${
trabajador
.
nombres
}
</option>`
);
$
(
"#lista"
).
append
(
html
);
$
(
"#lista"
).
trigger
(
'bootstrapDualListbox.refresh'
,
true
);
});
};
...
...
@@ -98,9 +98,62 @@ const initDualListbox = (nodeIdentifier) => {
$
(
nodeIdentifier
).
bootstrapDualListbox
(
options
);
};
const
inicializarInputsModalToleranciaMasiva
=
()
=>
{
initDatePicker
(
"#dpFecha"
);
listarSedes
(
"#cboSedes"
);
};
const
registrarToleranciaMasiva
=
()
=>
{
swal
({
type
:
'success'
,
title
:
'¡Se registró la tolerancia masiva!'
,
showConfirmButton
:
false
,
timer
:
1500
})
};
const
mostrarModalAsignarTolerancia
=
()
=>
{
ajaxModal
.
get
(
"administrativos/tolerancia/masiva/registroTolerancia.jsp"
).
then
((
response
)
=>
{
swal
({
title
:
'<strong>Registro de Tolerancia Masiva</strong>'
,
// type: 'info',
html
:
response
.
data
,
showCloseButton
:
true
,
showCancelButton
:
true
,
focusConfirm
:
false
,
confirmButtonText
:
'<i class="icon-checkmark2"></i> Registrar tolerancia'
,
confirmButtonAriaLabel
:
'Registrar tolerancia'
,
cancelButtonText
:
'<i class="icon-cross3"></i>Cancelar'
,
cancelButtonAriaLabel
:
'Thumbs down'
,
width
:
'30%'
,
customClass
:
'swal2-overflow'
,
onOpen
:
()
=>
{
inicializarInputsModalToleranciaMasiva
();
}
}).
then
((
result
)
=>
{
if
(
result
.
value
)
{
registrarToleranciaMasiva
();
}
});
});
};
function
listarSedes
(
selectorName
)
{
ajaxWebService
.
get
(
URI_SEDES
).
then
((
result
)
=>
{
let
sedes
=
result
.
data
;
sedes
=
_
.
orderBy
(
sedes
,
s
=>
s
.
descripcion
);
let
html
=
`<option value="">[SELECCIONE]</option>`
;
sedes
.
forEach
(
sede
=>
html
+=
`<option value="
${
sede
.
codigo
}
">
${
sede
.
descripcion
}
</option>`
);
$
(
`
${
selectorName
}
`
).
html
(
html
);
$
(
`
${
selectorName
}
`
).
select2
();
});
}
$
(()
=>
{
initDualListbox
(
"#lista"
);
listarPersonal
(
"#cboPersonalFiltro"
);
listarCargos
(
"#cboCargoFiltro"
);
$
(
"#btnAplicarFiltro"
).
click
(
filtrarPersonalPorCargo
);
$
(
"#btnAsignarTolerancia"
).
click
(
mostrarModalAsignarTolerancia
);
});
\ No newline at end of file
src/main/webapp/vistas/modals/administrativos/tolerancia/masiva/registroTolerancia.jsp
0 → 100644
View file @
059207f0
<form id="frm" onsubmit="return false;" autocomplete="off">
<div class="row">
<div class="form-group col-md-6">
<label>Fecha</label>
<div class="input-group">
<span class="input-group-addon"><i class="icon-calendar"></i></span>
<input type="text" id="dpFecha" class="form-control">
</div>
</div>
<div class="form-group col-md-6">
<label>Hora</label>
<input type="time" id="txtHora" class="form-control">
</div>
</div>
<div class="row">
<div class="form-group col-md-12">
<label>Sede</label>
<select type="text" id="cboSedes" class="select-search form-control"></select>
</div>
</div>
</form>
\ No newline at end of file
src/main/webapp/vistas/toleranciaMasiva.jsp
View file @
059207f0
...
...
@@ -6,7 +6,7 @@
<
%@
include
file=
"templates/header.jsp"
%
>
<!--template-core-->
<!--css de la pagina-->
<link
href=
"../css/lib/sweetalert2.min.css"
rel=
"stylesheet"
type=
"text/css"
/>
<!--css-->
</head>
<body>
...
...
@@ -46,7 +46,7 @@
<div
class=
"panel-heading"
style=
"padding: 8px 15px"
>
<h6
class=
"panel-title"
style=
"font-size: 15px; font-family: inherit"
>
PERSONAL
</h6>
<div
class=
"heading-elements"
>
<button
type=
"button"
id=
"btn
NuevaTolerancia"
class=
"btn bg-slate border-slate-600 btn-xs"
><i
class=
"glyphicon glyphicon-plus"
></i>
Gener
ar tolerancia
</button>
<button
type=
"button"
id=
"btn
AsignarTolerancia"
class=
"btn bg-slate border-slate-600 btn-xs"
><i
class=
"glyphicon glyphicon-plus"
></i>
Asign
ar tolerancia
</button>
</div>
</div>
<div
class=
"panel-body"
>
...
...
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