Commit dd3f466b by Luis Gangas

[ADD] agregar funcion de crear contrato

parent 558c0390
...@@ -2,13 +2,7 @@ ...@@ -2,13 +2,7 @@
<project version="4"> <project version="4">
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="f1229581-2498-4c33-b7b4-f715a5fbe428" name="Default Changelist" comment=""> <list default="true" id="f1229581-2498-4c33-b7b4-f715a5fbe428" name="Default Changelist" comment="">
<change afterPath="$PROJECT_DIR$/web/js/pages/contratos.js" afterDir="false" />
<change afterPath="$PROJECT_DIR$/web/vistas/contratos.jsp" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" /> <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/java/trismegistoplanilla/mysqldao/FichaLaboralMysqlDAO.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/java/trismegistoplanilla/mysqldao/FichaLaboralMysqlDAO.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/java/trismegistoplanilla/mysqldao/LoteFichaMysqlDAO.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/java/trismegistoplanilla/mysqldao/LoteFichaMysqlDAO.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/java/trismegistoplanilla/mysqldao/UbigeoMysqlDAO.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/java/trismegistoplanilla/mysqldao/UbigeoMysqlDAO.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/web/vistas/consultaFichas.jsp" beforeDir="false" afterPath="$PROJECT_DIR$/web/vistas/consultaFichas.jsp" afterDir="false" />
</list> </list>
<ignored path="$PROJECT_DIR$/.tmp/" /> <ignored path="$PROJECT_DIR$/.tmp/" />
<ignored path="$PROJECT_DIR$/temp/" /> <ignored path="$PROJECT_DIR$/temp/" />
...@@ -23,12 +17,12 @@ ...@@ -23,12 +17,12 @@
<session id="1890756217"> <session id="1890756217">
<usages-collector id="statistics.lifecycle.project"> <usages-collector id="statistics.lifecycle.project">
<counts> <counts>
<entry key="project.closed" value="4" /> <entry key="project.closed" value="6" />
<entry key="project.open.time.0" value="1" /> <entry key="project.open.time.0" value="1" />
<entry key="project.open.time.11" value="1" /> <entry key="project.open.time.11" value="1" />
<entry key="project.open.time.12" value="1" /> <entry key="project.open.time.12" value="1" />
<entry key="project.open.time.2" value="1" /> <entry key="project.open.time.2" value="2" />
<entry key="project.opened" value="3" /> <entry key="project.opened" value="4" />
</counts> </counts>
</usages-collector> </usages-collector>
<usages-collector id="statistics.file.extensions.edit"> <usages-collector id="statistics.file.extensions.edit">
...@@ -87,7 +81,6 @@ ...@@ -87,7 +81,6 @@
<foldersAlwaysOnTop value="true" /> <foldersAlwaysOnTop value="true" />
</navigator> </navigator>
<panes> <panes>
<pane id="Scope" />
<pane id="ProjectPane"> <pane id="ProjectPane">
<subPane> <subPane>
<expand> <expand>
...@@ -99,6 +92,7 @@ ...@@ -99,6 +92,7 @@
<select /> <select />
</subPane> </subPane>
</pane> </pane>
<pane id="Scope" />
</panes> </panes>
</component> </component>
<component name="PropertiesComponent"> <component name="PropertiesComponent">
...@@ -134,16 +128,17 @@ ...@@ -134,16 +128,17 @@
<workItem from="1542041168541" duration="651000" /> <workItem from="1542041168541" duration="651000" />
<workItem from="1542131520488" duration="128000" /> <workItem from="1542131520488" duration="128000" />
<workItem from="1542131715493" duration="780000" /> <workItem from="1542131715493" duration="780000" />
<workItem from="1542237645666" duration="600000" />
</task> </task>
<servers /> <servers />
</component> </component>
<component name="TimeTrackingManager"> <component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="5646000" /> <option name="totallyTimeSpent" value="6497000" />
</component> </component>
<component name="ToolWindowManager"> <component name="ToolWindowManager">
<frame x="-8" y="-8" width="1936" height="1056" extended-state="6" /> <frame x="-8" y="-8" width="1936" height="1056" extended-state="6" />
<layout> <layout>
<window_info content_ui="combo" id="Project" order="0" visible="true" weight="0.24973656" /> <window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.24973656" />
<window_info id="Structure" order="1" side_tool="true" weight="0.25" /> <window_info id="Structure" order="1" side_tool="true" weight="0.25" />
<window_info id="Favorites" order="2" side_tool="true" /> <window_info id="Favorites" order="2" side_tool="true" />
<window_info anchor="bottom" id="Message" order="0" /> <window_info anchor="bottom" id="Message" order="0" />
...@@ -154,7 +149,7 @@ ...@@ -154,7 +149,7 @@
<window_info anchor="bottom" id="Inspection" order="5" weight="0.4" /> <window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
<window_info anchor="bottom" id="TODO" order="6" /> <window_info anchor="bottom" id="TODO" order="6" />
<window_info anchor="bottom" id="Docker" order="7" show_stripe_button="false" /> <window_info anchor="bottom" id="Docker" order="7" show_stripe_button="false" />
<window_info active="true" anchor="bottom" id="Version Control" order="8" visible="true" weight="0.32929516" /> <window_info anchor="bottom" id="Version Control" order="8" visible="true" weight="0.32929516" />
<window_info anchor="bottom" id="Terminal" order="9" /> <window_info anchor="bottom" id="Terminal" order="9" />
<window_info anchor="bottom" id="Event Log" order="10" side_tool="true" /> <window_info anchor="bottom" id="Event Log" order="10" side_tool="true" />
<window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" /> <window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" />
......
...@@ -4,6 +4,8 @@ import java.sql.Connection; ...@@ -4,6 +4,8 @@ import java.sql.Connection;
import java.sql.PreparedStatement; import java.sql.PreparedStatement;
import java.sql.ResultSet; import java.sql.ResultSet;
import java.sql.SQLException; import java.sql.SQLException;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.json.JSONArray; import org.json.JSONArray;
import org.json.JSONObject; import org.json.JSONObject;
import trismegistoplanilla.beans.DetalleLoteFichaDocenteBean; import trismegistoplanilla.beans.DetalleLoteFichaDocenteBean;
...@@ -174,35 +176,6 @@ public class DetalleLoteFichaDocenteMysqlDAO implements DetalleLoteFichaDocenteD ...@@ -174,35 +176,6 @@ public class DetalleLoteFichaDocenteMysqlDAO implements DetalleLoteFichaDocenteD
int totalFilasInsetarSueldoDocente = resultadoInsertarSueldoDocente.length; int totalFilasInsetarSueldoDocente = resultadoInsertarSueldoDocente.length;
if (totalFilasInsetarSueldoDocente != 0) { if (totalFilasInsetarSueldoDocente != 0) {
sql
= "update estado_ficha_lote "
+ "set estado_registro = 0 "
+ "where codigo_ficha_lote = ? "
+ "and estado_ficha_lote.estado_registro = 1";
psDesactivarEstadoLote = cnx.prepareStatement(sql);
psDesactivarEstadoLote.setInt(1, data.getInt("codigoLote"));
int resultadoDesactivarEstadoLote = psDesactivarEstadoLote.executeUpdate();
if (resultadoDesactivarEstadoLote != 0) {
sql
= "insert into estado_ficha_lote "
+ "(codigo_ficha_lote, "
+ "codigo_tipo_estado_ficha_lote, "
+ "fecha_registro, "
+ "codigo_usuario, "
+ "estado_registro) "
+ "VALUES (?,?,now(),?,1)";
psInsertarEstadoLote = cnx.prepareStatement(sql);
psInsertarEstadoLote.setInt(1, data.getInt("codigoLote"));
if (!data.getBoolean("estadoLote")) { // No cambio los sueldos
psInsertarEstadoLote.setInt(2, 2); // Estado completado!
} else { // Si cambio los sueldos
psInsertarEstadoLote.setInt(2, 3); // Completado con obs
}
psInsertarEstadoLote.setInt(3, data.getInt("usuario"));
int resultadoInsertarEstadoLote = psInsertarEstadoLote.executeUpdate();
if (resultadoInsertarEstadoLote != 0) {
sql sql
= "update estado_ficha " = "update estado_ficha "
+ "set estado_registro = 0 " + "set estado_registro = 0 "
...@@ -257,18 +230,6 @@ public class DetalleLoteFichaDocenteMysqlDAO implements DetalleLoteFichaDocenteD ...@@ -257,18 +230,6 @@ public class DetalleLoteFichaDocenteMysqlDAO implements DetalleLoteFichaDocenteD
cnx.rollback(); cnx.rollback();
} }
} else {
response.setStatus(false);
response.setMessage("Lo sentimos, no se pudo insertar el estado del lote");
cnx.rollback();
}
} else {
response.setStatus(false);
response.setMessage("Lo sentimos, no se pudo desactivar el estado del lote");
cnx.rollback();
}
} else { } else {
response.setStatus(false); response.setStatus(false);
response.setMessage("Lo sentimos, no se pudo insertar los estados de los sueldos"); response.setMessage("Lo sentimos, no se pudo insertar los estados de los sueldos");
...@@ -281,10 +242,15 @@ public class DetalleLoteFichaDocenteMysqlDAO implements DetalleLoteFichaDocenteD ...@@ -281,10 +242,15 @@ public class DetalleLoteFichaDocenteMysqlDAO implements DetalleLoteFichaDocenteD
cnx.rollback(); cnx.rollback();
} }
} catch (SQLException e) { } catch (Exception e) {
e.printStackTrace(); try {
response.setStatus(false); e.printStackTrace();
response.setMessage("Error: " + e.getMessage() + " \n Error Code: [" + e.getErrorCode() + "]"); response.setStatus(false);
response.setMessage("Error: " + e.getMessage());
cnx.rollback();
} catch (SQLException ex) {
Logger.getLogger(DetalleLoteFichaDocenteMysqlDAO.class.getName()).log(Level.SEVERE, null, ex);
}
} finally { } finally {
try { try {
if (psInsertarEstadoFicha != null) { if (psInsertarEstadoFicha != null) {
......
...@@ -1283,25 +1283,10 @@ public class FichaMysqlDAO implements FichaDAO { ...@@ -1283,25 +1283,10 @@ public class FichaMysqlDAO implements FichaDAO {
+ " DATE_FORMAT( " + " DATE_FORMAT( "
+ " estado_ficha.fecha_registro, " + " estado_ficha.fecha_registro, "
+ " '%d/%m/%Y' " + " '%d/%m/%Y' "
+ ") + ' ' + INSERT ( "
+ " REPLACE ( "
+ " RIGHT ( "
+ " DATE_FORMAT( "
+ " estado_ficha.fecha_registro, "
+ " 0 "
+ " ), "
+ " 7 "
+ " ), "
+ " ' ', "
+ " '0' "
+ " ), "
+ " 6, "
+ " 0, "
+ " ' ' "
+ ") fecharegistroficha, " + ") fecharegistroficha, "
+ " tipo_estado_ficha.codigo_tipo_estado_ficha codigoTipoEstadoFicha, " + " tipo_estado_ficha.codigo_tipo_estado_ficha codigoTipoEstadoFicha, "
+ " tipo_estado_ficha.nombre estadoficha, " + " tipo_estado_ficha.nombre estadoficha, "
+ " '<span class=\"' + tipo_estado_ficha.estilo + '\">' + tipo_estado_ficha.nombre + '</span>' estilo " + " CONCAT('<span class=\"',tipo_estado_ficha.estilo, '\">', tipo_estado_ficha.nombre,'</span>' ) estilo "
+ "FROM " + "FROM "
+ " ficha " + " ficha "
+ "INNER JOIN personal ON personal.codper = ficha.codigo_persona " + "INNER JOIN personal ON personal.codper = ficha.codigo_persona "
...@@ -1549,7 +1534,7 @@ public class FichaMysqlDAO implements FichaDAO { ...@@ -1549,7 +1534,7 @@ public class FichaMysqlDAO implements FichaDAO {
// + "inner join area ON area.codigo_area = area_cargo.codigo_area " // + "inner join area ON area.codigo_area = area_cargo.codigo_area "
// + "inner join cargo ON cargo.codigo_cargo = area_cargo.codigo_cargo " // + "inner join cargo ON cargo.codigo_cargo = area_cargo.codigo_cargo "
// + "where ficha_laboral.codigo_ficha = ?"; // + "where ficha_laboral.codigo_ficha = ?";
<<<<<<<<< Temporary merge branch 1 //<<<<<<<<< Temporary merge branch 1
String sql = "SELECT " String sql = "SELECT "
+ " ficha.codigo_ficha codigoficha, " + " ficha.codigo_ficha codigoficha, "
+ " personal.codper codigopersona, " + " personal.codper codigopersona, "
...@@ -1576,7 +1561,7 @@ public class FichaMysqlDAO implements FichaDAO { ...@@ -1576,7 +1561,7 @@ public class FichaMysqlDAO implements FichaDAO {
+ " estado_ficha.fecha_registro fecharegistroficha, " + " estado_ficha.fecha_registro fecharegistroficha, "
+ " tipo_estado_ficha.codigo_tipo_estado_ficha codigoTipoEstadoFicha, " + " tipo_estado_ficha.codigo_tipo_estado_ficha codigoTipoEstadoFicha, "
+ " tipo_estado_ficha.nombre estadoficha, " + " tipo_estado_ficha.nombre estadoficha, "
+ " '<span class=\"' + tipo_estado_ficha.estilo + '\">' + tipo_estado_ficha.nombre + '</span>' estilo " + " CONCAT('<span class=\"',tipo_estado_ficha.estilo, '\">', tipo_estado_ficha.nombre,'</span>' ) estilo "
+ "FROM " + "FROM "
+ " ficha " + " ficha "
+ "INNER JOIN personal ON personal.codper = ficha.codigo_persona " + "INNER JOIN personal ON personal.codper = ficha.codigo_persona "
...@@ -3116,6 +3101,6 @@ public class FichaMysqlDAO implements FichaDAO { ...@@ -3116,6 +3101,6 @@ public class FichaMysqlDAO implements FichaDAO {
JOvalidarFichaActiva = new JSONObject(response); JOvalidarFichaActiva = new JSONObject(response);
return JOvalidarFichaActiva; return JOvalidarFichaActiva;
} }
>>>>>>>>> Temporary merge branch 2 //>>>>>>>>> Temporary merge branch 2
} }
let fichas
const helpers = { const helpers = {
ajaxRequest(obj) { ajaxRequest(obj) {
return $.ajax({ return $.ajax({
...@@ -86,7 +88,7 @@ const httpRequest = { ...@@ -86,7 +88,7 @@ const httpRequest = {
$(document.querySelector('#tblFichas')).DataTable().destroy() $(document.querySelector('#tblFichas')).DataTable().destroy()
document.querySelector('#tblFichas tbody').innerHTML = '' document.querySelector('#tblFichas tbody').innerHTML = ''
$(document.querySelector('#tblFichas')).DataTable({ $(document.querySelector('#tblFichas')).DataTable({
data: obj.data.fichas, data: fichas,
bInfo: false, bInfo: false,
paging: false, paging: false,
columnDefs: [ columnDefs: [
...@@ -170,7 +172,7 @@ const httpRequest = { ...@@ -170,7 +172,7 @@ const httpRequest = {
$(document.querySelector('#tblFichas')).DataTable().destroy() $(document.querySelector('#tblFichas')).DataTable().destroy()
document.querySelector('#tblFichas tbody').innerHTML = '' document.querySelector('#tblFichas tbody').innerHTML = ''
$(document.querySelector('#tblFichas')).DataTable({ $(document.querySelector('#tblFichas')).DataTable({
data: obj.data.fichas, data: fichas,
bInfo: false, bInfo: false,
paging: false, paging: false,
columnDefs: [ columnDefs: [
...@@ -310,10 +312,235 @@ const httpRequest = { ...@@ -310,10 +312,235 @@ const httpRequest = {
} }
} }
const fichasAdministrativo = {
init() {
this.actualizarFichas()
},
actualizarFichas() {
let obj = this.validarFichas()
if (obj.status) {
delete obj["status"]
jAlert({
type: 'confirm',
content: 'Asegúrese de revisar bien la información de los sueldos de las fichas.',
buttons: {left: 'Si', right: 'No'}
}).then(flag => {
if (flag) {
console.log(obj)
httpRequest.registrarSueldoAdministrativo(obj)
.then(data => {
if (data.status) {
jAlert({
type: 'success',
content: `Se hizo la peticion correctamente.`,
buttons: {left: 'Aceptar'}
}).then(flag => {
if (flag) {
window.location = 'lotesFicha.jsp'
}
})
} else {
jAlert({type: 'error', content: data.message, buttons: {left: 'Aceptar'}})
}
})
.catch(err => jAlert({type: 'error', content: err, buttons: {left: 'Aceptar'}}))
}
})
}
},
validarFichas() {
let json = this.obtenerData()
let flagActualizar = false
if (json.estadoLote) {
let fichas = json.fichas
for (let ficha in fichas) {
if (fichas[ficha].estadoFicha) {
if (fichas[ficha].observacion === "") {
let input = $($($('#tblFichas tbody').find('tr')[ficha]).find('td')[7]).children()
input.next().remove()
input.addClass('tp-error-input-observacion')
input.after('<span style="color: #F44336">Debe ingresar una observación</span>')
input.parent('td').css({textAlign: 'left'})
flagActualizar = false
} else {
flagActualizar = true
}
} else {
$($($('#tblFichas tbody').find('tr')[ficha]).find('td')[7]).children().removeClass('tp-error-input-observacion')
}
}
} else {
$('#tblFichas tbody tr').each((i, el) => {
$($(el).find('td')[7]).children().removeClass('tp-error-input-observacion')
})
flagActualizar = true
}
json.status = flagActualizar
return json
},
obtenerData() {
let new_data = getDataAdministrativoJSON(), flag = false
let data = fichas
for (let ficha in data) {
if (data[ficha].sueldoMensual === new_data[ficha].sueldoPresidencia) {
new_data[ficha].estadoFicha = false
} else {
new_data[ficha].estadoFicha = true
flag = true
}
}
return {
fichas: new_data,
estadoLote: flag
}
}
}
const fichasDocente = {
init() {
this.actualizarFichas()
},
actualizarFichas() {
let obj = this.validarFichas()
if (obj.status) {
delete obj["status"]
jAlert({
type: 'confirm',
content: 'Asegúrese de revisar bien la información de los sueldos de las fichas.',
buttons: {left: 'Si', right: 'No'}
}).then(flag => {
if (flag) {
console.log(obj)
httpRequest.registrarSueldoDocente(obj)
.then(data => {
if (data.status) {
jAlert({
type: 'success',
content: `Se hizo la peticion correctamente.`,
buttons: {left: 'Aceptar'}
}).then(flag => {
if (flag) {
window.location = 'lotesFicha.jsp'
}
})
} else {
jAlert({type: 'error', content: data.message, buttons: {left: 'Aceptar'}})
}
})
.catch(err => jAlert({type: 'error', content: err, buttons: {left: 'Aceptar'}}))
}
})
}
},
validarFichas() {
let json = this.obtenerData()
let flagActualizar = false
if (json.estadoLote) {
let fichas = json.fichas
for (let ficha in fichas) {
if (fichas[ficha].estadoFicha) {
if (fichas[ficha].observacion === "") {
let input = $($($('#tblFichas tbody').find('tr')[ficha]).find('td')[8]).children()
input.next().remove()
input.addClass('tp-error-input-observacion')
input.after('<span style="color: #F44336">Debe ingresar una observación</span>')
flagActualizar = false
} else {
flagActualizar = true
}
} else {
$($($('#tblFichas tbody').find('tr')[ficha]).find('td')[8]).children().removeClass('tp-error-input-observacion')
}
}
} else {
$('#tblFichas tbody tr').each((i, el) => {
$($(el).find('td')[8]).children().removeClass('tp-error-input-observacion')
})
flagActualizar = true
}
json.status = flagActualizar
return json
},
obtenerData() {
let new_data = getDataDocenteJSON(), flag = false
let data = fichas
for (let ficha in data) {
if (data[ficha].costoMensual === new_data[ficha].costoMensual &&
data[ficha].costoa === new_data[ficha].costoa &&
data[ficha].costob === new_data[ficha].costob &&
data[ficha].costoc === new_data[ficha].costoc) {
new_data[ficha].estadoFicha = false
} else {
new_data[ficha].estadoFicha = true
flag = true
}
}
return {
fichas: new_data,
estadoLote: flag
}
}
}
const getDataDocenteJSON = () => {
let table = $(document.querySelector('#tblFichas tbody'))
let jsonData = []
table.find('tr').each(function (i, el) {
let row = $(this).find('td')
let codigoFicha = $('#tblFichas').DataTable().row(i).data().codigoFicha
let codigoPago = $('#tblFichas').DataTable().row(i).data().codigoPago
let costoMensual = row.eq(4).text()
let costoa = row.eq(5).text()
let costob = row.eq(6).text()
let costoc = row.eq(7).text()
let observacion = row.eq(8).find('input').val()
let json = `
{
"codigoFicha" : ${codigoFicha},
"codigoPago" : ${codigoPago},
"costoMensual": "${costoMensual}",
"costoa":"${costoa}",
"costob":"${costob}",
"costoc":"${costoc}",
"observacion":"${observacion}"
}
`
jsonData.push(JSON.parse(json))
})
return jsonData
}
const getDataAdministrativoJSON = () => {
let table = $(document.querySelector('#tblFichas tbody'))
let jsonData = []
table.find('tr').each(function (i, el) {
let row = $(this).find('td')
let codigoFicha = $('#tblFichas').DataTable().row(i).data().codigoFicha
let codigoAreaCargoTipoPago = $('#tblFichas').DataTable().row(i).data().codigoAreaCargoTipoPago
let sueldoEscalafon = `${row.eq(4).text().split('.')[1]}.${row.eq(4).text().split('.')[2]}`.trim()
let sueldoMensual = `${row.eq(5).text().split('.')[1]}.${row.eq(5).text().split('.')[2]}`.trim()
let sueldoPresidencia = row.eq(6).text()
let observacion = row.eq(7).find('input').val()
let json = `
{
"codigoFicha" : ${codigoFicha},
"codigoAreaCargoTipoPago" : ${codigoAreaCargoTipoPago},
"sueldoEscalafon": "${sueldoEscalafon}",
"sueldoMensual":"${sueldoMensual}",
"sueldoPresidencia":"${sueldoPresidencia}",
"observacion":"${observacion}"
}
`
jsonData.push(JSON.parse(json))
})
return jsonData
}
const eventos = { const eventos = {
init() { init() {
this.listarFichaPersonal() this.listarFichaPersonal()
this.verDetalle() this.verDetalle()
this.actualizarFicha()
}, },
listarFichaPersonal() { listarFichaPersonal() {
document.querySelector('#cboCriterioFiltroFicha').addEventListener('change', (e) => { document.querySelector('#cboCriterioFiltroFicha').addEventListener('change', (e) => {
...@@ -323,6 +550,7 @@ const eventos = { ...@@ -323,6 +550,7 @@ const eventos = {
helpers.ajaxRequest({ helpers.ajaxRequest({
url: '../DetalleLoteFichaDocenteServlet?accion=listarDetalleLoteFichaDocenteDT' url: '../DetalleLoteFichaDocenteServlet?accion=listarDetalleLoteFichaDocenteDT'
}).then(data => { }).then(data => {
fichas = data.data.fichas
printComponents.tablaHead(criterio) printComponents.tablaHead(criterio)
.then(() => { .then(() => {
httpRequest.listarFichasDocente(data) httpRequest.listarFichasDocente(data)
...@@ -333,6 +561,7 @@ const eventos = { ...@@ -333,6 +561,7 @@ const eventos = {
helpers.ajaxRequest({ helpers.ajaxRequest({
url: '../DetalleLoteFichaDocenteServlet?accion=listarDetalleLoteFichaAdministrativoDT' url: '../DetalleLoteFichaDocenteServlet?accion=listarDetalleLoteFichaAdministrativoDT'
}).then(data => { }).then(data => {
fichas = data.data.fichas
printComponents.tablaHead(criterio) printComponents.tablaHead(criterio)
.then(() => { .then(() => {
httpRequest.listarFichasAdministrativo(data) httpRequest.listarFichasAdministrativo(data)
...@@ -359,6 +588,13 @@ const eventos = { ...@@ -359,6 +588,13 @@ const eventos = {
actualizarFicha() { actualizarFicha() {
$('#btnActualizarFicha').on('click', (e) => { $('#btnActualizarFicha').on('click', (e) => {
let criterio = $('#cboCriterioFiltroFicha').val() let criterio = $('#cboCriterioFiltroFicha').val()
if (criterio) {
if (criterio == 'D') {
fichasDocente.actualizarFichas()
} else if (criterio == 'A') {
fichasAdministrativo.actualizarFichas()
}
}
}) })
} }
} }
......
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