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
71119051
Commit
71119051
authored
Sep 27, 2018
by
Billy Larru
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[EDIT registro_periodo_sede, cambiando el estado de cierre de los periodos y de sus sedes]
parent
bb0c1103
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
23 deletions
+21
-23
registro_periodo_cierre.js
src/main/webapp/js/pages/registro_periodo_cierre.js
+21
-23
No files found.
src/main/webapp/js/pages/registro_periodo_cierre.js
View file @
71119051
...
...
@@ -95,7 +95,6 @@ const mostrarModalNuevoPeriodo = () => {
})
}
const
inicializarInputsModalNuevoPeriodo
=
()
=>
{
listarTipoPersonal
(
"#cboTipoPersonal"
)
listarMesesCierre
(
"#cboMesesCierre"
)
...
...
@@ -103,7 +102,6 @@ const inicializarInputsModalNuevoPeriodo = () => {
$
(
"#dpFechaInicio"
).
val
(
""
)
$
(
"#dpFechaFin"
).
val
(
""
)
}
const
registrarNuevoPeriodo
=
()
=>
{
let
tipopersonal_id
=
$
(
"#cboTipoPersonal"
).
val
()
let
tipopersonal_descripcion
=
$
(
"#cboTipoPersonal option:selected"
).
text
()
...
...
@@ -137,8 +135,6 @@ const registrarNuevoPeriodo = () => {
}
const
listarTipoPersonal
=
(
nodeIdentifier
,
todos
=
0
)
=>
{
return
ajaxWebService
.
get
(
URI_TIPOPERSONAL
).
then
((
response
)
=>
{
if
(
response
.
status
)
{
...
...
@@ -150,7 +146,6 @@ const listarTipoPersonal = (nodeIdentifier, todos = 0) => {
return
$
(
nodeIdentifier
)
})
}
const
listarMesesCierre
=
(
nodeIdentifier
,
todos
=
0
)
=>
{
return
ajaxWebService
.
get
(
URI_MESESCIERRE
).
then
((
response
)
=>
{
if
(
response
.
status
)
{
...
...
@@ -162,8 +157,6 @@ const listarMesesCierre = (nodeIdentifier, todos = 0) => {
return
$
(
nodeIdentifier
)
})
}
function
listarPeriodosCierre
(
objParams
=
{}){
ajaxWebService
.
get
(
URI_PERIODOCIERRE
,
objParams
).
then
((
response
)
=>
{
let
columns
=
getColumns
();
...
...
@@ -188,7 +181,6 @@ function listarPeriodosCierre(objParams = {}){
});
});
}
const
mostrarModalVerDetalle
=
(
data
)
=>
{
ajaxModal
.
get
(
"periodoscierre/detalleperiodo.jspf"
).
then
((
response
)
=>
{
...
...
@@ -283,9 +275,8 @@ const mostrarModalVerDetalle = (data) => {
});
});
}
const
mostrarModalCierrePeriodoSede
=
(
data
,
jsonPrimerDatatable
)
=>
{
debugger
let
{
id
,
estado
}
=
data
;
let
titulo
=
""
;
let
textoConfirmacion
=
""
...
...
@@ -323,7 +314,7 @@ const mostrarModalCierrePeriodoSede = (data, jsonPrimerDatatable) => {
timer
:
1500
});
}
debugger
mostrarModalVerDetalle
(
jsonPrimerDatatable
)
});
}
else
{
...
...
@@ -331,7 +322,6 @@ const mostrarModalCierrePeriodoSede = (data, jsonPrimerDatatable) => {
}
});
}
const
mostrarModalEditarPeriodoCierre
=
(
data
)
=>
{
ajaxModal
.
get
(
"cierreasistenciamensual/mantenimientoPeriodoCierre/registroperiodocierre.jspf"
).
then
((
response
)
=>
{
swalWithBootstrapButtons
({
...
...
@@ -354,7 +344,6 @@ const mostrarModalEditarPeriodoCierre = (data) => {
});
});
}
const
inicializarInputsModalEditarPeriodoCierre
=
(
data
)
=>
{
console
.
log
(
data
)
listarTipoPersonal
(
"#cboTipoPersonal"
).
then
((
node
)
=>
node
.
val
(
data
.
tipopersonal_id
))
...
...
@@ -363,7 +352,6 @@ const inicializarInputsModalEditarPeriodoCierre = (data) => {
$
(
"#dpFechaInicio"
).
val
(
data
.
fecha_inicio
)
$
(
"#dpFechaFin"
).
val
(
data
.
fecha_fin
)
}
const
editarPeriodoCierre
=
(
data
)
=>
{
let
{
id
}
=
data
let
tipopersonal_id
=
$
(
"#cboTipoPersonal"
).
val
()
...
...
@@ -394,7 +382,6 @@ const editarPeriodoCierre = (data) => {
})
}
const
mostrarModalCierrePeriodo
=
(
data
)
=>
{
let
{
id
,
estado
}
=
data
;
let
titulo
=
""
;
...
...
@@ -424,8 +411,22 @@ const mostrarModalCierrePeriodo = (data) => {
confirmButtonText
:
textoConfirmacion
}).
then
((
result
)
=>
{
if
(
result
.
value
)
{
ajaxWebService
.
patch
(
`
${
URI_PERIODOCIERRE
}
/
${
id
}
`
,
{
estado
}).
then
((
response
)
=>
{
if
(
response
.
status
)
{
let
promises_periodosedes
let
params
=
{
periodocierreasistencia_id
:
id
}
ajaxWebService
.
get
(
`
${
URI_PERIODOCIERRE_SEDES
}
`
,
{
params
}).
then
((
response2
)
=>
{
let
dataRequest
=
response2
.
data
.
map
((
d
)
=>
{
return
{
id
:
d
.
id
,
estado
}
})
promises_periodosedes
=
dataRequest
.
map
((
p
)
=>
ajaxWebService
.
patch
(
`
${
URI_PERIODOCIERRE_SEDES
}
/
${
p
.
id
}
`
,
p
))
})
let
promise_periodo
=
ajaxWebService
.
patch
(
`
${
URI_PERIODOCIERRE
}
/
${
id
}
`
,
{
estado
})
Promise
.
all
([
promises_periodosedes
,
promise_periodo
])
.
then
(
axios
.
spread
(
function
(...
responses
)
{
swal
({
type
:
'success'
,
title
:
tituloOperacion
,
...
...
@@ -433,17 +434,15 @@ const mostrarModalCierrePeriodo = (data) => {
timer
:
1500
});
listarPeriodosCierre
()
}
});
}))
}
});
}
const
aplicarFiltro
=
()
=>
{
}
const
formControls
=
{
init
()
{
...
...
@@ -466,7 +465,6 @@ const formControls = {
initDatePicker
(
"#dpFechaInicioFiltro"
,
"#dpFechaFinFiltro"
)
}
}
$
(
document
).
ready
(
function
()
{
formControls
.
init
()
$
(
"#btnNuevoPeriodo"
).
click
(
mostrarModalNuevoPeriodo
);
...
...
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