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
06ae75fe
Commit
06ae75fe
authored
Sep 05, 2018
by
Billy Larru
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
listando vacaciones individuales
parent
e71e80fc
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
213 additions
and
29 deletions
+213
-29
general.css
src/main/webapp/css/general.css
+5
-0
general.js
src/main/webapp/js/general.js
+1
-0
vacaciones_administrativas_individual.js
.../webapp/js/pages/vacaciones_administrativas_individual.js
+207
-1
registroVacaciones.jsp
...inistrativos/vacaciones/individual/registroVacaciones.jsp
+0
-28
No files found.
src/main/webapp/css/general.css
View file @
06ae75fe
...
...
@@ -273,3 +273,7 @@ table.display tbody tr:hover td {
.align-auto
{
text-align
:
-webkit-auto
;
}
.panel-body
#frm
.form-group
{
text-align
:
-webkit-auto
;
}
\ No newline at end of file
src/main/webapp/js/general.js
View file @
06ae75fe
...
...
@@ -35,6 +35,7 @@ const URI_ADMINISTRATIVO_ASISTENCIA = "asistenciaAdministrativa";
const
URI_TRABAJADORES
=
"trabajadores"
;
const
URI_ADMINISTRATIVOS_TOLERANCIA_INDIVIDUAL
=
"toleranciasIndividuales"
;
const
URI_ADMINISTRATIVOS_ESTADO_TOLERANCIA_INDIVIDUAL
=
"estadoTolerancias"
;
const
URI_ADMINISTRATIVOS_VACACIONES_INDIVIDUAL
=
"vacacionesAdministrativasIndividuales"
;
//</editor-fold>
...
...
src/main/webapp/js/pages/vacaciones_administrativas_individual.js
View file @
06ae75fe
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_inicio"
,
className
:
"text-center"
},
{
title
:
`FECHA FIN`
,
data
:
`fecha_fin`
,
className
:
'text-center'
},
{
title
:
`CANT. DIAS`
,
data
:
`cantidad_dias`
,
className
:
'text-center'
},
{
title
:
`ESTADO`
,
data
:
`estado`
,
className
:
'text-center'
,
render
:
(
data
)
=>
{
let
label
=
""
;
let
text
=
""
;
switch
(
data
)
{
case
1
:
label
=
"label label-success"
;
text
=
"ACTIVO"
;
break
;
case
0
:
label
=
"label label-warning"
;
text
=
"INACTIVO"
;
break
;
}
return
`<span class="
${
label
}
">
${
text
}
</span>`
;
}
},
{
title
:
`ACCIONES`
,
data
:
null
,
className
:
'text-center'
,
render
:
(
data
)
=>
{
let
acciones
=
""
;
let
verdetalle
=
""
;
let
editar
=
""
;
let
eliminar
=
""
;
if
(
data
.
estado
===
1
)
{
eliminar
=
`<span style="cursor: pointer"><i class="eliminar fa fa-power-off text-danger-700"></i> </span>`
;
}
else
{
eliminar
=
`<span style="cursor: pointer"><i class="eliminar fa fa-power-off text-success-700"></i> </span>`
;
}
verdetalle
=
`<span style="cursor: pointer"><i class="verdetalle icon-list text-primary-700"></i> </span>`
;
// editar = `<span style="cursor: pointer"><i class="editar icon-pencil text-slate-800"></i> </span>`;
acciones
=
verdetalle
+
editar
+
eliminar
;
return
acciones
;
return
null
;
}
},
];
return
columns
;
}
const
listarPersonal
=
(
selectorName
)
=>
{
initSelect2
(
selectorName
,
baseURLRest
+
URI_TRABAJADORES
,
{
title
:
"nombresapellidos"
,
subtitle
:
"documentoidentidad"
});
};
...
...
@@ -14,18 +104,134 @@ const listarSedes = (selectorName) => {
});
};
const
inicializarInputsModalVerDetalle
=
(
data
)
=>
{
};
const
mostrarModalVerDetalleVacaciones
=
(
data
)
=>
{
ajaxModal
.
get
(
"administrativos/vacaciones/individual/verdetalle.jsp"
).
then
((
response
)
=>
{
swal
({
title
:
'<strong>Detalle de vacaciones</strong>'
,
html
:
response
.
data
,
showCloseButton
:
true
,
showCancelButton
:
true
,
focusConfirm
:
false
,
confirmButtonText
:
'<i class="icon-checkmark2"></i> Editar tolerancia'
,
confirmButtonAriaLabel
:
'Editar tolerancia'
,
cancelButtonText
:
'<i class="icon-cross3"></i>Cancelar'
,
cancelButtonAriaLabel
:
'Thumbs down'
,
width
:
'30%'
,
customClass
:
'swal2-overflow'
,
onOpen
:
()
=>
{
inicializarInputsModalVerDetalle
(
data
);
}
});
});
};
function
listarVacacionesIndividuales
(
objParams
=
{}){
ajaxWebService
.
get
(
URI_ADMINISTRATIVOS_VACACIONES_INDIVIDUAL
,
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"
,
".verdetalle"
,
function
()
{
let
data
=
nodes
.
datatable
.
DataTable
().
row
(
$
(
this
).
parents
(
"tr"
)).
data
();
mostrarModalVerDetalleVacaciones
(
data
);
})
// .on("click", ".editar", function () {
// let data = nodes.datatable.DataTable().row($(this).parents("tr")).data();
// mostrarModalEditarTolerancia(data);
// })
// .on("click", ".eliminar", function () {
// let data = nodes.datatable.DataTable().row($(this).parents("tr")).data();
// mostrarModalEliminarTolerancia(data);
// });
});
});
}
const
aplicarFiltro
=
()
=>
{
};
const
mostrarModalNuevo
=
()
=>
{
const
inicializarInputsModalRegistroVacaciones
=
()
=>
{
listarPersonal
(
"#cboPersonal"
);
initDatePicker
(
"#dpFechaInicio"
,
"#dpFechaFin"
);
};
const
registrarVacaciones
=
()
=>
{
let
params
=
{};
ajaxWebService
.
post
(
URI_ADMINISTRATIVOS_VACACIONES_INDIVIDUAL
,
params
)
.
then
((
response
)
=>
{
debugger
;
if
(
response
.
status
)
{
swal
({
type
:
'success'
,
title
:
'¡Vacaciones registradas!'
,
showConfirmButton
:
false
,
timer
:
1500
})
listarVacacionesIndividuales
();
}
else
{
swal
({
type
:
'success'
,
title
:
'¡No ha sido posible registrar las vacaciones!'
,
showConfirmButton
:
false
,
timer
:
1500
})
}
})
.
catch
((
error
)
=>
{
console
.
log
(
error
);
});
};
const
mostrarModalNuevo
=
()
=>
{
ajaxModal
.
get
(
"administrativos/vacaciones/individual/registroVacaciones.jsp"
).
then
((
response
)
=>
{
swal
({
title
:
'<strong>Registro de vacaciones</strong>'
,
html
:
response
.
data
,
showCloseButton
:
true
,
showCancelButton
:
true
,
focusConfirm
:
false
,
confirmButtonText
:
'<i class="icon-checkmark2"></i> Registrar vacaciones'
,
confirmButtonAriaLabel
:
'Registrar vacaciones'
,
cancelButtonText
:
'<i class="icon-cross3"></i>Cancelar'
,
cancelButtonAriaLabel
:
'Thumbs down'
,
width
:
'30%'
,
customClass
:
'swal2-overflow'
,
onOpen
:
()
=>
{
inicializarInputsModalRegistroVacaciones
();
}
}).
then
((
result
)
=>
{
if
(
result
.
value
)
{
registrarVacaciones
();
}
});
});
};
$
(()
=>
{
initDatePicker
(
"#dpFechaInicioFiltro"
,
"#dpFechaFinFiltro"
);
listarPersonal
(
"#cboPersonalFiltro"
);
...
...
src/main/webapp/vistas/modals/administrativos/vacaciones/individual/registroVacaciones.jsp
View file @
06ae75fe
...
...
@@ -8,34 +8,6 @@
</div>
</div>
<div class="row">
<div class="form-group col-md-4">
<label>Horario LV</label>
<input type="time" class="form-control text-center" id="txtHorarioLV" disabled>
</div>
<div class="form-group col-md-4">
<label>Tolerancia(min)</label>
<input type="number" min="0" value="0" class="form-control text-center" id="txtToleranciaLV">
</div>
<div class="form-group col-md-4">
<label>Nuevo Horario LV</label>
<input type="time" min="00:00" max="23:59" class="form-control text-center" id="txtNuevoHorarioLV">
</div>
</div>
<div class="row">
<div class="form-group col-md-4">
<label>Horario Sabado</label>
<input type="time" class="form-control text-center" id="txtHorarioSabado" disabled>
</div>
<div class="form-group col-md-4">
<label>Tolerancia(min)</label>
<input type="number" min="0" value="0" class="form-control text-center" id="txtToleranciaSabado">
</div>
<div class="form-group col-md-4">
<label>Nuevo Horario Sabado</label>
<input type="time" min="00:00" max="23:59" class="form-control text-center" id="txtNuevoHorarioSabado">
</div>
</div>
<div class="row">
<div class="form-group col-md-6">
<label>Fecha Inicio</label>
<div class="input-group">
...
...
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