Commit 01b098b2 by Billy Larru

[EDIT detalle montos docentes, mostrando informacion del personal]

parent 6b265b14
......@@ -33,11 +33,11 @@ import org.json.JSONObject;
*
* @author Percy Oliver Quispe Huarcaya
*/
public class RequestsFilter implements Filter {
public class RequestFilter implements Filter {
private FilterConfig filterConfig = null;
public RequestsFilter() {
public RequestFilter() {
}
private void doBeforeProcessing(ServletRequest req, ServletResponse resp, FilterChain chain)
......@@ -50,7 +50,6 @@ public class RequestsFilter implements Filter {
chain.doFilter(req, resp);
return;
}
System.out.println("ha pasado el if modals");
if (uri.endsWith("vistas/index.jsp")) {
if (request.getSession().getAttribute("codigo") != null) {
response.sendRedirect("main.jsp");
......
......@@ -2,7 +2,7 @@
<web-app version="3.1" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd">
<filter>
<filter-name>RequestsFilter</filter-name>
<filter-class>asistencia.filters.RequestsFilter</filter-class>
<filter-class>asistencia.filters.RequestFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>RequestsFilter</filter-name>
......
......@@ -58,7 +58,7 @@ const URI_PERIODOCIERRE = "periodoCierreAsistencia"
const URI_PERIODOCIERRE_SEDES = "periodoSedes"
const URI_JUSTIFICACION_ASISTENCIAS = "asistenciaJustificacion"
const URI_DOCENTES_MONTOS = "montosDocentes"
const URI_TIPOPLANILLAS = "tipoPlanilla"
const URI_TIPOPLANILLAS = "tipoPlanillaReal"
//</editor-fold>
const swalWithBootstrapButtons = swal.mixin({
......
......@@ -63,7 +63,7 @@ function getColumns() {
className: 'text-center'
},
{
title: `FIRMÓ SALIDA <input type="checkbox" id="chkFirmaTodo">`,
title: `FIRMÓ SALIDA <br><input type="checkbox" id="chkFirmaTodo">`,
data: `firmo_salida`,
className: 'text-center',
render: (data) => {
......
let personal
const recibirData = () => {
let data = localStorage.getItem('data')
let filter = localStorage.getItem('filtros')
personal = data ? JSON.parse(data) : null;
filtros = filter ? JSON.parse(filter) : null;
// localStorage.removeItem('data')
// localStorage.removeItem('filtros')
}
const mostrarDatosTrabajador = () => {
let id = personal.trabajador_id
ajaxWebService.get(`${URI_TRABAJADORES}/${id}`)
.then((response) => {
if (response.status) {
let trabajador = response.data;
$("#spanNombres").text(`${trabajador.apellidos} ${trabajador.nombres}`)
}
})
}
$(document).ready(function () {
recibirData();
mostrarDatosTrabajador()
})
\ No newline at end of file
......@@ -80,36 +80,44 @@ function listarMontosDocentes(objParams = {}){
).then((nodes) => {
nodes.container
.off()
.on("click", ".verdetalle", function () {
let data = nodes.datatable.DataTable().row($(this).parents("tr")).data();
// mostrarModalVerDetalleDescuentoAsistencia(data);
})
.on("click", ".verdetalle", (e) => verDetalle(getDataRow(nodes.datatable, e)))
});
});
}
const verDetalle = (data) => {
localStorage.setItem('data', JSON.stringify(data))
debugger
location.href = `${baseURLModals}docentesporhoras/montos/detalleMontosDocentes.jsp`
}
const aplicarFiltro = () => {
}
const listarTipoPlanillas = () => {
const listarTipoPlanillas = (nodeIdentifier) => {
ajaxWebService.get(URI_TIPOPLANILLAS).then((response) => {
let tipoplanillas = response.data
let html = ""
html += tipoplanillas.map(tipoplanilla => `<option value="${tipoplanilla.id}">${tipoplanilla.descripcion}</option>`)
$(nodeIdentifier).html(html)
})
}
const formControls = {
init() {
this.initTipoPlanillas()
},
initTipoPlanillas() {
listarTipoPlanillas("#cboTipoPlanilla")
}
}
$(document).ready(function () {
formControls.init()
$("#btnMostrarTodo").click(listarMontosDocentes)
$("#btnAplicarFiltro").click(aplicarFiltro)
})
\ No newline at end of file
<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="${pageContext.request.contextPath}/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">Información del personal</h5>
</div>
<div class="panel-body">
<div class="row">
<div class="col-md-6 form-group">
<label>Personal</label>
<span class="label label-left border-left border-left-primary label-striped form-control" id="spanNombres"></span>
</div>
<div class="col-md-6 form-group">
<label>Costos</label>
<ul id="ulCostos"></ul>
</div>
</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/core/libraries/jquery_ui/widgets.min.js" type="text/javascript"></script>
<script src="${pageContext.request.contextPath}/plantilla/assets/js/plugins/ui/moment/moment.min.js" type="text/javascript"></script>
<script src="${pageContext.request.contextPath}/plantilla/assets/js/plugins/pickers/datepicker.js" type="text/javascript"></script>
<script src="${pageContext.request.contextPath}/js/lib/bootstrap-select.min.js" type="text/javascript"></script>
<script src="${pageContext.request.contextPath}/plantilla/assets/js/plugins/forms/selects/select2.min.js"></script>
<script src="${pageContext.request.contextPath}/js/lib/lodash.js" type="text/javascript"></script>
<script src="../../../../js/pages/detalle_montos_docentes.js" type="text/javascript"></script>
<!--js-->
</body>
</html>
\ No newline at end of file
......@@ -31,6 +31,28 @@
</select>
</div>
</div>
<div class="row">
<div class="col-md-4 form-group">
<label>SEDE</label>
<select class="select-search form-control" id="cboTipoPlanilla" >
</select>
</div>
<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>
</div>
<div class="panel-footer">
<div class="text-center">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment