[FIN] solicitud nro1

parent 478f09ae
...@@ -55,7 +55,8 @@ public class MySqlDisponibilidadDAO implements DisponibilidadDocenteDAO { ...@@ -55,7 +55,8 @@ public class MySqlDisponibilidadDAO implements DisponibilidadDocenteDAO {
} }
@Override
@Override
public int registrarDisponibilidadConformidad(String codDoc, String diaDispConfirmados, String periodo) throws Exception { public int registrarDisponibilidadConformidad(String codDoc, String diaDispConfirmados, String periodo) throws Exception {
int dato = 0; int dato = 0;
int res = 0; int res = 0;
...@@ -227,6 +228,8 @@ public class MySqlDisponibilidadDAO implements DisponibilidadDocenteDAO { ...@@ -227,6 +228,8 @@ public class MySqlDisponibilidadDAO implements DisponibilidadDocenteDAO {
disp.setDiaDis(rs.getString("diaDis")); disp.setDiaDis(rs.getString("diaDis"));
lista.add(disp); lista.add(disp);
} }
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
} finally { } finally {
...@@ -316,7 +319,7 @@ public class MySqlDisponibilidadDAO implements DisponibilidadDocenteDAO { ...@@ -316,7 +319,7 @@ public class MySqlDisponibilidadDAO implements DisponibilidadDocenteDAO {
Statement st = cnx.createStatement(); Statement st = cnx.createStatement();
String queryConsulta = "SELECT IFNULL(diaDis,'') as diaDis from disponibilidad_docente WHERE codDoc='" + codDoc + "' AND cod_per='" + periodo + "'"; String queryConsulta = "SELECT IFNULL(diaDis,'') as diaDis from disponibilidad_docente WHERE codDoc='" + codDoc + "' AND cod_per='" + periodo + "'";
System.out.println("ssss--> "+queryConsulta);
ResultSet rs = st.executeQuery(queryConsulta); ResultSet rs = st.executeQuery(queryConsulta);
if (rs.next()) { if (rs.next()) {
...@@ -327,6 +330,7 @@ public class MySqlDisponibilidadDAO implements DisponibilidadDocenteDAO { ...@@ -327,6 +330,7 @@ public class MySqlDisponibilidadDAO implements DisponibilidadDocenteDAO {
} finally { } finally {
cnx.close(); cnx.close();
} }
return dato; return dato;
} }
......
...@@ -108,11 +108,13 @@ public class MySqlDocenteDAO implements DocenteDAO { ...@@ -108,11 +108,13 @@ public class MySqlDocenteDAO implements DocenteDAO {
docente.setApe_pro(rs.getString("apellido")); docente.setApe_pro(rs.getString("apellido"));
lista.add(docente); lista.add(docente);
} }
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
} finally { } finally {
cnx.close(); cnx.close();
} }
return lista; return lista;
} }
...@@ -133,7 +135,8 @@ public class MySqlDocenteDAO implements DocenteDAO { ...@@ -133,7 +135,8 @@ public class MySqlDocenteDAO implements DocenteDAO {
Statement st = cnx.createStatement(); Statement st = cnx.createStatement();
String query = "SELECT codprofesor, nombre, apellido, dni from profesor WHERE codprofesor='" + cod + "';"; String query = "SELECT codprofesor, nombre, apellido, dni from profesor WHERE codprofesor='" + cod + "';";
System.out.println("(5)-- NombreDocente -->>> " + query); System.out.println("(5)-- NombreDocente ->" + query);
ResultSet rs = st.executeQuery(query); ResultSet rs = st.executeQuery(query);
if (rs.next()) { if (rs.next()) {
...@@ -163,7 +166,7 @@ public class MySqlDocenteDAO implements DocenteDAO { ...@@ -163,7 +166,7 @@ public class MySqlDocenteDAO implements DocenteDAO {
docente.setApe_pro(rs3.getString("apellido")); docente.setApe_pro(rs3.getString("apellido"));
docente.setNom_pro(rs3.getString("nombre")); docente.setNom_pro(rs3.getString("nombre"));
docente.setDni("dni"); docente.setDni("dni");
// docente.setTelefono("telefono");
} }
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
...@@ -364,6 +367,8 @@ public class MySqlDocenteDAO implements DocenteDAO { ...@@ -364,6 +367,8 @@ public class MySqlDocenteDAO implements DocenteDAO {
docente.setCell(rs.getString("cel_dat_per")); docente.setCell(rs.getString("cel_dat_per"));
docente.setCantHijos(rs.getInt("cant_hijos")); docente.setCantHijos(rs.getInt("cant_hijos"));
} }
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
} finally { } finally {
......
...@@ -483,6 +483,7 @@ public class MySqlPlanaDAO implements PlanaDAO { ...@@ -483,6 +483,7 @@ public class MySqlPlanaDAO implements PlanaDAO {
plana.setEst_plana(rs.getInt("estado")); plana.setEst_plana(rs.getInt("estado"));
lista.add(plana); lista.add(plana);
} }
System.out.println("lista planaAsiste ---->"+lista);
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
} finally { } finally {
......
...@@ -211,7 +211,7 @@ public class ServletArea extends HttpServlet { ...@@ -211,7 +211,7 @@ public class ServletArea extends HttpServlet {
PrintWriter pw = response.getWriter(); PrintWriter pw = response.getWriter();
pw.println("<select id='"+nombreId+"' class='chosen-select form-control validate[required]' onChange='" + accion + "'>"); pw.println("<select id='"+nombreId+"' class='chosen-select form-control validate[required]' onChange='" + accion + "'>");
pw.println("<option value=''>[SELECCIONE]</option>");
for (int i = 0; i < lista.size(); i++) { for (int i = 0; i < lista.size(); i++) {
pw.println("<option value='" + lista.get(i).getCodigoArea() + "' selected>" + lista.get(i).getNombreArea() + "</option>"); pw.println("<option value='" + lista.get(i).getCodigoArea() + "' selected>" + lista.get(i).getNombreArea() + "</option>");
} }
......
...@@ -610,15 +610,15 @@ public class ServletDocente extends HttpServlet { ...@@ -610,15 +610,15 @@ public class ServletDocente extends HttpServlet {
} }
pw.println("</tr>" pw.println("</tr>"
+ " </thead>" + " </thead>"
+ " <tbody>"); + " <tbody>");
int cont = 1; int cont = 1;
//CODIGOS DE DOCENTES //CODIGOS DE DOCENTES
for (int i = 0; i < lista.size(); i++) { for (int i = 0; i < lista.size(); i++) {
if (cadenaCodigoDocente.equals("")) { if (cadenaCodigoDocente.equals("")) {
cadenaCodigoDocente += lista.get(i).getCod_pro(); cadenaCodigoDocente += lista.get(i).getCod_pro();
} else { }else{
cadenaCodigoDocente += "," + lista.get(i).getCod_pro(); cadenaCodigoDocente += "," + lista.get(i).getCod_pro();
} }
} }
...@@ -648,11 +648,11 @@ public class ServletDocente extends HttpServlet { ...@@ -648,11 +648,11 @@ public class ServletDocente extends HttpServlet {
int valor = 0; int valor = 0;
for (int x = 0; x < listaAD.size(); x++) { for (int x = 0; x < listaAD.size(); x++) {
if (listaAD.get(x).getCodigoArea() == listaA.get(j).getCodigoArea()) { if (listaAD.get(x).getCodigoArea() == listaA.get(j).getCodigoArea()) {
if (listaAD.get(x).getCodigoDocente().equals(lista.get(i).getCod_pro())) { if (listaAD.get(x).getCodigoDocente().equals(lista.get(i).getCod_pro())) {
valor = 1; valor = 1;
} }
} }
} }
if (valor == 1) { if (valor == 1) {
...@@ -660,17 +660,18 @@ public class ServletDocente extends HttpServlet { ...@@ -660,17 +660,18 @@ public class ServletDocente extends HttpServlet {
} else { } else {
pw.println("<td align='center' valign='middle'><input type='checkbox' name='" + dato + "_docente_" + cont + "' value='" + codArea + "_" + codDocente + "' /></td>"); pw.println("<td align='center' valign='middle'><input type='checkbox' name='" + dato + "_docente_" + cont + "' value='" + codArea + "_" + codDocente + "' /></td>");
} }
valor = 0; valor = 0;
/* /*
codArea = ""+listaA.get(j).getCodigoArea(); codArea = ""+listaA.get(j).getCodigoArea();
codDocente = ""+lista.get(i).getCodigoDocente(); codDocente = ""+lista.get(i).getCodigoDocente();
asignado = serviciosAD.consultarAsignado(codDocente, codArea); asignado = serviciosAD.consultarAsignado(codDocente, codArea);
if(asignado==0){ if(asignado==0){
pw.println(" <td align='center' valign='middle'><input type='checkbox' name='"+dato+"_docente_"+cont+"' value='"+codArea+"_"+codDocente+"' /></td>"); pw.println(" <td align='center' valign='middle'><input type='checkbox' name='"+dato+"_docente_"+cont+"' value='"+codArea+"_"+codDocente+"' /></td>");
}else{ }else{
pw.println(" <td align='center' valign='middle'><a href=\"javascript:quitarAreaSelecciona("+codArea+","+codDocente+");\" class=\"regular\" ><img src=\"imagenes/icons/check_box.png\" /></a></td>"); pw.println(" <td align='center' valign='middle'><a href=\"javascript:quitarAreaSelecciona("+codArea+","+codDocente+");\" class=\"regular\" ><img src=\"imagenes/icons/check_box.png\" /></a></td>");
} }
*/ */
} }
...@@ -683,9 +684,9 @@ public class ServletDocente extends HttpServlet { ...@@ -683,9 +684,9 @@ public class ServletDocente extends HttpServlet {
} }
int cantidad = cont - 1; int cantidad = cont - 1;
pw.println("</tbody>" pw.println("</tbody>"
+ " </table>" + " </table>"
+ " </div>" + " </div>"
+ " </td></tr></table>" + " </td></tr></table>"
+ "<input type='hidden' id='codAreas' value='" + codigosArea + "' />" + "<input type='hidden' id='codAreas' value='" + codigosArea + "' />"
+ "<input type='hidden' id='cantidad' value='" + cantidad + "' />"); + "<input type='hidden' id='cantidad' value='" + cantidad + "' />");
} }
...@@ -2386,7 +2387,7 @@ public class ServletDocente extends HttpServlet { ...@@ -2386,7 +2387,7 @@ public class ServletDocente extends HttpServlet {
pw.println(" <td><div id='divPlanaAsisteEdit'>" pw.println(" <td><div id='divPlanaAsisteEdit'>"
+ " <select id='cmbProv' >" + " <select class='form-control' id='cmbDis'>"
+ " <option value=''>[Seleccione]</option>" + " <option value=''>[Seleccione]</option>"
+ " </select>" + " </select>"
+ " </div> </td>"); + " </div> </td>");
...@@ -2408,6 +2409,8 @@ public class ServletDocente extends HttpServlet { ...@@ -2408,6 +2409,8 @@ public class ServletDocente extends HttpServlet {
+ " <option value=''>[Seleccione]</option>" + " <option value=''>[Seleccione]</option>"
+ " </select>" + " </select>"
+ " </div> </td>"); + " </div> </td>");
pw.println(" </tr>" pw.println(" </tr>"
+ " <tr>" + " <tr>"
+ " <td colspan='3' height='15'></td>" + " <td colspan='3' height='15'></td>"
...@@ -2514,16 +2517,11 @@ public class ServletDocente extends HttpServlet { ...@@ -2514,16 +2517,11 @@ public class ServletDocente extends HttpServlet {
String cel = request.getParameter("cel"); String cel = request.getParameter("cel");
int codDepartamento = Integer.parseInt(request.getParameter("codDepartamento")); int codDepartamento = Integer.parseInt(request.getParameter("codDepartamento"));
int cantHijos = Integer.parseInt(request.getParameter("cantHijos")); int cantHijos = Integer.parseInt(request.getParameter("cantHijos"));
int codProvincia = Integer.parseInt(request.getParameter("codProvincia")); int codProvincia = Integer.parseInt(request.getParameter("codProvincia"));
int codDistrito = Integer.parseInt(request.getParameter("codDistrito")); int codDistrito = Integer.parseInt(request.getParameter("codDistrito"));
int codArea = Integer.parseInt(request.getParameter("codArea")); int codArea = Integer.parseInt(request.getParameter("codArea"));
int codPlana = Integer.parseInt(request.getParameter("codPlana")); int codPlana = Integer.parseInt(request.getParameter("codPlana"));
int periodo = Integer.parseInt(request.getParameter("periodo")); int periodo = Integer.parseInt(request.getParameter("periodo"));
response.setContentType("text/html"); response.setContentType("text/html");
PrintWriter pw = response.getWriter(); PrintWriter pw = response.getWriter();
dato = servicios.registrarDatosEdit(codDocente, telefono, mail, codDepartamento, codProvincia, codDistrito, cel, dir,cantHijos,codArea,codPlana,periodo); dato = servicios.registrarDatosEdit(codDocente, telefono, mail, codDepartamento, codProvincia, codDistrito, cel, dir,cantHijos,codArea,codPlana,periodo);
...@@ -3032,7 +3030,7 @@ public class ServletDocente extends HttpServlet { ...@@ -3032,7 +3030,7 @@ public class ServletDocente extends HttpServlet {
int codDepartamento = 0; int codDepartamento = 0;
int codProvincia = 0; int codProvincia = 0;
int codDistrito = 0; int codDistrito = 0;
int numHijos = docente.getCantHijos();
if (docente.getTelefono() == null) { if (docente.getTelefono() == null) {
telefono = ""; telefono = "";
} else { } else {
...@@ -3084,6 +3082,14 @@ public class ServletDocente extends HttpServlet { ...@@ -3084,6 +3082,14 @@ public class ServletDocente extends HttpServlet {
+ " <td width='5'></td>" + " <td width='5'></td>"
+ " <td><input type='text' class='form-control validate[required ,custom[onlyCelular], maxSize[15], minSize[7]]' id='txt_new_celEdit' value='" + celular + "'/></td>" + " <td><input type='text' class='form-control validate[required ,custom[onlyCelular], maxSize[15], minSize[7]]' id='txt_new_celEdit' value='" + celular + "'/></td>"
+ " </tr>" + " </tr>"
+ " <tr>"
+ " <td height='15' colspan='3' ></td>"
+ " </tr>"
+ " <tr>"
+ " <td>Num.Hijos <font color='red'>*</font></td>"
+ " <td width='5'></td>"
+ " <td><input type='number' min='0' max='15' class='form-control validate[required]' id='txt_numHijos' value='"+numHijos+"'/></td>"
+ " </tr>"
+ " <tr>" + " <tr>"
+ " <td colspan='3' height='15'>" + " <td colspan='3' height='15'>"
+ " </tr>" + " </tr>"
...@@ -3095,6 +3101,43 @@ public class ServletDocente extends HttpServlet { ...@@ -3095,6 +3101,43 @@ public class ServletDocente extends HttpServlet {
+ " <tr>" + " <tr>"
+ " <td colspan='3' height='15'>" + " <td colspan='3' height='15'>"
+ " </tr>" + " </tr>"
// AREA
+ " <tr>"
+ " <td>Area <font color='red'>*</font></td>"
+ " <td width='5'></td>"
+ " <td>"
+ " <span id='divAreaEditarDatos'>"
+ " <select class='form-control' id='cmbDep' onChange='" + accion + "'>"
+ " <option value=''>[Seleccionar]</option>"
+ " </select>"
+ " </span>"
+ " </td>"
+ " </tr>"
+ " <tr>"
+ " <td colspan='3' height='15'>"
+ " </tr>"
// FIN AREA
// PLANA
+ " <tr>"
+ " <td>Plana Asiste<font color='red'>*</font></td>"
+ " <td width='5'></td>"
+ " <td>"
+ " <span id='divPlanaEditarDatos'>"
+ " <select class='form-control'>"
+ " <option>PRUEBA</option>"
+ " </select>"
+ " </span>"
+" </td>"
+ " </tr>"
// FIN PLANA
+ " <tr>"
+ " <td colspan='3' height='15'>"
+ " </tr>"
+ " <tr>" + " <tr>"
+ " <td>Departamento <font color='red'>*</font></td>" + " <td>Departamento <font color='red'>*</font></td>"
+ " <td width='5'></td>"); + " <td width='5'></td>");
......
...@@ -303,7 +303,7 @@ public class ServletMail extends HttpServlet { ...@@ -303,7 +303,7 @@ public class ServletMail extends HttpServlet {
} }
private void registroInforme(HttpServletRequest request, HttpServletResponse response) throws IOException { private void registroInforme(HttpServletRequest request, HttpServletResponse response) throws IOException {
HorarioServices serviceHorario=new HorarioServices(); HorarioServices serviceHorario=new HorarioServices();
response.setContentType("text/html"); response.setContentType("text/html");
PrintWriter pw = response.getWriter(); PrintWriter pw = response.getWriter();
......
...@@ -523,7 +523,7 @@ public class ServletPlana extends HttpServlet { ...@@ -523,7 +523,7 @@ public class ServletPlana extends HttpServlet {
PlanaServices servicios = new PlanaServices(); PlanaServices servicios = new PlanaServices();
DocenteServices servicio = new DocenteServices(); DocenteServices servicio = new DocenteServices();
ArrayList<Plana> lista = null; ArrayList<Plana> lista = null;
// String accion = request.getParameter("accion"); String accion = request.getParameter("accion");
String nombre = request.getParameter("nombre"); String nombre = request.getParameter("nombre");
String codDocente=request.getParameter("codDocente"); String codDocente=request.getParameter("codDocente");
String codper=request.getParameter("codper"); String codper=request.getParameter("codper");
...@@ -539,18 +539,19 @@ public class ServletPlana extends HttpServlet { ...@@ -539,18 +539,19 @@ public class ServletPlana extends HttpServlet {
response.setContentType("text/html"); response.setContentType("text/html");
PrintWriter pw = response.getWriter(); PrintWriter pw = response.getWriter();
pw.println("<select id='"+nombre+"' class='form-control validate[required]'"); pw.println("<select id='"+nombre+"' class='form-control validate[required]' onchange="+accion+">");
pw.println("<option value=''>[Seleccione]</option>"); pw.println("<option value=''>[SELECCIONE]</option>");
for(int i=0; i< lista.size(); i++) { for(int i=0; i< lista.size(); i++) {
System.out.println("estado de plana---->"+lista.get(i).getEst_plana());
if(codEstado == lista.get(i).getEst_plana()){ if(codEstado == lista.get(i).getEst_plana()){
pw.println("<option style=\"font-weight: bold;font-style: italic;\" value='"+lista.get(i).getCod_pla()+"' selected>"+lista.get(i).getNom_pla()+"</option>"); pw.println("<option style=\"font-weight: bold;font-style: italic;\" value='"+lista.get(i).getCod_pla()+"' selected>"+lista.get(i).getNom_pla()+"</option>");
}else{ }else{
pw.println("<option value='"+lista.get(i).getCod_pla()+"' >"+lista.get(i).getNom_pla()+"</option>"); pw.println("<option value='"+lista.get(i).getCod_pla()+"' >"+lista.get(i).getNom_pla()+"</option>");
} }
} }
pw.println("</select>"); pw.println("</select>");
} }
......
...@@ -1187,16 +1187,16 @@ window.jQuery || document.write("<script src='../assets/js/jquery1x.js'>"+"<"+"/ ...@@ -1187,16 +1187,16 @@ window.jQuery || document.write("<script src='../assets/js/jquery1x.js'>"+"<"+"/
"class" : "btn btn-primary btn-xs", "class" : "btn btn-primary btn-xs",
click: function() { click: function() {
guardarNuevaHoras(json); guardarNuevaHoras(json);
$(this).dialog("close"); $(this).dialog("close");
$("#dialog-mostrarHorasHorario").dialog("close"); $("#dialog-mostrarHorasHorario").dialog("close");
mostrarAlertConformidad() mostrarAlertConformidad()
} }
},{ },{
html: "<i class='ace-icon fa fa-times bigger-110'></i>&nbsp; NO", html: "<i class='ace-icon fa fa-times bigger-110'></i>&nbsp; NO",
"class" : "btn btn-danger btn-xs", "class" : "btn btn-danger btn-xs",
click: function() { click: function() {
$(this).dialog("close"); $(this).dialog("close");
$("#dialog-mostrarHorasHorario").dialog("close"); $("#dialog-mostrarHorasHorario").dialog("close");
} }
} }
] ]
...@@ -1276,8 +1276,8 @@ window.jQuery || document.write("<script src='../assets/js/jquery1x.js'>"+"<"+"/ ...@@ -1276,8 +1276,8 @@ window.jQuery || document.write("<script src='../assets/js/jquery1x.js'>"+"<"+"/
data: { data: {
json:JSON.stringify(json) json:JSON.stringify(json)
},success: function (data, textStatus, jqXHR) { },success: function (data, textStatus, jqXHR) {
console.log("respuesta "+ data) console.log("respuesta "+ data)
} }
}); });
...@@ -1292,7 +1292,7 @@ window.jQuery || document.write("<script src='../assets/js/jquery1x.js'>"+"<"+"/ ...@@ -1292,7 +1292,7 @@ window.jQuery || document.write("<script src='../assets/js/jquery1x.js'>"+"<"+"/
data: { data: {
json:JSON.stringify(json) json:JSON.stringify(json)
},success: function (data, textStatus, jqXHR) { },success: function (data, textStatus, jqXHR) {
data.data.forEach(function (horas) { data.data.forEach(function (horas) {
$("#txtHoraInicioHorario").val(horas.hor_ini) $("#txtHoraInicioHorario").val(horas.hor_ini)
$("#txtHoraFinHorario").val(horas.hor_fin) $("#txtHoraFinHorario").val(horas.hor_fin)
// console.log(horas.hor_ini) // console.log(horas.hor_ini)
...@@ -1358,7 +1358,7 @@ window.jQuery || document.write("<script src='../assets/js/jquery1x.js'>"+"<"+"/ ...@@ -1358,7 +1358,7 @@ window.jQuery || document.write("<script src='../assets/js/jquery1x.js'>"+"<"+"/
var periodo = "<%=periodo!=null?periodo.getCodigoPeriodo():""%>"; var periodo = "<%=periodo!=null?periodo.getCodigoPeriodo():""%>";
$.ajax({ $.ajax({
type: 'POST', type: 'POST',
// url:'../ServletHorario?Accion=armarAsignacionCursoDocGeneral2', // url:'../ServletHorario?Accion=armarAsignacionCursoDocGeneral2',
url: '../ServletHorario?Accion=armarAsignacionCursoDocGeneral3', url: '../ServletHorario?Accion=armarAsignacionCursoDocGeneral3',
data: 'dia=' + dia + '&Hini=' + Hor_ini + '&Hfin=' + Hor_fin + '&opcion=' + opcion + '&periodo=' + periodo, data: 'dia=' + dia + '&Hini=' + Hor_ini + '&Hfin=' + Hor_fin + '&opcion=' + opcion + '&periodo=' + periodo,
success: function (resultado) { success: function (resultado) {
...@@ -1499,6 +1499,7 @@ window.jQuery || document.write("<script src='../assets/js/jquery1x.js'>"+"<"+"/ ...@@ -1499,6 +1499,7 @@ window.jQuery || document.write("<script src='../assets/js/jquery1x.js'>"+"<"+"/
} }
function doSearch() { function doSearch() {
var tableReg = document.getElementById('tablaDocentes'); var tableReg = document.getElementById('tablaDocentes');
var searchText = document.getElementById('txtApeDocente').value.toLowerCase(); var searchText = document.getElementById('txtApeDocente').value.toLowerCase();
var cellsOfRow = ""; var cellsOfRow = "";
...@@ -1867,7 +1868,8 @@ window.jQuery || document.write("<script src='../assets/js/jquery1x.js'>"+"<"+"/ ...@@ -1867,7 +1868,8 @@ window.jQuery || document.write("<script src='../assets/js/jquery1x.js'>"+"<"+"/
function validar_RegistroAsigCurDoc(codigaGrupoHorario, bloq, dia, Hini, Hfin, codaula, opcion, Turno, contGeneral, historial) { function validar_RegistroAsigCurDoc(codigaGrupoHorario, bloq, dia, Hini, Hfin, codaula, opcion, Turno, contGeneral, historial) {
// debugger
// debugger
let valida = $('#cboMotivoCambio2').val(); let valida = $('#cboMotivoCambio2').val();
let valida2 = $('#cboMotivoCambio').val(); let valida2 = $('#cboMotivoCambio').val();
let validaFechaFin = $("#recibeFechaFin").val(); let validaFechaFin = $("#recibeFechaFin").val();
...@@ -1893,9 +1895,17 @@ window.jQuery || document.write("<script src='../assets/js/jquery1x.js'>"+"<"+"/ ...@@ -1893,9 +1895,17 @@ window.jQuery || document.write("<script src='../assets/js/jquery1x.js'>"+"<"+"/
let validaFechaAviso = $("#recibeFechaFaltaAviso").val(); let validaFechaAviso = $("#recibeFechaFaltaAviso").val();
let checkStatus = $('#chkExamenSemanal').prop('checked')
var estado = jQuery('#RegistroAsigCurDoc').validationEngine('validate'); if(checkStatus){
var json = {}
console.log("Registro examen semanal")
popup_confimacion(codigaGrupoHorario, bloq, dia, Hini, Hfin, codaula, opcion, Turno, contGeneral, 9999, historial, json);
}else{
var estado = jQuery('#RegistroAsigCurDoc').validationEngine('validate');
if (estado) { if (estado) {
var cantidad = $("#cantidad").val(); var cantidad = $("#cantidad").val();
var posicion = ""; var posicion = "";
...@@ -1950,27 +1960,20 @@ window.jQuery || document.write("<script src='../assets/js/jquery1x.js'>"+"<"+"/ ...@@ -1950,27 +1960,20 @@ window.jQuery || document.write("<script src='../assets/js/jquery1x.js'>"+"<"+"/
json.motivoCambio = $('#cboMotivoCambio2').val() json.motivoCambio = $('#cboMotivoCambio2').val()
json.observacion = $('#txtObservacion').val() json.observacion = $('#txtObservacion').val()
json.horaAviso = textoHoraAviso json.horaAviso = textoHoraAviso
json.horaInicioRecuperacion = $("#horaInicioRecuperacion").val() json.horaInicioRecuperacion = $("#horaInicioRecuperacion").val()
json.horaFinRecuperacion = $("#horaFinRecuperacion").val() json.horaFinRecuperacion = $("#horaFinRecuperacion").val()
json.avance = $('#cboAvanceDia').val() json.avance = $('#cboAvanceDia').val()
json.fechainicio = $("#recibeFechaInicio").val() json.fechainicio = $("#recibeFechaInicio").val()
json.fechafin = $("#recibeFechaFin").val() json.fechafin = $("#recibeFechaFin").val()
json.aula_recuperacion = $("#cboBloqueRecuperacion").val() json.aula_recuperacion = $("#cboBloqueRecuperacion").val()
json.curso_recuperacion = $("#lblcursoRecuperacion").text() json.curso_recuperacion = $("#lblcursoRecuperacion").text()
json.fecha_recuperacion = $("#datepicker3").val() json.fecha_recuperacion = $("#datepicker3").val()
json.fecha_aviso = validaFechaAviso json.fecha_aviso = validaFechaAviso
json.recuperacion = $('input[name="recuperacion"]:checked').val() json.recuperacion = $('input[name="recuperacion"]:checked').val()
// json.docente_recuperacion=validaCodDocenteRemplazo //json.docente_recuperacion=validaCodDocenteRemplazo
json.docente_recuperacion = $("#cbDocentesRecuperacion").val() json.docente_recuperacion = $("#cbDocentesRecuperacion").val()
popup_confimacion(codigaGrupoHorario, bloq, dia, Hini, Hfin, codaula, opcion, Turno, contGeneral, codigoDocente, historial, json); popup_confimacion(codigaGrupoHorario, bloq, dia, Hini, Hfin, codaula, opcion, Turno, contGeneral, codigoDocente, historial, json);
...@@ -1985,8 +1988,14 @@ window.jQuery || document.write("<script src='../assets/js/jquery1x.js'>"+"<"+"/ ...@@ -1985,8 +1988,14 @@ window.jQuery || document.write("<script src='../assets/js/jquery1x.js'>"+"<"+"/
} else { } else {
alertaVacios();
alertaVacios();
} }
}
} }
} }
...@@ -2052,8 +2061,14 @@ window.jQuery || document.write("<script src='../assets/js/jquery1x.js'>"+"<"+"/ ...@@ -2052,8 +2061,14 @@ window.jQuery || document.write("<script src='../assets/js/jquery1x.js'>"+"<"+"/
var hora_termino = $("#hora_termino_" + dia + "").val(); var hora_termino = $("#hora_termino_" + dia + "").val();
var dato = verificarTurno(hora_inicio, hora_termino); var dato = verificarTurno(hora_inicio, hora_termino);
var codTurno = dato; var codTurno = dato;
var codCurso = $("#cmbCurso").val(); let chkStatus = $('#chkExamenSemanal').prop('checked');
// var codDocente = $("#cmbDocDisp").val();
var codCurso = ""
codCurso= chkStatus ? "61" : $("#cmbCurso").val();
// var codDocente = $("#cmbDocDisp").val();
var codClase = $("#idClase").val(); var codClase = $("#idClase").val();
var periodo = "<%=periodo!=null?periodo.getCodigoPeriodo():""%>"; var periodo = "<%=periodo!=null?periodo.getCodigoPeriodo():""%>";
var codGru = "<%=armandoHorario!=null?armandoHorario.getArmarHoraio_codGru():""%>"; var codGru = "<%=armandoHorario!=null?armandoHorario.getArmarHoraio_codGru():""%>";
...@@ -2068,7 +2083,7 @@ window.jQuery || document.write("<script src='../assets/js/jquery1x.js'>"+"<"+"/ ...@@ -2068,7 +2083,7 @@ window.jQuery || document.write("<script src='../assets/js/jquery1x.js'>"+"<"+"/
//alert(hora_inicio+"\n"+hora_termino); //alert(hora_inicio+"\n"+hora_termino);
//alert(cadenaHorasIni+"\n"+cadenaHorasFin); //alert(cadenaHorasIni+"\n"+cadenaHorasFin);
//alert("codaula: "+codaula+"\n posBlo: "+bloq+"\n dia: "+dia+"\n Hor_ini: "+Hini+"\n Hor_fin: "+Hfin+"\n turno: "+Turno+"\n contGeneral: "+contGeneral); //alert("codaula: "+codaula+"\n posBlo: "+bloq+"\n dia: "+dia+"\n Hor_ini: "+Hini+"\n Hor_fin: "+Hfin+"\n turno: "+Turno+"\n contGeneral: "+contGeneral);
// debugger; // debugger;
var cant = 0; var cant = 0;
cant = parseInt(cantidad); cant = parseInt(cantidad);
var PosGeneral = 0; var PosGeneral = 0;
...@@ -2203,7 +2218,10 @@ window.jQuery || document.write("<script src='../assets/js/jquery1x.js'>"+"<"+"/ ...@@ -2203,7 +2218,10 @@ window.jQuery || document.write("<script src='../assets/js/jquery1x.js'>"+"<"+"/
//alert("registrarAsigCurDoceHorario"); //alert("registrarAsigCurDoceHorario");
//alert("registrarAsigCurDoceHorario"); //alert("registrarAsigCurDoceHorario");
var codTurno = Turno; var codTurno = Turno;
var codCurso = $("#cmbCurso").val(); let codCurso = ""
let statusCheck = $('#chkExamenSemanal').prop('checked')
codCurso= statusCheck ? "61":$("#cmbCurso").val();
var codClase = $("#idClase").val(); var codClase = $("#idClase").val();
var periodo = "<%=periodo!=null?periodo.getCodigoPeriodo():""%>"; var periodo = "<%=periodo!=null?periodo.getCodigoPeriodo():""%>";
var grupoAulas = $("#grupoAulas").val(); var grupoAulas = $("#grupoAulas").val();
......
...@@ -531,7 +531,7 @@ ...@@ -531,7 +531,7 @@
//just for Chrome!!!! so that dropdowns on items don't appear below other items after being moved //just for Chrome!!!! so that dropdowns on items don't appear below other items after being moved
$(ui.item).css('z-index', 'auto'); $(ui.item).css('z-index', 'auto');
} }
} }
); );
$('#tasks').disableSelection(); $('#tasks').disableSelection();
$('#tasks input:checkbox').removeAttr('checked').on('click', function(){ $('#tasks input:checkbox').removeAttr('checked').on('click', function(){
...@@ -589,8 +589,10 @@ ...@@ -589,8 +589,10 @@
} }
function BuscarDocente(pagina){ function BuscarDocente(pagina){
let name='' let name=''
var accion = ""; var accion = "";
var cantidad=15; var cantidad=15;
var apellido = $("#txt_bus_doc").val(); var apellido = $("#txt_bus_doc").val();
...@@ -606,15 +608,16 @@ ...@@ -606,15 +608,16 @@
close_carga(); close_carga();
$("#divListadoDoc").html(resultado); $("#divListadoDoc").html(resultado);
name=$("#lblUsuario").text(); name=$("#lblUsuario").text();
if(name === "6"){ if(name === "6"){
$("#divListadoDoc #btnRegEdit").hide(); $("#divListadoDoc #btnRegEdit").hide();
$("#divListadoDoc #btnReg").hide(); $("#divListadoDoc #btnReg").hide();
$("#divListadoDoc #thDatos").hide(); $("#divListadoDoc #thDatos").hide();
} }
},complete:function(){ },
complete:function(){
if(apellido==""){ if(apellido==""){
$("#divListadoDoc").fadeOut(); $("#divListadoDoc").fadeOut();
}else{ }else{
...@@ -645,10 +648,48 @@ ...@@ -645,10 +648,48 @@
},complete:function(){ },complete:function(){
alerta1(codDocente); alerta1(codDocente);
cargarDepartamentoEdit(codDocente); cargarDepartamentoEdit(codDocente);
cargarAreaEdit(codDocente);
} }
}); });
} }
//PENDIENTE DESARROLLO
function cargarAreaEdit(codDocente){
var nombre="cmbAreaEditarDatos";
var accion="cargarPlanaAsisteEdit("+codDocente+");";
$.ajax({
type: 'POST',
url: '../ServletArea?Accion=cargarAreaEditar',
data: 'nombre='+nombre+'&accion='+accion+'&codDocente='+codDocente,
success:function(resultado){
$('#divAreaEditarDatos').html(resultado);
},complete:function(){
cargarPlanaAsisteEdit(codDocente);
}
});
}
function cargarPlanaAsisteEdit(codDocente){
let codigoDocente = codDocente
console.log("codigoDocente-->")
console.log(codDocente)
var nombre = "cmbPlanaAsisteEdit";
// var accion = "limpiar2();";
var periodo = "<%=periodo != null ? periodo.getCodigoPeriodo() : ""%>";
var codArea = $("#cmbAreaEditarDatos").val()
$.ajax({
type: 'POST',
url: '../ServletPlana?Accion=listarPlanaAsiste',
data: 'nombre=' + nombre +'&codDocente=' + codigoDocente+'&codper='+periodo+'&codArea='+codArea,
success: function (resultado) {
$('#divPlanaEditarDatos').html(resultado);
}
});
}
function cargarDepartamentoEdit(codDocente){ function cargarDepartamentoEdit(codDocente){
var nombre="cmbDepartamentoEdit"; var nombre="cmbDepartamentoEdit";
var accion="cargarProvincia2();limpiar2();"; var accion="cargarProvincia2();limpiar2();";
...@@ -828,11 +869,15 @@ ...@@ -828,11 +869,15 @@
var codProvincia=$("#cmbprovinciaEdit").val(); var codProvincia=$("#cmbprovinciaEdit").val();
var codDistrito=$("#cmbDistritoEdit").val(); var codDistrito=$("#cmbDistritoEdit").val();
var codArea = $("#cmbAreaEditarDatos").val();
var codPlana = $("#cmbPlanaAsisteEdit").val();
var txt_numHijos = $("#txt_numHijos").val();
var periodo = "<%=periodo != null ? periodo.getCodigoPeriodo() : ""%>";
$.ajax({ $.ajax({
type:'POST', type:'POST',
url:'../ServletDocente?Accion=registraDatosDocenteEdit', url:'../ServletDocente?Accion=registraDatosDocenteEdit',
data: 'codDocente='+codDocente+'&telefono='+telefono+'&mail='+mail+'&codDepartamento='+codDepartamento+'&codProvincia='+codProvincia+'&codDistrito='+codDistrito+'&cel='+cel+'&dir='+dir, data: 'codDocente='+codDocente+'&telefono='+telefono+'&mail='+mail+'&codDepartamento='+codDepartamento+'&codProvincia='+codProvincia+'&codDistrito='+codDistrito+'&cel='+cel+'&dir='+dir+'&cantHijos='+txt_numHijos+'&codArea='+codArea+'&codPlana='+codPlana+'&periodo='+periodo,
beforeSend: function() { beforeSend: function() {
cargando(); cargando();
},success:function(resultado){ },success:function(resultado){
...@@ -842,7 +887,7 @@ ...@@ -842,7 +887,7 @@
}else if(resultado==1){ }else if(resultado==1){
alerta3(); alerta3();
} }
},complete:function(){ },complete:function(){
} }
}); });
...@@ -862,7 +907,7 @@ ...@@ -862,7 +907,7 @@
html: "<i class='ace-icon fa fa-times bigger-110'></i>&nbsp; ACEPTAR", html: "<i class='ace-icon fa fa-times bigger-110'></i>&nbsp; ACEPTAR",
"class" : "btn btn-warning btn-xs", "class" : "btn btn-warning btn-xs",
click: function() { click: function() {
$( this ).dialog( "close" ); $(this).dialog("close");
var pagina=$("#pagina").val(); var pagina=$("#pagina").val();
BuscarDocente(pagina); BuscarDocente(pagina);
} }
...@@ -885,7 +930,7 @@ ...@@ -885,7 +930,7 @@
html: "<i class='ace-icon fa fa-check bigger-110'></i>&nbsp; ACEPTAR", html: "<i class='ace-icon fa fa-check bigger-110'></i>&nbsp; ACEPTAR",
"class" : "btn btn-success btn-xs", "class" : "btn btn-success btn-xs",
click: function() { click: function() {
$( this ).dialog( "close" ); $(this).dialog("close");
var pagina=$("#pagina").val(); var pagina=$("#pagina").val();
BuscarDocente(pagina); BuscarDocente(pagina);
} }
...@@ -910,7 +955,7 @@ ...@@ -910,7 +955,7 @@
},success:function(resultado){ },success:function(resultado){
close_carga(); close_carga();
$("#divRegistroDatos").html(resultado); $("#divRegistroDatos").html(resultado);
},complete:function(){ },complete:function(){
alerta4(codDocente); alerta4(codDocente);
//ilumina(); //ilumina();
cargarDepartamento(codDocente); cargarDepartamento(codDocente);
...@@ -932,7 +977,8 @@ ...@@ -932,7 +977,8 @@
click: function() { click: function() {
validar_registroDatos(codDocente); validar_registroDatos(codDocente);
} }
},{ },
{
html: "<i class='ace-icon fa fa-times bigger-110'></i>&nbsp; CANCELAR", html: "<i class='ace-icon fa fa-times bigger-110'></i>&nbsp; CANCELAR",
"class" : "btn btn-danger btn-xs", "class" : "btn btn-danger btn-xs",
click: function() { click: function() {
...@@ -986,6 +1032,7 @@ ...@@ -986,6 +1032,7 @@
success:function(resultado){ success:function(resultado){
$('#divDistrito').html(resultado); $('#divDistrito').html(resultado);
},complete:function(){ },complete:function(){
} }
}); });
} }
......
...@@ -314,8 +314,8 @@ ...@@ -314,8 +314,8 @@
¿en que periodo se registrara?. ¿en que periodo se registrara?.
<br><br> <br><br>
<select class="form-control" id="cboPeriodoConfirm"> <select class="form-control" id="cboPeriodoConfirm">
<option value="23">REGULAR IV</option>
<option value="24">VERANO 2020</option> <option value="23">VERANO 2020</option>
</select> </select>
</div> </div>
...@@ -324,8 +324,8 @@ ...@@ -324,8 +324,8 @@
Seleccionar Periodo Seleccionar Periodo
<br><br> <br><br>
<select class="form-control" id="cboPeriodoVer"> <select class="form-control" id="cboPeriodoVer">
<option value="23">REGULAR IV</option> <option value="22">REGULAR IV - ACTIVO</option>
<option value="24">VERANO 2020</option> <option value="23" selected>VERANO 2020</option>
</select> </select>
</div> </div>
...@@ -1193,7 +1193,7 @@ window.jQuery || document.write("<script src='../assets/js/jquery1x.js'>"+"<"+"/ ...@@ -1193,7 +1193,7 @@ window.jQuery || document.write("<script src='../assets/js/jquery1x.js'>"+"<"+"/
function registrarDatos() { function registrarDatos() {
var codDocente = "<%=usuarioDocente != null ? usuarioDocente.getCodigoDocente() : ""%>"; var codDocente = "<%=usuarioDocente != null ? usuarioDocente.getCodigoDocente() : ""%>";
//=periodo != null ? periodo.getCodigoPeriodo() : ""%>"; //=periodo != null ? periodo.getCodigoPeriodo() : ""%>";
let periodo = sessionStorage.getItem("codPeriodo") let periodo = sessionStorage.getItem("codPeriodo")
// 1: se registro normal 2: ya exista 3: error // 1: se registro normal 2: ya exista 3: error
...@@ -1338,7 +1338,7 @@ window.jQuery || document.write("<script src='../assets/js/jquery1x.js'>"+"<"+"/ ...@@ -1338,7 +1338,7 @@ window.jQuery || document.write("<script src='../assets/js/jquery1x.js'>"+"<"+"/
}, complete: function () { }, complete: function () {
cargarDepartamentoEdit(codDocente); cargarDepartamentoEdit(codDocente);
cargarAreaEdit(); cargarAreaEdit();
// cargarPlanaAsisteEdit(codDocente); //cargarPlanaAsisteEdit(codDocente);
} }
}); });
} }
...@@ -1363,23 +1363,21 @@ window.jQuery || document.write("<script src='../assets/js/jquery1x.js'>"+"<"+"/ ...@@ -1363,23 +1363,21 @@ window.jQuery || document.write("<script src='../assets/js/jquery1x.js'>"+"<"+"/
function cargarPlanaAsisteEdit(codDocente) { function cargarPlanaAsisteEdit(codDocente) {
var nombre = "cmbPlanaAsisteEdit"; var nombre = "cmbPlanaAsisteEdit";
// var accion = "limpiar2();"; //var accion = "limpiar2();";
var periodo = sessionStorage.getItem("codPeriodo") var periodo = sessionStorage.getItem("codPeriodo")
var codArea = $("#cmbAreaEditar").val() var codArea = $("#cmbAreaEditar").val()
//%=periodo != null ? periodo.getCodigoPeriodo() : ""%>"; //%=periodo != null ? periodo.getCodigoPeriodo() : ""%>";
$.ajax({ $.ajax({
type: 'POST', type: 'POST',
url: '../ServletPlana?Accion=listarPlanaAsiste', url: '../ServletPlana?Accion=listarPlanaAsiste',
data: 'nombre=' + nombre +'&codDocente=' + codDocente+'&codper='+periodo+'&codArea='+codArea, data: 'nombre=' + nombre +'&codDocente=' + codDocente+'&codper='+periodo+'&codArea='+codArea,
success: function (resultado) { success: function (resultado) {
console.log(resultado)
$('#divPlanaAsisteEdit').html(resultado); $('#divPlanaAsisteEdit').html(resultado);
} }
}); });
} }
function cargarProvinciaEdit(codDocente) { function cargarProvinciaEdit(codDocente) {
var nombre = "cmbprovinciaEdit"; var nombre = "cmbprovinciaEdit";
...@@ -1696,7 +1694,7 @@ window.jQuery || document.write("<script src='../assets/js/jquery1x.js'>"+"<"+"/ ...@@ -1696,7 +1694,7 @@ window.jQuery || document.write("<script src='../assets/js/jquery1x.js'>"+"<"+"/
url: '../ServletMail?Accion=enviarEmail', url: '../ServletMail?Accion=enviarEmail',
data: 'codDoc='+codigoDocente+'&correo='+correo+'&nombrePeriodo='+nombrePeriodo+'&codigoPeriodo='+codPeriodo+'&codArea='+codArea, data: 'codDoc='+codigoDocente+'&correo='+correo+'&nombrePeriodo='+nombrePeriodo+'&codigoPeriodo='+codPeriodo+'&codArea='+codArea,
success: function (resultado) { success: function (resultado) {
console.log("imprimiendooo correo -->"+resultado)
}, complete: function () { }, complete: function () {
} }
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -255,25 +255,25 @@ ...@@ -255,25 +255,25 @@
let nDia=[] let nDia=[]
let mensaje='No registrado' let mensaje='No registrado'
data.data.forEach(function (docente) { data.data.forEach(function (docente) {
console.log(docente)
if(typeof(docente.celular && docente.distrito) == "undefined"){
html += '<table>' if(typeof(docente.celular && docente.distrito) == "undefined"){
html += '<table>'
html += '<div class="divider"></div>' html += '<div class="divider"></div>'
html += '<div class="section">' html += '<div class="section">'
html +='<h6 id="nombreDocente">' + docente.nombre + '<span></span><span></span><span style="margin-left:650px;font-size:20px;color:#6C7807"><i class="small material-icons" title="Puesto" style="color:black;">grade</i><strong>No registrado</strong></span></h6>' html +='<h6 id="nombreDocente">' + docente.nombre + '<span></span><span></span><span style="margin-left:650px;font-size:20px;color:#6C7807"><i class="small material-icons" title="Puesto" style="color:black;">grade</i><strong>No registrado</strong></span></h6>'
html += '<label id="codDocente" style="visibility:hidden;">' + docente.codDocente + '</label>' html += '<label id="codDocente" style="visibility:hidden;">' + docente.codDocente + '</label>'
html += '<tr>' html += '<tr>'
html += '<p>Celular: No registrado</p>' html += '<p>Celular: No registrado</p>'
html += '<p>Distrito: No registrado</p>' html += '<p>Distrito: No registrado</p>'
html += '<p>Direccion: No registrado</p>' html += '<p>Direccion: No registrado</p>'
html += '<p>Correo: No registrado</p>' html += '<p>Correo: No registrado</p>'
html += '</tr>' html += '</tr>'
html += '<br>' html += '<br>'
......
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