Commit f3a10347 by sistem02 user

[ADD] disponibilidad por area

parent 5e1db259
......@@ -13,6 +13,7 @@ import java.io.Serializable;
* @author fcelestino
*/
public class Usuario implements Serializable{
private int codarea;
private int codigoUsuario;
private int codigoTipoUsuario;
private int codigoSede;
......@@ -34,6 +35,14 @@ public class Usuario implements Serializable{
this.dni = dni;
}
public int getCodarea() {
return codarea;
}
public void setCodarea(int codarea) {
this.codarea = codarea;
}
public String getNombreTipoUsuario() {
return nombreTipoUsuario;
}
......
......@@ -59,16 +59,16 @@ public class MySqlDAOFactory extends DAOFactory {
try {
conexion = DriverManager.getConnection(
// "jdbc:mysql://172.16.2.68:3306/encuesta_docente",
// "christian",
// "serverpla");
// "jdbc:mysql://localhost:3306/encuesta_docente",
// "root",
// "mysql");
// "jdbc:mysql://SERVERPRUEBA:3306/encuesta_docente",
// "desarrollo",
// "5VC02019");
"jdbc:mysql://localhost:3306/encuesta_docente",
"billy",
"billy");
// //server_winpla
"jdbc:mysql://172.16.2.68:3306/encuesta_docente",
"sis_horarios",
"Sy356ho899");
// "jdbc:mysql://172.16.2.68:3306/encuesta_docente",
// "sis_horarios",
// "Sy356ho899");
} catch (Exception e) {
// TODO Auto-generated catch block
......@@ -80,16 +80,16 @@ public class MySqlDAOFactory extends DAOFactory {
try {
conexion = DriverManager.getConnection(
// "jdbc:mysql://172.16.2.68:3306/nuevo",
// "christian",
// "serverpla");
// "jdbc:mysql://localhost:3306/nuevo",
// "root",
// "mysql");
// "jdbc:mysql://SERVERPRUEBA:3306/nuevo",
// "desarrollo",
// "5VC02019");
"jdbc:mysql://localhost:3306/nuevo",
"billy",
"billy");
//server_winpla
"jdbc:mysql://172.16.2.68:3306/nuevo",
"sis_horarios",
"Sy356ho899");
// "jdbc:mysql://172.16.2.68:3306/nuevo",
// "sis_horarios",
// "Sy356ho899");
} catch (Exception e) {
// TODO Auto-generated catch block
......@@ -101,16 +101,16 @@ public class MySqlDAOFactory extends DAOFactory {
try {
conexion = DriverManager.getConnection(
// "jdbc:mysql://172.16.2.68:3306/horarios_docente",
// "christian",
// "serverpla");
// "jdbc:mysql://localhost:3306/horarios_docente",
// "root",
// "mysql");
// "jdbc:mysql://SERVERPRUEBA:3306/horarios_docente",
// "desarrollo",
// "5VC02019");
"jdbc:mysql://localhost:3306/horarios_docente",
"billy",
"billy");
//server_winpla
"jdbc:mysql://172.16.2.68:3306/horarios_docente",
"sis_horarios",
"Sy356ho899");
// "jdbc:mysql://172.16.2.68:3306/horarios_docente",
// "sis_horarios",
// "Sy356ho899");
} catch (Exception e) {
// TODO Auto-generated catch block
......@@ -121,16 +121,16 @@ public class MySqlDAOFactory extends DAOFactory {
try {
conexion = DriverManager.getConnection(
// "jdbc:mysql://172.16.2.68:3306/sacoolive3",
// "christian",
// "serverpla");
// "jdbc:mysql://localhost:3306/sacoolive3",
// "root",
// "mysql");
"jdbc:mysql://localhost:3306/sacoolive3",
"billy",
"billy");
// "jdbc:mysql://SERVERPRUEBA:3306/sacoolive3",
// "desarrollo",
// "5VC02019");
//server_winpla
"jdbc:mysql://172.16.2.68:3306/sacoolive3",
"sis_horarios",
"Sy356ho899");
// "jdbc:mysql://172.16.2.68:3306/sacoolive3",
// "sis_horarios",
// "Sy356ho899");
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
......@@ -306,4 +306,5 @@ public class MySqlDAOFactory extends DAOFactory {
return new MySqlPlanAcademicoDAO();
}
}
......@@ -52,15 +52,17 @@ public class MySqlUsuarioDAO implements UsuarioDAO {
cnx = MySqlDAOFactory.obtenerConexion(base);
Statement st = cnx.createStatement();
String query = "SELECT usuario.cod_usu,usuario.cod_tip_usu, usuario.ani_usu, usuario.usu_usu, usuario.cla_usu, usuario.cod_loc, usuario.est_usu, tipo_usuario.nom_tip_usu, sede.des_loc "
String query = "SELECT area.cod_area,usuario.cod_usu,usuario.cod_tip_usu,usuario.ani_usu, usuario.usu_usu, usuario.cla_usu, usuario.cod_loc, usuario.est_usu, tipo_usuario.nom_tip_usu, sede.des_loc "
+ "FROM usuario "
+ "LEFT JOIN sede ON sede.cod_loc = usuario.cod_loc "
+ "LEFT JOIN area ON usuario.cod_usu=area.cod_usuario"
+ "INNER JOIN tipo_usuario ON tipo_usuario.cod_tip_usu = usuario.cod_tip_usu "
+ "WHERE usuario.usu_usu='" + usuario + "' and usuario.cla_usu='" + clave + "' and usuario.est_usu='1'";
ResultSet rs = st.executeQuery(query);
while (rs.next()) {
usuario1.setCodarea(rs.getInt("cod_area"));
usuario1.setCodigoUsuario(rs.getInt("cod_usu"));
usuario1.setCodigoTipoUsuario(rs.getInt("cod_tip_usu"));
usuario1.setCodigoSede(rs.getInt("cod_loc"));
......
......@@ -13,6 +13,7 @@ import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import pe.siso.horario.Beans.Area;
import pe.siso.horario.Beans.PeriodoAcademico;
import pe.siso.horario.Beans.Usuario;
import pe.siso.horario.Beans.UsuarioDocente;
......@@ -111,7 +112,7 @@ public class ServletUsuario extends HttpServlet {
String SessionId = session_actual.getId();
//System.out.println(SessionId);
usuarioConsul.setIdentificadorSesion(SessionId);
session_actual.setAttribute("usuario", usuarioConsul);
periodo.setCodigoPeriodo(periodoAcademico);
periodo.setNombrePeriodo(nombrePeriodo);
......
<%--
Document : vistaDobleDisponibilidad
Created on : 17-nov-2018, 8:48:37
Author : sistem20user
--%>
<%@page import="pe.siso.horario.Beans.Usuario"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@page import="pe.siso.horario.Beans.PeriodoAcademico"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>VISTA DOBLE DISPONIBILIDAD</title>
<link rel="stylesheet" href="../assets/css/jquery-ui.css" />
<!-- Compiled and minified CSS -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/css/materialize.min.css">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<link href="css/snackbar.css" rel="stylesheet" type="text/css"/>
<link href="css/alert.css" rel="stylesheet" type="text/css"/>
<!-- Compiled and minified JavaScript -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/js/materialize.min.js"></script>
<!--jquery-->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<!--axios-->
<script src="https://unpkg.com/axios/dist/axios.min.js"></script>
<%
HttpSession session_actual = request.getSession(true);
PeriodoAcademico periodo=(PeriodoAcademico)session_actual.getAttribute("periodo");
%>
<style type="text/css">
@media print {
#divBusqueda {display:none}
#lblTitulo{text-align: center;font-size: 40px;font-weight: bold}
}
td{
border : 3px solid;
text-align : center;
}
body{
background-image: url(../assets/images/fondo-trismegisto.png);
height: 500px;
max-width: 100%;
background-repeat: no-repeat;
background-size: 100% 100%;
background-attachment: fixed;
}
body::after {
content: "";
position: absolute;
top: 0%;
left: 0%;
width: 100%;
height: 100%;
background: rgba(255, 255, 255, 0.9);
z-index: -1;
position: fixed;
}
.colorVerde{
background-color: #96d089;
}
.colorRojo{
background-color: #d0766f;
}
.colorAzul{
background-color: #59a1da;
}
</style>
<script type="text/javascript" language="javascript">
function alertDGC(mensaje)
{
var dgcTiempo = 500
var ventanaCS = '<div class="dgcAlert"><div class="dgcVentana"><div class="dgcCerrar"></div><div class="dgcMensaje">' + mensaje + '<br><div class="dgcAceptar">Aceptar</div></div></div></div>';
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>VISTA DOBLE DISPONIBILIDAD</title>
<link rel="stylesheet" href="../assets/css/jquery-ui.css" />
<!-- Compiled and minified CSS -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/css/materialize.min.css">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<link href="css/snackbar.css" rel="stylesheet" type="text/css"/>
<link href="css/alert.css" rel="stylesheet" type="text/css"/>
<!-- Compiled and minified JavaScript -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/js/materialize.min.js"></script>
<!--jquery-->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<!--axios-->
<script src="https://unpkg.com/axios/dist/axios.min.js"></script>
<%
HttpSession session_actual = request.getSession(true);
Usuario usuario = (Usuario) session_actual.getAttribute("usuario");
PeriodoAcademico periodo = (PeriodoAcademico) session_actual.getAttribute("periodo");
System.out.println("*******************");
System.out.println(usuario.getCodarea());
%>
<style type="text/css">
@media print {
#divBusqueda {display:none}
#lblTitulo{text-align: center;font-size: 40px;font-weight: bold}
}
td{
border : 3px solid;
text-align : center;
}
body{
background-image: url(../assets/images/fondo-trismegisto.png);
height: 500px;
max-width: 100%;
background-repeat: no-repeat;
background-size: 100% 100%;
background-attachment: fixed;
}
body::after {
content: "";
position: absolute;
top: 0%;
left: 0%;
width: 100%;
height: 100%;
background: rgba(255, 255, 255, 0.9);
z-index: -1;
position: fixed;
}
.colorVerde{
background-color: #96d089;
}
.colorRojo{
background-color: #d0766f;
}
.colorAzul{
background-color: #59a1da;
}
</style>
<script type="text/javascript" language="javascript">
function alertDGC(mensaje)
{
var dgcTiempo = 500
var ventanaCS = '<div class="dgcAlert"><div class="dgcVentana"><div class="dgcCerrar"></div><div class="dgcMensaje">' + mensaje + '<br><div class="dgcAceptar">Aceptar</div></div></div></div>';
// var bodyCS='<input type="text" value="prueba">';
$('body').append(ventanaCS);
$('body').append(ventanaCS);
// $('body').append(bodyCS);
var alVentana = $('.dgcVentana').height();
var alNav = $(window).height();
var supNav = $(window).scrollTop();
$('.dgcAlert').css('height', $(document).height());
$('.dgcVentana').css('top', ((alNav - alVentana) / 2 + supNav - 100) + 'px');
$('.dgcAlert').css('display', 'block');
$('.dgcAlert').animate({opacity: 1}, dgcTiempo);
$('.dgcCerrar,.dgcAceptar').click(function (e) {
$('.dgcAlert').animate({opacity: 0}, dgcTiempo);
setTimeout("$('.dgcAlert').remove()", dgcTiempo);
});
}
</script>
</head>
<body>
<script>
window.alert = function (message) {
alertDGC(message);
};
</script>
<div class="container">
<div class="row" id="divBusqueda">
<div class="col s8 offset-s2">
<div class="card">
<div class="card-content">
<span class="card-title" style="font-weight: bold">Buscar disponibilidad</span>
<div class="row">
<div class="input-field col s6">
<select id="cbArea" onchange="listarPlana(this);desactivarBuscar();desactivarPrint();">
</select>
<label>Area:</label>
</div>
<div class="input-field col s6">
<select id="cbPlana" onchange="activarBuscar();">
</select>
<label>Plana:</label>
</div>
</div>
</div>
<div class="card-action center">
<a class="waves-effect waves-light btn blue" id="btnBuscar" onclick="activarPrint();"><i class="material-icons left">search</i>BUSCAR</a>
<a class="waves-effect waves-light btn" id="btnImprimir" onclick="pintarTDRed();window.print();" style="background-color: #5478a2;"><i class="material-icons dp48 left">print</i>IMPRIMIR</a><br>
<!-- <a class="btn btn-app btn-light btn-xs align-left" onclick="window.print();" target="_blank" id="iconoImprimir">
<i class="ace-icon fa fa-print bigger-160"></i>-->
<label>Zona:</label>
<select id="cmbZonas" onchange="listarDisponibilidad();activarPrint();">
</select>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col s12">
<div class="card">
<div class="card-content">
<span class="card-title" id="lblTitulo">Lista de docentes y disponibilidad</span>
<div class="row">
<div id="divListaDisponibilidad">
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Modal Structure -->
</div>
</div>
<!-- The actual snackbar -->
<div id="snackbar">Se bloqueo el dia correctamente..</div>
<div id="snackbar2">Desbloqueado.</div>
<script>
var alVentana = $('.dgcVentana').height();
var alNav = $(window).height();
var supNav = $(window).scrollTop();
$('.dgcAlert').css('height', $(document).height());
$('.dgcVentana').css('top', ((alNav - alVentana) / 2 + supNav - 100) + 'px');
$('.dgcAlert').css('display', 'block');
$('.dgcAlert').animate({opacity: 1}, dgcTiempo);
$('.dgcCerrar,.dgcAceptar').click(function (e) {
$('.dgcAlert').animate({opacity: 0}, dgcTiempo);
setTimeout("$('.dgcAlert').remove()", dgcTiempo);
});
}
</script>
</head>
<body>
<script>
window.alert = function (message) {
alertDGC(message);
};
</script>
<div class="container">
<div class="row" id="divBusqueda">
<div class="col s8 offset-s2">
<div class="card">
<div class="card-content">
<span class="card-title" style="font-weight: bold">Buscar disponibilidad</span>
<div class="row">
<div class="input-field col s6">
<select id="cbArea" onchange="listarPlana(this);desactivarBuscar();desactivarPrint();">
</select>
<label>Area:</label>
</div>
<div class="input-field col s6">
<select id="cbPlana" onchange="activarBuscar();">
</select>
<label>Plana:</label>
</div>
</div>
</div>
<div class="card-action center">
<a class="waves-effect waves-light btn blue" id="btnBuscar" onclick="activarPrint();"><i class="material-icons left">search</i>BUSCAR</a>
<a class="waves-effect waves-light btn" id="btnImprimir" onclick="pintarTDRed();window.print();" style="background-color: #5478a2;"><i class="material-icons dp48 left">print</i>IMPRIMIR</a><br>
<!-- <a class="btn btn-app btn-light btn-xs align-left" onclick="window.print();" target="_blank" id="iconoImprimir">
<i class="ace-icon fa fa-print bigger-160"></i>-->
<label>Zona:</label>
<select id="cmbZonas" onchange="listarDisponibilidad();
activarPrint();">
</select>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col s12">
<div class="card">
<div class="card-content">
<span class="card-title" id="lblTitulo">Lista de docentes y disponibilidad</span>
<div class="row">
<div id="divListaDisponibilidad">
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Modal Structure -->
</div>
</div>
<!-- The actual snackbar -->
<div id="snackbar">Se bloqueo el dia correctamente..</div>
<div id="snackbar2">Desbloqueado.</div>
<script>
// $("#btnBuscar").attr('disabled','disabled');
function desactivarBuscar() {
$("#btnBuscar").attr('disabled', 'disabled');
}
function activarBuscar() {
$("#btnBuscar").attr('disabled', false);
}
function desactivarBuscar() {
$("#btnBuscar").attr('disabled', 'disabled');
}
function activarBuscar() {
$("#btnBuscar").attr('disabled', false);
}
var elems = document.querySelectorAll('select');
var instances = M.FormSelect;
document.addEventListener('DOMContentLoaded', function () {
listarArea()
listarZona()
var elems = document.querySelectorAll('select');
var instances = M.FormSelect;
document.addEventListener('DOMContentLoaded', function () {
listarArea()
listarZona()
// setTimeout(function(){ alert("HOLA MASCOTA"); }, 5000);
document.querySelector('#btnBuscar').addEventListener('click', function () {
document.querySelector('#btnBuscar').addEventListener('click', function () {
let cmbZonas = $("#cmbZonas option:selected").text();
if (cmbZonas === "[SELECCIONE]") {
listarDisponibilidad()
} else {
listarDisponibilidad()
}
let cmbZonas = $("#cmbZonas option:selected").text();
if (cmbZonas === "[SELECCIONE]") {
listarDisponibilidad()
} else {
listarDisponibilidad()
}
})
})
});
function listarArea() {
axios.get('../ServletArea?Accion=cargarAreaJson')
.then(data => {
});
function listarArea() {
axios.get('../ServletArea?Accion=cargarAreaJson')
.then(data => {
let option = '<option value="">[SELECCIONE]</option>'
data.data.forEach(v => {
option += '<option value="' + v.codigoArea + '">' + v.nombreArea + '</option>'
})
let option = '<option value="">[SELECCIONE]</option>'
data.data.forEach(v => {
option += '<option value="' + v.codigoArea + '">' + v.nombreArea + '</option>'
})
document.querySelector('#cbArea').innerHTML = option
instances.init(elems)
})
}
document.querySelector('#cbArea').innerHTML = option
instances.init(elems)
})
}
function listarZona() {
axios.get('../ServletZona?Accion=cargarZonaJson')
.then(data => {
let option = '<option value="">[SIN ZONA]</option><option value="T">TODAS LAS ZONAS</option>'
function listarZona() {
axios.get('../ServletZona?Accion=cargarZonaJson')
.then(data => {
let option = '<option value="">[SIN ZONA]</option><option value="T">TODAS LAS ZONAS</option>'
data.data.forEach(v => {
option += '<option value="' + v.codigoZona + '">' + v.nombreZona + '</option>'
})
document.querySelector('#cmbZonas').innerHTML = option
instances.init(elems)
})
data.data.forEach(v => {
option += '<option value="' + v.codigoZona + '">' + v.nombreZona + '</option>'
})
document.querySelector('#cmbZonas').innerHTML = option
instances.init(elems)
})
}
}
function listarDisponibilidad() {
function listarDisponibilidad() {
let codigoPlana = document.querySelector('#cbPlana').value
let codigoPeriodo = '<%= periodo!=null?periodo.getCodigoPeriodo():""%>'
console.log(codigoPeriodo)
let codigoZona = document.querySelector('#cmbZonas').value
let codigoPlana = document.querySelector('#cbPlana').value
let codigoPeriodo = '<%= periodo != null ? periodo.getCodigoPeriodo() : ""%>'
console.log(codigoPeriodo)
let codigoZona = document.querySelector('#cmbZonas').value
// let distritos=new ZonaDistritoServices();
if (codigoPlana && codigoPeriodo && codigoZona) {
if (codigoPlana && codigoPeriodo && codigoZona) {
let json = {
codigoPlana,
codigoPeriodo,
codigoZona
}
let json = {
codigoPlana,
codigoPeriodo,
codigoZona
}
peticionWith3Parameters(json);
} else {
peticionWith3Parameters(json);
let codigoPeriodo2 = '<%= periodo!=null?periodo.getCodigoPeriodo():""%>'
} else {
let codigoPeriodo2 = '<%= periodo != null ? periodo.getCodigoPeriodo() : ""%>'
// let codigoPlana2 = document.querySelector('#cbPlana').value
let json2 = {
codigoPlana,
codigoPeriodo2
}
let json2 = {
codigoPlana,
codigoPeriodo2
}
peticionSimple(json2);
}
}
function peticionSimple(json) {
$.ajax({
url: '../ServletHorario?Accion=listarVistaDobleDisponibilidadSinZona',
type: 'POST',
dataType: 'json',
data: {
json: JSON.stringify(json)
},
success: function (data, textStatus, jqXHR) {
let html = ''
let nTurno = []
let nDia = []
let mensaje = 'No registrado'
data.data.forEach(function (docente) {
if (typeof (docente.celular && docente.distrito) == "undefined") {
html += '<table>'
html += '<div class="divider"></div>'
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 += '<label id="codDocente" style="visibility:hidden;">' + docente.codDocente + '</label>'
html += '<tr>'
html += '<p>Celular: No registrado</p>'
html += '<p>Distrito: No registrado</p>'
html += '<p>Direccion: No registrado</p>'
html += '<p>Correo: No registrado</p>'
html += '</tr>'
html += '<br>'
peticionSimple(json2);
}
}
function peticionSimple(json) {
if (docente.disponibilidad) {
$.ajax({
url: '../ServletHorario?Accion=listarVistaDobleDisponibilidadSinZona',
type: 'POST',
dataType: 'json',
data: {
json: JSON.stringify(json)
},
success: function (data, textStatus, jqXHR) {
let disponibilidad = docente.disponibilidad.split('-') || []
let diasM = []
let diasT = []
let aulasM = []
let aulasT = []
if (docente.arrayAulas) {
docente.arrayAulas.forEach(v => {
if (v.turno == '1') {
aulasM.push(v)
} else if (v.turno == '2') {
aulasT.push(v)
}
})
}
let html = ''
let nTurno = []
let nDia = []
let mensaje = 'No registrado'
data.data.forEach(function (docente) {
let diasin = docente.diasin.split('-') || []
let diasMS = []
let diasTS = []
if (typeof (docente.celular && docente.distrito) == "undefined") {
diasin.forEach(function (b) {
let nTurnoS = b.split('#')[0]
let nDiaS = b.split('#')[1]
html += '<table>'
html += '<div class="divider"></div>'
html += '<div class="section">'
if (nTurnoS == '1') {
diasMS.push(nDiaS)
} else if (nTurno == '2') {
diasTS.push(nDiaS)
}
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 += '<tr>'
html += '<p>Celular: No registrado</p>'
html += '<p>Distrito: No registrado</p>'
html += '<p>Direccion: No registrado</p>'
html += '<p>Correo: No registrado</p>'
html += '</tr>'
let bloqueo = docente.bloqueo.split('-') || []
let diasMB = []
let diasTB = []
let aulasMB = []
let aulasTB = []
html += '<br>'
bloqueo.forEach(function (b) {
let nTurno = b.split('#')[0]
let nDia = b.split('#')[1]
if (nTurno == '1') {
diasMB.push(nDia)
} else if (nTurno == '2') {
diasTB.push(nDia)
}
})
if (docente.disponibilidad) {
disponibilidad.forEach(function (d) {
let turno = d.split('#')[0]
let dia = d.split('#')[1]
let disponibilidad = docente.disponibilidad.split('-') || []
let diasM = []
let diasT = []
let aulasM = []
let aulasT = []
if (turno == '1') {
diasM.push(dia)
} else if (turno == '2') {
diasT.push(dia)
}
})
if (docente.arrayAulas) {
docente.arrayAulas.forEach(v => {
if (v.turno == '1') {
aulasM.push(v)
} else if (v.turno == '2') {
aulasT.push(v)
}
})
}
html += '<p class="col s12">'
html += '<table class="centered" id="tableDisponibilidad">'
html += '<thead>'
html += '<tr>'
html += '<td>TURNO</td>'
html += '<td id="dia">LUNES</td>'
html += '<td id="dia">MARTES</td>'
html += '<td id="dia">MIERCOLES</td>'
html += '<td id="dia">JUEVES</td>'
html += '<td id="dia">VIERNES</td>'
html += '<td id="dia">SABADO</td>'
html += '</tr>'
html += '</thead>'
html += '<tbody>'
let diasin = docente.diasin.split('-') || []
let diasMS = []
let diasTS = []
diasin.forEach(function (b) {
let nTurnoS = b.split('#')[0]
let nDiaS = b.split('#')[1]
html += '<tr>'
html += '<td id="turno">M</td>'
if (nTurnoS == '1') {
diasMS.push(nDiaS)
} else if (nTurno == '2') {
diasTS.push(nDiaS)
}
for (let i = 0; i < 6; i++) {
let aulas = aulasM.map(a => {
if (a.dia == i + 1) {
return a.sede + ' - ' + a.aulas
}
})
})
if (diasM.some(d => d == (i + 1))) {
html += `<td class="colorVerde" onclick="colorChange(this);">` + aulas.join(' \n ') + `</td>`
let bloqueo = docente.bloqueo.split('-') || []
let diasMB = []
let diasTB = []
let aulasMB = []
let aulasTB = []
} else if (diasMB.some(t => t == (i + 1))) {
bloqueo.forEach(function (b) {
let nTurno = b.split('#')[0]
let nDia = b.split('#')[1]
html += `<td class="blue" onclick="colorChange(this);" id="changed">` + aulas.join(' \n ') + `</td>`
if (nTurno == '1') {
diasMB.push(nDia)
} else if (nTurno == '2') {
diasTB.push(nDia)
}
} else if (diasMS.some(r => r == (i + 1))) {
})
html += `<td class="blue" onclick="colorChange(this);" id="changed">` + aulas.join(' \n ') + `</td>`
} else {
disponibilidad.forEach(function (d) {
let turno = d.split('#')[0]
let dia = d.split('#')[1]
html += `<td class="colorRojo" onclick="colorChange(this);" id="changed">` + aulas.join(' \n ') + `</td>`
}
}
if (turno == '1') {
diasM.push(dia)
} else if (turno == '2') {
diasT.push(dia)
}
})
html += '<p class="col s12">'
html += '<table class="centered" id="tableDisponibilidad">'
html += '<thead>'
html += '<tr>'
html += '<td>TURNO</td>'
html += '<td id="dia">LUNES</td>'
html += '<td id="dia">MARTES</td>'
html += '<td id="dia">MIERCOLES</td>'
html += '<td id="dia">JUEVES</td>'
html += '<td id="dia">VIERNES</td>'
html += '<td id="dia">SABADO</td>'
html += '</tr>'
html += '</thead>'
html += '<tbody>'
html += '</tr>'
html += '<tr>'
html += '<td id="turno">T</td>'
html += '<tr>'
html += '<td id="turno">M</td>'
for (let i = 0; i < 6; i++) {
let aulas = aulasT.map(a => {
for (let i = 0; i < 6; i++) {
let aulas = aulasM.map(a => {
if (a.dia == i + 1) {
return a.sede + ' - ' + a.aulas
}
})
if (a.dia == i + 1) {
return a.sede + ' - ' + a.aulas
}
})
if (diasT.some(d => d == (i + 1))) {
if (diasM.some(d => d == (i + 1))) {
html += `<td class="colorVerde" onclick="colorChange(this);">` + aulas.join(' \n ') + `</td>`
html += `<td class="colorVerde" onclick="colorChange(this);">` + aulas.join(' \n ') + `</td>`
} else if (diasTB.some(t => t == (i + 1))) {
} else if (diasMB.some(t => t == (i + 1))) {
html += `<td class="blue" onclick="colorChange(this);" id="changed">` + aulas.join(' \n ') + `</td>`
html += `<td class="blue" onclick="colorChange(this);" id="changed">` + aulas.join(' \n ') + `</td>`
} else if (diasTS.some(q => q == (i + 1))) {
} else if (diasMS.some(r => r == (i + 1))) {
html += `<td class="blue" onclick="colorChange(this);" id="changed">` + aulas.join(' \n ') + `</td>`
html += `<td class="blue" onclick="colorChange(this);" id="changed">` + aulas.join(' \n ') + `</td>`
} else {
} else {
html += `<td class="colorRojo" onclick="colorChange(this);" id="changed">` + aulas.join(' \n ') + `</td>`
}
}
html += `<td class="colorRojo" onclick="colorChange(this);" id="changed">` + aulas.join(' \n ') + `</td>`
}
}
html += '</tr>'
html += '</tr>'
html += '<tr>'
html += '<td id="turno">T</td>'
html += '</tbody>'
html += '</table>'
html += '</p>'
for (let i = 0; i < 6; i++) {
let aulas = aulasT.map(a => {
if (a.dia == i + 1) {
return a.sede + ' - ' + a.aulas
}
})
if (diasT.some(d => d == (i + 1))) {
} else {
html += '<p>EL DOCENTE NO TIENE DISPONIBILIDAD REGISTRADA</p>'
}
html += `</div>`
html += `<td class="colorVerde" onclick="colorChange(this);">` + aulas.join(' \n ') + `</td>`
} else {
} else if (diasTB.some(t => t == (i + 1))) {
html += '<div class="divider"></div>'
html += '<div class="section">'
html += `<td class="blue" onclick="colorChange(this);" id="changed">` + aulas.join(' \n ') + `</td>`
html += '<h6 id="nombreDocente" style="font-weight:bold;">' + docente.nombre + '</h6>'
html += '<label id="codDocente" style="visibility:hidden;">' + docente.codDocente + '</label>'
} else if (diasTS.some(q => q == (i + 1))) {
html += `<td class="blue" onclick="colorChange(this);" id="changed">` + aulas.join(' \n ') + `</td>`
html += '<div class="form-control">'
html += '<div class="card grey lighten-2">'
html += '<div class="card-content black-text">'
//PRIMERA FILA
html += '<div class="row" style="margin-bottom:0px">'
html += '<div class="input-field col s3"><i class="material-icons dp48">local_phone</i> <strong>' + docente.celular + '</strong></div>'
html += '<div class="input-field col s3"><i class="material-icons dp48">school</i><strong> Puesto Nro: ' + docente.puesto + '</strong></div>'
html += '<div class="input-field col s6"><i class="material-icons dp48">hdr_weak</i> <strong>Exa. Encuesta: ' + docente.notaEncuesta + '</strong></div>'
html += '</div>'
} else {
//SEGUNDA FILA
html += '<div class="row" style="margin-bottom:0px">'
html += '<div class="input-field col s3"><i class="material-icons dp48">room</i> <strong>' + docente.distrito + '</strong></div>'
html += '<div class="input-field col s6"><i class="material-icons dp48">hdr_strong</i> <strong> Exa. Academico: ' + docente.examenNota + '</strong></div>'
html += '</div>'
//TERCERA FILA
html += '<div class="row" style="margin-bottom:0px">'
html += '<div class="input-field col s3"><i class="material-icons dp48">email</i> <strong>' + docente.correo + '</strong></div>'
html += '<div class="input-field col s6"><i class="material-icons dp48">home</i> <strong>' + docente.direccion + '</strong></div>'
html += `<td class="colorRojo" onclick="colorChange(this);" id="changed">` + aulas.join(' \n ') + `</td>`
html += '</div>'
}
}
html += '</div>'
html += '</div>'
html += '</tr>'
html += '</div>'
html += '</tbody>'
html += '</table>'
html += '</p>'
html += '<p></p>'
html += '<br>'
} else {
html += '<p>EL DOCENTE NO TIENE DISPONIBILIDAD REGISTRADA</p>'
}
html += `</div>`
}
else {
html += '<div class="divider"></div>'
html += '<div class="section">'
html += '<h6 id="nombreDocente" style="font-weight:bold;">' + docente.nombre + '</h6>'
html += '<label id="codDocente" style="visibility:hidden;">' + docente.codDocente + '</label>'
html +='<div class="form-control">'
html +='<div class="card grey lighten-2">'
html += '<div class="card-content black-text">'
//PRIMERA FILA
html += '<div class="row" style="margin-bottom:0px">'
html += '<div class="input-field col s3"><i class="material-icons dp48">local_phone</i> <strong>' + docente.celular + '</strong></div>'
html += '<div class="input-field col s3"><i class="material-icons dp48">school</i><strong> Puesto Nro: '+docente.puesto+'</strong></div>'
html += '<div class="input-field col s6"><i class="material-icons dp48">hdr_weak</i> <strong>Exa. Encuesta: '+docente.notaEncuesta+'</strong></div>'
html += '</div>'
if (docente.disponibilidad) {
//SEGUNDA FILA
html += '<div class="row" style="margin-bottom:0px">'
html += '<div class="input-field col s3"><i class="material-icons dp48">room</i> <strong>' + docente.distrito + '</strong></div>'
html += '<div class="input-field col s6"><i class="material-icons dp48">hdr_strong</i> <strong> Exa. Academico: '+docente.examenNota+'</strong></div>'
html += '</div>'
//TERCERA FILA
html += '<div class="row" style="margin-bottom:0px">'
html += '<div class="input-field col s3"><i class="material-icons dp48">email</i> <strong>' + docente.correo + '</strong></div>'
html += '<div class="input-field col s6"><i class="material-icons dp48">home</i> <strong>' + docente.direccion + '</strong></div>'
html += '</div>'
html += '</div>'
html += '</div>'
html += '</div>'
html += '<p></p>'
html += '<br>'
let disponibilidad = docente.disponibilidad.split('-') || []
let diasM = []
let diasT = []
let aulasM = []
let aulasT = []
if (docente.arrayAulas) {
docente.arrayAulas.forEach(v => {
if (v.turno == '1') {
aulasM.push(v)
} else if (v.turno == '2') {
aulasT.push(v)
}
})
}
let diasin = docente.diasin.split('-') || []
let diasMS = []
let diasTS = []
diasin.forEach(function (b) {
let nTurnoS = b.split('#')[0]
let nDiaS = b.split('#')[1]
if (docente.disponibilidad) {
if (nTurnoS == '1') {
diasMS.push(nDiaS)
} else if (nTurno == '2') {
diasTS.push(nDiaS)
}
let disponibilidad = docente.disponibilidad.split('-') || []
let diasM = []
let diasT = []
let aulasM = []
let aulasT = []
})
if (docente.arrayAulas) {
docente.arrayAulas.forEach(v => {
if (v.turno == '1') {
aulasM.push(v)
} else if (v.turno == '2') {
aulasT.push(v)
}
})
}
let diasin = docente.diasin.split('-') || []
let diasMS = []
let diasTS = []
let bloqueo = docente.bloqueo.split('-') || []
let diasMB = []
let diasTB = []
let aulasMB = []
let aulasTB = []
diasin.forEach(function (b) {
let nTurnoS = b.split('#')[0]
let nDiaS = b.split('#')[1]
bloqueo.forEach(function (b) {
let nTurno = b.split('#')[0]
let nDia = b.split('#')[1]
if (nTurnoS == '1') {
diasMS.push(nDiaS)
} else if (nTurno == '2') {
diasTS.push(nDiaS)
}
if (nTurno == '1') {
diasMB.push(nDia)
} else if (nTurno == '2') {
diasTB.push(nDia)
}
})
})
let bloqueo = docente.bloqueo.split('-') || []
let diasMB = []
let diasTB = []
let aulasMB = []
let aulasTB = []
disponibilidad.forEach(function (d) {
let turno = d.split('#')[0]
let dia = d.split('#')[1]
bloqueo.forEach(function (b) {
let nTurno = b.split('#')[0]
let nDia = b.split('#')[1]
if (turno == '1') {
diasM.push(dia)
} else if (turno == '2') {
diasT.push(dia)
}
})
if (nTurno == '1') {
diasMB.push(nDia)
} else if (nTurno == '2') {
diasTB.push(nDia)
}
html += '<p class="col s12">'
html += '<table class="centered">'
html += '<thead>'
html += '<tr>'
html += '<td>TURNO</td>'
html += '<td id="dia">LUNES</td>'
html += '<td id="dia">MARTES</td>'
html += '<td id="dia">MIERCOLES</td>'
html += '<td id="dia">JUEVES</td>'
html += '<td id="dia">VIERNES</td>'
html += '<td id="dia">SABADO</td>'
html += '</tr>'
html += '</thead>'
html += '<tbody>'
})
html += '<tr>'
html += '<td id="turno">M</td>'
disponibilidad.forEach(function (d) {
let turno = d.split('#')[0]
let dia = d.split('#')[1]
for (let i = 0; i < 6; i++) {
let aulas = aulasM.map(a => {
if (a.dia == i + 1) {
return a.sede + ' - ' + a.aulas
}
})
if (turno == '1') {
diasM.push(dia)
} else if (turno == '2') {
diasT.push(dia)
}
})
if (diasM.some(d => d == (i + 1))) {
html += '<p class="col s12">'
html += '<table class="centered">'
html += '<thead>'
html += '<tr>'
html += '<td>TURNO</td>'
html += '<td id="dia">LUNES</td>'
html += '<td id="dia">MARTES</td>'
html += '<td id="dia">MIERCOLES</td>'
html += '<td id="dia">JUEVES</td>'
html += '<td id="dia">VIERNES</td>'
html += '<td id="dia">SABADO</td>'
html += '</tr>'
html += '</thead>'
html += '<tbody>'
html += `<td class="colorVerde" onclick="colorChange(this);"> ` + aulas.join(' \n ') + `</td> `
} else if (diasMB.some(t => t == (i + 1))) {
html += '<tr>'
html += '<td id="turno">M</td>'
html += '<td class="colorAzul" onclick="colorChange(this);" id="changed"> ' + aulas.join(' \n ') + '</td> '
for (let i = 0; i < 6; i++) {
let aulas = aulasM.map(a => {
if (a.dia == i + 1) {
return a.sede + ' - ' + a.aulas
}
})
} else if (diasMS.some(r => r == (i + 1))) {
if (diasM.some(d => d == (i + 1))) {
html += '<td class="colorAzul" onclick="colorChange(this);" id="changed"> ' + aulas.join(' \n ') + '</td> '
html += `<td class="colorVerde" onclick="colorChange(this);"> ` + aulas.join(' \n ') + `</td> `
} else {
} else if (diasMB.some(t => t == (i + 1))) {
html += '<td class="colorRojo" onclick="colorChange(this);" id="changed"> ' + aulas.join(' \n ') + '</td> '
}
}
html += '<td class="colorAzul" onclick="colorChange(this);" id="changed"> ' + aulas.join(' \n ') + '</td> '
} else if (diasMS.some(r => r == (i + 1))) {
html += '</tr>'
html += '<td class="colorAzul" onclick="colorChange(this);" id="changed"> ' + aulas.join(' \n ') + '</td> '
html += '<tr>'
html += '<td id="turno">T</td>'
} else {
for (let i = 0; i < 6; i++) {
let aulas = aulasT.map(a => {
html += '<td class="colorRojo" onclick="colorChange(this);" id="changed"> ' + aulas.join(' \n ') + '</td> '
}
}
if (a.dia == i + 1) {
return a.sede + ' - ' + a.aulas
}
})
if (diasT.some(d => d == (i + 1))) {
html += `<td class="colorVerde" onclick="colorChange(this);"> ` + aulas.join(' \n ') + `</td> `
html += '</tr>'
html += '<tr>'
html += '<td id="turno">T</td>'
} else if (diasTB.some(t => t == (i + 1))) {
for (let i = 0; i < 6; i++) {
let aulas = aulasT.map(a => {
html += '<td class="colorAzul" onclick="colorChange(this);" id="changed"> ' + aulas.join(' \n ') + '</td> '
if (a.dia == i + 1) {
return a.sede + ' - ' + a.aulas
}
})
if (diasT.some(d => d == (i + 1))) {
} else if (diasTS.some(q => q == (i + 1))) {
html += `<td class="colorVerde" onclick="colorChange(this);"> ` + aulas.join(' \n ') + `</td> `
html += '<td class="colorAzul" onclick="colorChange(this);" id="changed"> ' + aulas.join(' \n ') + '</td>'
} else {
} else if (diasTB.some(t => t == (i + 1))) {
html += '<td class="colorAzul" onclick="colorChange(this);" id="changed"> ' + aulas.join(' \n ') + '</td> '
html += '<td class="colorRojo" onclick="colorChange(this);" id="changed"> ' + aulas.join(' \n ') + '</td> '
} else if (diasTS.some(q => q == (i + 1))) {
}
}
html += '<td class="colorAzul" onclick="colorChange(this);" id="changed"> ' + aulas.join(' \n ') + '</td>'
html += '</tr>'
} else {
html += '</tbody>'
html += '</table>'
html += '</p>'
} else {
html += '<p>EL DOCENTE NO TIENE DISPONIBILIDAD REGISTRADA</p>'
}
html += '<td class="colorRojo" onclick="colorChange(this);" id="changed"> ' + aulas.join(' \n ') + '</td> '
html += `</div>`
}
})
document.querySelector('#divListaDisponibilidad').innerHTML = html
}
})
}
}
}
html += '</tr>'
html += '</tbody>'
html += '</table>'
html += '</p>'
function peticionWith3Parameters(json) {
}
else {
html += '<p>EL DOCENTE NO TIENE DISPONIBILIDAD REGISTRADA</p>'
}
$.ajax({
url: '../ServletHorario?Accion=listarVistaDobleDisponibilidad',
type: 'POST',
dataType: 'json',
data: {
json: JSON.stringify(json)
},
success: function (data, textStatus, jqXHR) {
html += `</div>`
}
})
document.querySelector('#divListaDisponibilidad').innerHTML = html
}
})
}
let html = ''
let nTurno = []
let nDia = []
let mensaje = 'No registrado'
data.data.forEach(function (docente) {
if (typeof (docente.celular && docente.distrito) == "undefined") {
html += '<table>'
html += '<div class="divider"></div>'
html += '<div class="section">'
function peticionWith3Parameters(json) {
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>'
$.ajax({
url: '../ServletHorario?Accion=listarVistaDobleDisponibilidad',
type: 'POST',
dataType: 'json',
data: {
json: JSON.stringify(json)
},
success: function (data, textStatus, jqXHR) {
html += '<tr>'
html += '<p>Celular: No registrado</p>'
html += '<p>Distrito: No registrado</p>'
html += '<p>Direccion: No registrado</p>'
html += '<p>Correo: No registrado</p>'
html += '<p>Zona: No registrado</p>'
html += '</tr>'
html += '<br>'
let html = ''
let nTurno = []
let nDia = []
let mensaje = 'No registrado'
data.data.forEach(function (docente) {
if (typeof (docente.celular && docente.distrito) == "undefined") {
html += '<table>'
html += '<div class="divider"></div>'
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 += '<label id="codDocente" style="visibility:hidden;">' + docente.codDocente + '</label>'
html += '<tr>'
html += '<p>Celular: No registrado</p>'
html += '<p>Distrito: No registrado</p>'
html += '<p>Direccion: No registrado</p>'
html += '<p>Correo: No registrado</p>'
html += '<p>Zona: No registrado</p>'
html += '</tr>'
if (docente.disponibilidad) {
html += '<br>'
let disponibilidad = docente.disponibilidad.split('-') || []
let diasM = []
let diasT = []
let aulasM = []
let aulasT = []
if (docente.arrayAulas) {
docente.arrayAulas.forEach(v => {
if (v.turno == '1') {
aulasM.push(v)
} else if (v.turno == '2') {
aulasT.push(v)
}
})
}
let diasin = docente.diasin.split('-') || []
let diasMS = []
let diasTS = []
diasin.forEach(function (b) {
let nTurnoS = b.split('#')[0]
let nDiaS = b.split('#')[1]
if (docente.disponibilidad) {
if (nTurnoS == '1') {
diasMS.push(nDiaS)
} else if (nTurno == '2') {
diasTS.push(nDiaS)
}
let disponibilidad = docente.disponibilidad.split('-') || []
let diasM = []
let diasT = []
let aulasM = []
let aulasT = []
})
if (docente.arrayAulas) {
docente.arrayAulas.forEach(v => {
if (v.turno == '1') {
aulasM.push(v)
} else if (v.turno == '2') {
aulasT.push(v)
}
})
}
let diasin = docente.diasin.split('-') || []
let diasMS = []
let diasTS = []
let bloqueo = docente.bloqueo.split('-') || []
let diasMB = []
let diasTB = []
let aulasMB = []
let aulasTB = []
diasin.forEach(function (b) {
let nTurnoS = b.split('#')[0]
let nDiaS = b.split('#')[1]
bloqueo.forEach(function (b) {
let nTurno = b.split('#')[0]
let nDia = b.split('#')[1]
if (nTurnoS == '1') {
diasMS.push(nDiaS)
} else if (nTurno == '2') {
diasTS.push(nDiaS)
}
if (nTurno == '1') {
diasMB.push(nDia)
} else if (nTurno == '2') {
diasTB.push(nDia)
}
})
})
let bloqueo = docente.bloqueo.split('-') || []
let diasMB = []
let diasTB = []
let aulasMB = []
let aulasTB = []
disponibilidad.forEach(function (d) {
let turno = d.split('#')[0]
let dia = d.split('#')[1]
bloqueo.forEach(function (b) {
let nTurno = b.split('#')[0]
let nDia = b.split('#')[1]
if (turno == '1') {
diasM.push(dia)
} else if (turno == '2') {
diasT.push(dia)
}
})
if (nTurno == '1') {
diasMB.push(nDia)
} else if (nTurno == '2') {
diasTB.push(nDia)
}
html += '<p class="col s12">'
html += '<table class="centered" id="tableDisponibilidad">'
html += '<thead>'
html += '<tr>'
html += '<td>TURNO</td>'
html += '<td id="dia">LUNES</td>'
html += '<td id="dia">MARTES</td>'
html += '<td id="dia">MIERCOLES</td>'
html += '<td id="dia">JUEVES</td>'
html += '<td id="dia">VIERNES</td>'
html += '<td id="dia">SABADO</td>'
html += '</tr>'
html += '</thead>'
html += '<tbody>'
})
html += '<tr>'
html += '<td id="turno">M</td>'
disponibilidad.forEach(function (d) {
let turno = d.split('#')[0]
let dia = d.split('#')[1]
for (let i = 0; i < 6; i++) {
let aulas = aulasM.map(a => {
if (a.dia == i + 1) {
return a.sede + ' - ' + a.aulas
}
})
if (turno == '1') {
diasM.push(dia)
} else if (turno == '2') {
diasT.push(dia)
}
})
if (diasM.some(d => d == (i + 1))) {
html += '<p class="col s12">'
html += '<table class="centered" id="tableDisponibilidad">'
html += '<thead>'
html += '<tr>'
html += '<td>TURNO</td>'
html += '<td id="dia">LUNES</td>'
html += '<td id="dia">MARTES</td>'
html += '<td id="dia">MIERCOLES</td>'
html += '<td id="dia">JUEVES</td>'
html += '<td id="dia">VIERNES</td>'
html += '<td id="dia">SABADO</td>'
html += '</tr>'
html += '</thead>'
html += '<tbody>'
html += `<td class="colorVerde" onclick="colorChange(this);">` + aulas.join(' \n ') + `</td>`
} else if (diasMB.some(t => t == (i + 1))) {
html += '<tr>'
html += '<td id="turno">M</td>'
html += `<td class="colorAzul" onclick="colorChange(this);" id="changed">` + aulas.join(' \n ') + `</td>`
for (let i = 0; i < 6; i++) {
let aulas = aulasM.map(a => {
if (a.dia == i + 1) {
return a.sede + ' - ' + a.aulas
}
})
} else if (diasMS.some(r => r == (i + 1))) {
if (diasM.some(d => d == (i + 1))) {
html += `<td class="colorAzul" onclick="colorChange(this);" id="changed">` + aulas.join(' \n ') + `</td>`
html += `<td class="colorVerde" onclick="colorChange(this);">` + aulas.join(' \n ') + `</td>`
} else {
} else if (diasMB.some(t => t == (i + 1))) {
html += `<td class="colorRojo" onclick="colorChange(this);" id="changed">` + aulas.join(' \n ') + `</td>`
}
}
html += `<td class="colorAzul" onclick="colorChange(this);" id="changed">` + aulas.join(' \n ') + `</td>`
} else if (diasMS.some(r => r == (i + 1))) {
html += '</tr>'
html += `<td class="colorAzul" onclick="colorChange(this);" id="changed">` + aulas.join(' \n ') + `</td>`
html += '<tr>'
html += '<td id="turno">T</td>'
} else {
for (let i = 0; i < 6; i++) {
let aulas = aulasT.map(a => {
html += `<td class="colorRojo" onclick="colorChange(this);" id="changed">` + aulas.join(' \n ') + `</td>`
}
}
if (a.dia == i + 1) {
return a.sede + ' - ' + a.aulas
}
})
if (diasT.some(d => d == (i + 1))) {
html += `<td class="colorVerde" onclick="colorChange(this);">` + aulas.join(' \n ') + `</td>`
html += '</tr>'
} else if (diasTB.some(t => t == (i + 1))) {
html += '<tr>'
html += '<td id="turno">T</td>'
html += `<td class="colorAzul" onclick="colorChange(this);" id="changed">` + aulas.join(' \n ') + `</td>`
for (let i = 0; i < 6; i++) {
let aulas = aulasT.map(a => {
} else if (diasTS.some(q => q == (i + 1))) {
if (a.dia == i + 1) {
return a.sede + ' - ' + a.aulas
}
})
if (diasT.some(d => d == (i + 1))) {
html += `<td class="colorAzul" onclick="colorChange(this);" id="changed">` + aulas.join(' \n ') + `</td>`
html += `<td class="colorVerde" onclick="colorChange(this);">` + aulas.join(' \n ') + `</td>`
} else {
} else if (diasTB.some(t => t == (i + 1))) {
html += `<td class="colorAzul" onclick="colorChange(this);" id="changed">` + aulas.join(' \n ') + `</td>`
html += `<td class="colorRojo" onclick="colorChange(this);" id="changed">` + aulas.join(' \n ') + `</td>`
} else if (diasTS.some(q => q == (i + 1))) {
}
}
html += `<td class="colorAzul" onclick="colorChange(this);" id="changed">` + aulas.join(' \n ') + `</td>`
html += '</tr>'
html += '</tbody>'
html += '</table>'
html += '</p>'
} else {
} else {
html += '<p>EL DOCENTE NO TIENE DISPONIBILIDAD REGISTRADA</p>'
}
html += `</div>`
html += `<td class="colorRojo" onclick="colorChange(this);" id="changed">` + aulas.join(' \n ') + `</td>`
} else {
}
}
html += '<div class="divider"></div>'
html += '<div class="section">'
html += '</tr>'
html += '</tbody>'
html += '</table>'
html += '</p>'
html += '<h6 id="nombreDocente" style="font-weight:bold;">' + docente.nombre + '<span></span><span></span> <span> </span>&nbsp;&nbsp; <a href="javascript:updateObservacion(this.value);" value=' + docente.observacion + '>' + docente.observacion + '</a></span></h6>'
html += '<label id="codDocente" style="visibility:hidden;">' + docente.codDocente + '</label>'
html += '<div class="form-control">'
html += '<div class="card grey lighten-2">'
html += '<div class="card-content black-text">'
//PRIMERA FILA
html += '<div class="row" style="margin-bottom:0px">'
html += '<div class="input-field col s3"><i class="material-icons dp48">local_phone</i> <strong>' + docente.celular + '</strong></div>'
html += '<div class="input-field col s3"><i class="material-icons dp48">school</i><strong> Puesto Nro: ' + docente.puesto + '</strong></div>'
html += '<div class="input-field col s6"><i class="material-icons dp48">hdr_weak</i> <strong>Exa. Encuesta ' + docente.notaEncuesta + '</strong></div>'
html += '</div>'
} else {
html += '<p>EL DOCENTE NO TIENE DISPONIBILIDAD REGISTRADA</p>'
}
html += `</div>`
//SEGUNDA FILA
html += '<div class="row" style="margin-bottom:0px">'
html += '<div class="input-field col s3"><i class="material-icons dp48">room</i> <strong>' + docente.distrito + '</strong></div>'
html += '<div class="input-field col s3"><i class="material-icons dp48">room</i> <strong>' + docente.zona + '</strong></div>'
html += '<div class="input-field col s6"><i class="material-icons dp48">hdr_strong</i> <strong> Exa. Academico ' + docente.examen + '</strong></div>'
html += '</div>'
//TERCERA FILA
}
else {
html += '<div class="row" style="margin-bottom:0px">'
html += '<div class="input-field col s3"><i class="material-icons dp48">email</i> <strong>' + docente.correo + '</strong></div>'
html += '<div class="input-field col s6"><i class="material-icons dp48">home</i> <strong>' + docente.direccion + '</strong></div>'
html += '<div class="divider"></div>'
html += '<div class="section">'
html += '</div>'
html += '</div>'
html += '</div>'
html += '</div>'
html += '<h6 id="nombreDocente" style="font-weight:bold;">' + docente.nombre + '<span></span><span></span> <span> </span>&nbsp;&nbsp; <a href="javascript:updateObservacion(this.value);" value=' + docente.observacion + '>' + docente.observacion + '</a></span></h6>'
html += '<label id="codDocente" style="visibility:hidden;">' + docente.codDocente + '</label>'
html +='<div class="form-control">'
html +='<div class="card grey lighten-2">'
html += '<div class="card-content black-text">'
//PRIMERA FILA
html += '<div class="row" style="margin-bottom:0px">'
html += '<div class="input-field col s3"><i class="material-icons dp48">local_phone</i> <strong>' + docente.celular + '</strong></div>'
html += '<div class="input-field col s3"><i class="material-icons dp48">school</i><strong> Puesto Nro: '+docente.puesto+'</strong></div>'
html += '<div class="input-field col s6"><i class="material-icons dp48">hdr_weak</i> <strong>Exa. Encuesta '+docente.notaEncuesta+'</strong></div>'
html += '</div>'
//SEGUNDA FILA
html += '<div class="row" style="margin-bottom:0px">'
html += '<div class="input-field col s3"><i class="material-icons dp48">room</i> <strong>' + docente.distrito + '</strong></div>'
html += '<div class="input-field col s3"><i class="material-icons dp48">room</i> <strong>' + docente.zona + '</strong></div>'
html += '<div class="input-field col s6"><i class="material-icons dp48">hdr_strong</i> <strong> Exa. Academico '+docente.examen+'</strong></div>'
html += '</div>'
//TERCERA FILA
html += '<div class="row" style="margin-bottom:0px">'
html += '<div class="input-field col s3"><i class="material-icons dp48">email</i> <strong>' + docente.correo + '</strong></div>'
html += '<div class="input-field col s6"><i class="material-icons dp48">home</i> <strong>' + docente.direccion + '</strong></div>'
html += '</div>'
html += '</div>'
html += '</div>'
html += '</div>'
html += '<p></p>'
html += '<br>'
html += '<p></p>'
html += '<br>'
if (docente.disponibilidad) {
if (docente.disponibilidad) {
let disponibilidad = docente.disponibilidad.split('-') || []
let diasM = []
let diasT = []
let aulasM = []
let aulasT = []
let disponibilidad = docente.disponibilidad.split('-') || []
let diasM = []
let diasT = []
let aulasM = []
let aulasT = []
if (docente.arrayAulas) {
docente.arrayAulas.forEach(v => {
if (v.turno == '1') {
aulasM.push(v)
} else if (v.turno == '2') {
aulasT.push(v)
}
})
}
if (docente.arrayAulas) {
docente.arrayAulas.forEach(v => {
if (v.turno == '1') {
aulasM.push(v)
} else if (v.turno == '2') {
aulasT.push(v)
}
})
}
let diasin = docente.diasin.split('-') || []
let diasMS = []
let diasTS = []
let diasin = docente.diasin.split('-') || []
let diasMS = []
let diasTS = []
diasin.forEach(function (b) {
let nTurnoS = b.split('#')[0]
let nDiaS = b.split('#')[1]
diasin.forEach(function (b) {
let nTurnoS = b.split('#')[0]
let nDiaS = b.split('#')[1]
if (nTurnoS == '1') {
diasMS.push(nDiaS)
} else if (nTurno == '2') {
diasTS.push(nDiaS)
}
if (nTurnoS == '1') {
diasMS.push(nDiaS)
} else if (nTurno == '2') {
diasTS.push(nDiaS)
}
})
})
let bloqueo = docente.bloqueo.split('-') || []
let diasMB = []
let diasTB = []
let aulasMB = []
let aulasTB = []
let bloqueo = docente.bloqueo.split('-') || []
let diasMB = []
let diasTB = []
let aulasMB = []
let aulasTB = []
bloqueo.forEach(function (b) {
let nTurno = b.split('#')[0]
let nDia = b.split('#')[1]
bloqueo.forEach(function (b) {
let nTurno = b.split('#')[0]
let nDia = b.split('#')[1]
if (nTurno == '1') {
diasMB.push(nDia)
} else if (nTurno == '2') {
diasTB.push(nDia)
}
if (nTurno == '1') {
diasMB.push(nDia)
} else if (nTurno == '2') {
diasTB.push(nDia)
}
})
})
disponibilidad.forEach(function (d) {
let turno = d.split('#')[0]
let dia = d.split('#')[1]
disponibilidad.forEach(function (d) {
let turno = d.split('#')[0]
let dia = d.split('#')[1]
if (turno == '1') {
diasM.push(dia)
} else if (turno == '2') {
diasT.push(dia)
}
})
if (turno == '1') {
diasM.push(dia)
} else if (turno == '2') {
diasT.push(dia)
}
})
html += '<p class="col s12">'
html += '<table class="centered">'
html += '<thead>'
html += '<tr>'
html += '<td>TURNO</td>'
html += '<td id="dia">LUNES</td>'
html += '<td id="dia">MARTES</td>'
html += '<td id="dia">MIERCOLES</td>'
html += '<td id="dia">JUEVES</td>'
html += '<td id="dia">VIERNES</td>'
html += '<td id="dia">SABADO</td>'
html += '</tr>'
html += '</thead>'
html += '<tbody>'
html += '<p class="col s12">'
html += '<table class="centered">'
html += '<thead>'
html += '<tr>'
html += '<td>TURNO</td>'
html += '<td id="dia">LUNES</td>'
html += '<td id="dia">MARTES</td>'
html += '<td id="dia">MIERCOLES</td>'
html += '<td id="dia">JUEVES</td>'
html += '<td id="dia">VIERNES</td>'
html += '<td id="dia">SABADO</td>'
html += '</tr>'
html += '</thead>'
html += '<tbody>'
html += '<tr>'
html += '<td id="turno">M</td>'
html += '<tr>'
html += '<td id="turno">M</td>'
for (let i = 0; i < 6; i++) {
let aulas = aulasM.map(a => {
if (a.dia == i + 1) {
return a.sede + ' - ' + a.aulas
}
})
for (let i = 0; i < 6; i++) {
let aulas = aulasM.map(a => {
if (a.dia == i + 1) {
return a.sede + ' - ' + a.aulas
}
})
if (diasM.some(d => d == (i + 1))) {
if (diasM.some(d => d == (i + 1))) {
html += `<td class="colorVerde" onclick="colorChange(this);"> ` + aulas.join(' \n ') + `</td> `
html += `<td class="colorVerde" onclick="colorChange(this);"> ` + aulas.join(' \n ') + `</td> `
} else if (diasMB.some(t => t == (i + 1))) {
} else if (diasMB.some(t => t == (i + 1))) {
html += '<td class="colorAzul" onclick="colorChange(this);" id="changed"> ' + aulas.join(' \n ') + '</td> '
html += '<td class="colorAzul" onclick="colorChange(this);" id="changed"> ' + aulas.join(' \n ') + '</td> '
} else if (diasMS.some(r => r == (i + 1))) {
} else if (diasMS.some(r => r == (i + 1))) {
html += '<td class="colorAzul" onclick="colorChange(this);" id="changed"> ' + aulas.join(' \n ') + '</td> '
html += '<td class="colorAzul" onclick="colorChange(this);" id="changed"> ' + aulas.join(' \n ') + '</td> '
} else {
} else {
html += '<td class="colorRojo" onclick="colorChange(this);" id="changed"> ' + aulas.join(' \n ') + '</td> '
}
}
html += '<td class="colorRojo" onclick="colorChange(this);" id="changed"> ' + aulas.join(' \n ') + '</td> '
}
}
html += '</tr>'
html += '</tr>'
html += '<tr>'
html += '<td id="turno">T</td>'
html += '<tr>'
html += '<td id="turno">T</td>'
for (let i = 0; i < 6; i++) {
let aulas = aulasT.map(a => {
for (let i = 0; i < 6; i++) {
let aulas = aulasT.map(a => {
if (a.dia == i + 1) {
return a.sede + ' - ' + a.aulas
}
})
if (diasT.some(d => d == (i + 1))) {
if (a.dia == i + 1) {
return a.sede + ' - ' + a.aulas
}
})
if (diasT.some(d => d == (i + 1))) {
html += `<td class="colorVerde" onclick="colorChange(this);"> ` + aulas.join(' \n ') + `</td> `
html += `<td class="colorVerde" onclick="colorChange(this);"> ` + aulas.join(' \n ') + `</td> `
} else if (diasTB.some(t => t == (i + 1))) {
} else if (diasTB.some(t => t == (i + 1))) {
html += '<td class="colorAzul" onclick="colorChange(this);" id="changed"> ' + aulas.join(' \n ') + '</td> '
html += '<td class="colorAzul" onclick="colorChange(this);" id="changed"> ' + aulas.join(' \n ') + '</td> '
} else if (diasTS.some(q => q == (i + 1))) {
} else if (diasTS.some(q => q == (i + 1))) {
html += '<td class="colorAzul" onclick="colorChange(this);" id="changed"> ' + aulas.join(' \n ') + '</td>'
html += '<td class="colorAzul" onclick="colorChange(this);" id="changed"> ' + aulas.join(' \n ') + '</td>'
} else {
} else {
html += '<td class="colorRojo" onclick="colorChange(this);" id="changed"> ' + aulas.join(' \n ') + '</td> '
html += '<td class="colorRojo" onclick="colorChange(this);" id="changed"> ' + aulas.join(' \n ') + '</td> '
}
}
}
}
html += '</tr>'
html += '</tr>'
html += '</tbody>'
html += '</table>'
html += '</p>'
html += '</tbody>'
html += '</table>'
html += '</p>'
} else {
html += '<p>EL DOCENTE NO TIENE DISPONIBILIDAD REGISTRADA</p>'
}
} else {
html += '<p>EL DOCENTE NO TIENE DISPONIBILIDAD REGISTRADA</p>'
}
html += `
</div>
`
html += `
</div>
`
}
}
})
document.querySelector('#divListaDisponibilidad').innerHTML = html
}
})
})
document.querySelector('#divListaDisponibilidad').innerHTML = html
}
})
}
}
function btnDesactivarHorario(codDocente) {
function btnDesactivarHorario(codDocente) {
let question = confirm("¿Esta seguro de eliminar su horario ?");
if (question) {
console.log(codDocente)
var periodo = "<%=periodo!=null?periodo.getCodigoPeriodo():""%>";
let question = confirm("¿Esta seguro de eliminar su horario ?");
if (question) {
console.log(codDocente)
var periodo = "<%=periodo != null ? periodo.getCodigoPeriodo() : ""%>";
desactivarHorario(codDocente, periodo)
desactivarHorario(codDocente, periodo)
} else {
console.log("cancel")
}
} else {
console.log("cancel")
}
}
}
function desactivarHorario() {
function desactivarHorario() {
}
}
function colorChange(obj){
function colorChange(obj) {
let periodo = '<%= periodo!=null?periodo.getCodigoPeriodo():""%>'
let periodo = '<%= periodo != null ? periodo.getCodigoPeriodo() : ""%>'
let codigoDoc = $(obj).parents('div.section').find('#codDocente').text();
let nombreDoc = $(obj).parents('div.section').find('#nombreDocente').text();
let codigoDoc = $(obj).parents('div.section').find('#codDocente').text();
let nombreDoc = $(obj).parents('div.section').find('#nombreDocente').text();
let turno = $(obj).parents('tr').find('#turno').text();
let turno = $(obj).parents('tr').find('#turno').text();
let numeroTurno = 0;
if (turno === "T") {
numeroTurno = 2
} else if (turno === "M") {
numeroTurno = 1
}
let numeroTurno = 0;
if (turno === "T") {
numeroTurno = 2
} else if (turno === "M") {
numeroTurno = 1
}
let dia = $(obj).parent().children().index(obj);
let dia = $(obj).parent().children().index(obj);
if ($(obj).hasClass('colorAzul')) {
if ($(obj).hasClass('colorAzul')) {
let question = confirm("¿Esta seguro de querer desbloquear el dia " + convertirDia(dia) + " ?");
if (question) {
let question = confirm("¿Esta seguro de querer desbloquear el dia " + convertirDia(dia) + " ?");
if (question) {
$.ajax({
url: '../ServletHorario?Accion=rollbackDisponibilidad',
type: 'POST',
data: {
codDocente: codigoDoc,
diaBloquear: dia,
periodo: periodo,
turno: numeroTurno
$.ajax({
url: '../ServletHorario?Accion=rollbackDisponibilidad',
type: 'POST',
data: {
codDocente: codigoDoc,
diaBloquear: dia,
periodo: periodo,
turno: numeroTurno
},
success: function (data, textStatus, jqXHR) {
},
success: function (data, textStatus, jqXHR) {
if (data.trim() == 2) {
if (data.trim() == 2) {
if ($(obj).hasClass('colorAzul')) {
$(obj).removeClass('colorAzul');
$(obj).addClass('colorRojo');
mostrarSnackBarDesbloqueo();
}
if ($(obj).hasClass('colorAzul')) {
$(obj).removeClass('colorAzul');
$(obj).addClass('colorRojo');
mostrarSnackBarDesbloqueo();
}
} else if (data.trim() == 3) {
if ($(obj).hasClass('colorAzul')) {
} else if (data.trim() == 3) {
if ($(obj).hasClass('colorAzul')) {
$(obj).removeClass('colorAzul');
$(obj).removeClass('colorAzul');
$(obj).addClass('colorVerde');
mostrarSnackBarDesbloqueo();
}
$(obj).addClass('colorVerde');
mostrarSnackBarDesbloqueo();
}
}
}
}
})
}
}
})
}
} else {
} else {
let question = confirm("¿Esta seguro de querer bloquear el dia " + convertirDia(dia) + " ?");
let question = confirm("¿Esta seguro de querer bloquear el dia " + convertirDia(dia) + " ?");
if (question) {
if (question) {
//aqui realizar peticion AJAX
$.ajax({
url: '../ServletHorario?Accion=updateDisponibilidad',
type: 'POST',
data: {
codDocente: codigoDoc,
diaBloquear: dia,
periodo: periodo,
turno: numeroTurno
//aqui realizar peticion AJAX
$.ajax({
url: '../ServletHorario?Accion=updateDisponibilidad',
type: 'POST',
data: {
codDocente: codigoDoc,
diaBloquear: dia,
periodo: periodo,
turno: numeroTurno
},
success: function (data, textStatus, jqXHR) {
},
success: function (data, textStatus, jqXHR) {
if (data.trim() == 1) {
if (data.trim() == 1) {
if ($(obj).hasClass('colorVerde')) {
if ($(obj).hasClass('colorVerde')) {
$(obj).removeClass('colorVerde');
$(obj).addClass('colorAzul');
mostrarSnackBar();
} else {
$(obj).removeClass('colorRojo');
$(obj).addClass('colorAzul');
mostrarSnackBar();
}
$(obj).removeClass('colorVerde');
$(obj).addClass('colorAzul');
mostrarSnackBar();
} else {
$(obj).removeClass('colorRojo');
$(obj).addClass('colorAzul');
mostrarSnackBar();
}
} else {
console.log("error");
}
} else {
console.log("error");
}
}
})
}
})
} else {
window.exit();
}
}
} else {
window.exit();
}
}
// $(obj).parents('tr').find('#changed').removeClass('red');
// $(obj).parents('tr').find('#changed').addClass('blue');
}
function convertirDia(dia) {
let diaLetras = "";
switch (dia) {
case 1:
diaLetras = "Lunes";
break;
case 2:
diaLetras = "Martes";
break;
case 3:
diaLetras = "Miercoles";
break;
case 4:
diaLetras = "Jueves";
break;
case 5:
diaLetras = "Viernes";
break;
case 6:
diaLetras = "Sabado";
break;
default :
break;
}
return diaLetras;
}
function mostrarSnackBar() {
// Get the snackbar DIV
var x = document.getElementById("snackbar");
// Add the "show" class to DIV
x.className = "show";
// After 3 seconds, remove the show class from DIV
setTimeout(function () {
x.className = x.className.replace("show", "");
}, 3000);
}
function mostrarSnackBarDesbloqueo() {
// Get the snackbar DIV
var x = document.getElementById("snackbar2");
// Add the "show" class to DIV
x.className = "show";
// After 3 seconds, remove the show class from DIV
setTimeout(function () {
x.className = x.className.replace("show", "");
}, 3000);
}
function listarPlana(select) {
let codigoArea = select.value
axios.get('../ServletPlana?Accion=cargarPlanaJson&codigoArea=' + codigoArea)
.then(data => {
let option = '<option value="">[SELECCIONE]</option>'
data.data.forEach(v => {
option += '<option value="' + v.cod_pla + '">' + v.nom_pla + '</option>'
})
document.querySelector('#cbPlana').innerHTML = option
instances.init(elems)
$("#btnBuscar").attr('enabled', 'enabled');
})
}
function pintarTDRed() {
//alert("holii");
$(".red").text("X");
}
function desactivarPrint() {
$("#btnImprimir").attr('disabled', 'disabled');
}
function activarPrint() {
$("#btnImprimir").attr('disabled', false);
}
function updateObservacion(obs) {
let textObs = prompt("Ingresar Observación");
if (textObs != null) {
$.ajax({
type: 'POST',
url: '../ServletHorario?accion=updateObservacion',
data: {
observacion: textObs
}, success: function (data, textStatus, jqXHR) {
alert("Actualizado exitosamente !")
}
})
}
}
</script>
<script src="js/pages/webSocketHorario.js" type="text/javascript"></script>
}
function convertirDia(dia) {
let diaLetras = "";
switch (dia) {
case 1:
diaLetras = "Lunes";
break;
case 2:
diaLetras = "Martes";
break;
case 3:
diaLetras = "Miercoles";
break;
case 4:
diaLetras = "Jueves";
break;
case 5:
diaLetras = "Viernes";
break;
case 6:
diaLetras = "Sabado";
break;
default :
break;
}
return diaLetras;
}
function mostrarSnackBar() {
// Get the snackbar DIV
var x = document.getElementById("snackbar");
// Add the "show" class to DIV
x.className = "show";
// After 3 seconds, remove the show class from DIV
setTimeout(function () {
x.className = x.className.replace("show", "");
}, 3000);
}
function mostrarSnackBarDesbloqueo() {
// Get the snackbar DIV
var x = document.getElementById("snackbar2");
// Add the "show" class to DIV
x.className = "show";
// After 3 seconds, remove the show class from DIV
setTimeout(function () {
x.className = x.className.replace("show", "");
}, 3000);
}
function listarPlana(select) {
let codigoArea = select.value
axios.get('../ServletPlana?Accion=cargarPlanaJson&codigoArea=' + codigoArea)
.then(data => {
let option = '<option value="">[SELECCIONE]</option>'
data.data.forEach(v => {
option += '<option value="' + v.cod_pla + '">' + v.nom_pla + '</option>'
})
document.querySelector('#cbPlana').innerHTML = option
instances.init(elems)
$("#btnBuscar").attr('enabled', 'enabled');
})
}
function pintarTDRed() {
//alert("holii");
$(".red").text("X");
}
function desactivarPrint() {
$("#btnImprimir").attr('disabled', 'disabled');
}
function activarPrint() {
$("#btnImprimir").attr('disabled', false);
}
function updateObservacion(obs) {
let textObs = prompt("Ingresar Observación");
if (textObs != null) {
$.ajax({
type: 'POST',
url: '../ServletHorario?accion=updateObservacion',
data: {
observacion: textObs
}, success: function (data, textStatus, jqXHR) {
alert("Actualizado exitosamente !")
}
})
}
}
</script>
<script src="js/pages/webSocketHorario.js" type="text/javascript"></script>
......
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