|
@@ -87,13 +87,9 @@ if($user->periodo_id!= ""){
|
|
|
$repEdo_rs = $db->query('SELECT * FROM fs_estado_reposicion' );
|
|
|
|
|
|
$repoParams = array();
|
|
|
-<<<<<<< HEAD
|
|
|
- $query = "";
|
|
|
-=======
|
|
|
$asigParams = array();
|
|
|
$query = "";
|
|
|
|
|
|
->>>>>>> 7688f1aac1824c234bc5f19b154e9ad1f4808d4f
|
|
|
if($user->rol["rol_id"] == 9){//es coordinador
|
|
|
$query .= ":facultad, ";
|
|
|
$repoParams[":facultad"] = $user->facultad["facultad_id"];
|
|
@@ -107,12 +103,8 @@ if($user->periodo_id!= ""){
|
|
|
}else{
|
|
|
$query .= "NULL,";
|
|
|
}
|
|
|
-<<<<<<< HEAD
|
|
|
- $query .= ":f_ini, :f_fin, :edo, ";
|
|
|
-=======
|
|
|
$query .= ":f_ini, :f_fin, ";
|
|
|
$queryAsig = ":f_ini, :f_fin,";
|
|
|
->>>>>>> 7688f1aac1824c234bc5f19b154e9ad1f4808d4f
|
|
|
|
|
|
|
|
|
$date = DateTime::createFromFormat('d/m/Y', $fecha_ini);
|
|
@@ -123,12 +115,9 @@ if($user->periodo_id!= ""){
|
|
|
$repoParams[":f_ini"] = $fecha_ini_db;
|
|
|
$repoParams[":f_fin"] = $fecha_fin_db;
|
|
|
$repoParams[":edo"] = 1;//se sobreescribe
|
|
|
-<<<<<<< HEAD
|
|
|
-=======
|
|
|
|
|
|
$asigParams[":f_ini"] = $fecha_ini_db;
|
|
|
$asigParams[":f_fin"] = $fecha_fin_db;
|
|
|
->>>>>>> 7688f1aac1824c234bc5f19b154e9ad1f4808d4f
|
|
|
}
|
|
|
?>
|
|
|
<!DOCTYPE html>
|
|
@@ -207,10 +196,6 @@ if($user->periodo_id!= ""){
|
|
|
<button type="submit" class="btn btn-outline-primary mr-2" id="btn-buscar"><span class="ing-buscar ing-fw"></span> Buscar</button>
|
|
|
<button type="button" class="btn btn-outline-danger" onclick="window.location.href = window.location.href"><span class="ing-borrar ing-fw"></span> Limpiar</button>
|
|
|
</div>
|
|
|
-<<<<<<< HEAD
|
|
|
- </form>
|
|
|
-
|
|
|
-=======
|
|
|
|
|
|
<p class="text-right">
|
|
|
<button class="btn btn-secondary" id="exportar"><span class="ing-descargar"></span>Descargar xls</button>
|
|
@@ -219,7 +204,6 @@ if($user->periodo_id!= ""){
|
|
|
|
|
|
|
|
|
|
|
|
->>>>>>> 7688f1aac1824c234bc5f19b154e9ad1f4808d4f
|
|
|
<ul class="nav nav-tabs d-print-none mb-4" id="myTab" role="tablist">
|
|
|
<li class="nav-item">
|
|
|
<a class="nav-link" id="tab1-tab" data-toggle="tab" href="#tab1" role="tab" aria-controls="calendario" aria-selected="true">Nuevas reposiciones</a>
|
|
@@ -240,18 +224,6 @@ if($user->periodo_id!= ""){
|
|
|
foreach($repEdo_rs as $redo){ ?>
|
|
|
<div class="tab-pane fade" id="tab<?php echo $i;?>" role="tabpanel" aria-labelledby="tab<?php echo $i;?>-tab">
|
|
|
<?php
|
|
|
-<<<<<<< HEAD
|
|
|
- $repoParams[":edo"]=$redo["estado_reposicion_id"];
|
|
|
- if($user->rol["rol_id"] == 7){//es supervisor
|
|
|
- $repoParams[":sup"] = $user->user["id"];
|
|
|
- $reposiciones_rs = $db->query('SELECT * FROM fs_reposicion_solicitud(NULL, '.$query.'0, NULL, :sup) ', $repoParams );
|
|
|
- }else{
|
|
|
- $reposiciones_rs = $db->query('SELECT * FROM fs_reposicion_solicitud(NULL, '.$query.'0, NULL) ', $repoParams );
|
|
|
- }
|
|
|
- ?>
|
|
|
-
|
|
|
- <h4 class="mb-4" <?php echo "style='color:".$redo["estado_color"]."'>".$redo["estado_nombre"]; ?> </h4>
|
|
|
-=======
|
|
|
|
|
|
$tablaArr = [];
|
|
|
|
|
@@ -298,7 +270,6 @@ if($user->periodo_id!= ""){
|
|
|
?>
|
|
|
|
|
|
<h4 class="mb-4" <?php echo "style='color:".$redo["estado_color"]."'";?> > <?php echo $redo["estado_nombre"]; ?> </h4>
|
|
|
->>>>>>> 7688f1aac1824c234bc5f19b154e9ad1f4808d4f
|
|
|
|
|
|
<table class="table table-sm table-striped table-white">
|
|
|
<thead class="thead-dark">
|
|
@@ -314,19 +285,6 @@ if($user->periodo_id!= ""){
|
|
|
</thead>
|
|
|
<tbody>
|
|
|
<?php
|
|
|
-<<<<<<< HEAD
|
|
|
- if(isset($reposiciones_rs)){
|
|
|
- foreach($reposiciones_rs as $reposicion){
|
|
|
- ?>
|
|
|
- <tr data-id="<?php echo $reposicion["reposicion_solicitud_id"]; ?>" data-edo="<?php echo $reposicion["estado_reposicion_id"];?>" id="id<?php echo $reposicion["reposicion_solicitud_id"]; ?>">
|
|
|
- <td class="align-middle">
|
|
|
- <?php if($reposicion["estado_reposicion_id"]<3){ ?>
|
|
|
- <div class="wizard <?php if(intval($reposicion["estado_reposicion_id"])==2) echo "active";?> d-flex mx-auto">
|
|
|
- <div class="w-50 h-100"></div>
|
|
|
- <div class=""></div>
|
|
|
- </div>
|
|
|
- <?php } else if($reposicion["estado_reposicion_id"]==3){?>
|
|
|
-=======
|
|
|
if(isset($tablaArr)){
|
|
|
foreach($tablaArr as $reposicion){
|
|
|
?>
|
|
@@ -338,7 +296,6 @@ if($user->periodo_id!= ""){
|
|
|
<div class=""></div>
|
|
|
</div>
|
|
|
<?php } else if($reposicion["estado"]==3){?>
|
|
|
->>>>>>> 7688f1aac1824c234bc5f19b154e9ad1f4808d4f
|
|
|
<div class="text-success text-center pt-1">
|
|
|
<span class="ing-autorizar ing-lg"></span>
|
|
|
</div>
|
|
@@ -349,15 +306,11 @@ if($user->periodo_id!= ""){
|
|
|
<?php } ?>
|
|
|
</td>
|
|
|
<td class="align-middle">
|
|
|
-<<<<<<< HEAD
|
|
|
- <?php if($reposicion["es_reposicion"]) echo "Resposición"; else echo "Cambio"; ?>
|
|
|
-=======
|
|
|
<?php switch($reposicion["tipo"]){
|
|
|
case 1: echo "Resposición"; break;
|
|
|
case 2: echo "Cambio"; break;
|
|
|
case 3: echo "Asignación"; break;
|
|
|
}?>
|
|
|
->>>>>>> 7688f1aac1824c234bc5f19b154e9ad1f4808d4f
|
|
|
</td>
|
|
|
<td><?php
|
|
|
echo $reposicion["profesor_clave"]." - ".$reposicion["profesor_nombre"];
|
|
@@ -365,16 +318,6 @@ if($user->periodo_id!= ""){
|
|
|
<br>
|
|
|
<small>
|
|
|
<?php echo $reposicion["materia_nombre"]; ?>
|
|
|
-<<<<<<< HEAD
|
|
|
- (<?php
|
|
|
- echo $reposicion["horario_grupo"];
|
|
|
- ?>)
|
|
|
- </small>
|
|
|
- </td>
|
|
|
- <td class="text-center align-middle text-nowrap"><?php
|
|
|
- $fechaI = date("d/m/Y", strtotime($reposicion["fecha_clase"]));
|
|
|
- echo $fechaI."<br>".substr($reposicion["horario_hora"],0, 5);
|
|
|
-=======
|
|
|
<?php
|
|
|
if($reposicion["horario_grupo"]!="")
|
|
|
echo "(".$reposicion["horario_grupo"].")";
|
|
@@ -388,7 +331,6 @@ if($user->periodo_id!= ""){
|
|
|
}else{
|
|
|
echo " - ";
|
|
|
}
|
|
|
->>>>>>> 7688f1aac1824c234bc5f19b154e9ad1f4808d4f
|
|
|
?>
|
|
|
</td>
|
|
|
<td class="text-center align-middle text-nowrap"><?php
|
|
@@ -409,26 +351,6 @@ if($user->periodo_id!= ""){
|
|
|
<td class="text-center align-middle icono-acciones text-nowrap">
|
|
|
<?php if (duracionMinutos($reposicion["fecha_nueva"], date("Y-m-d H:i:00")) < 0){ ?>
|
|
|
<?php //no se cumple la fecha de la reposicion, es jefe de carrera
|
|
|
-<<<<<<< HEAD
|
|
|
- if((!$user->jefe_carrera || $user->admin || !$coordinador) && $reposicion["estado_reposicion_id"] == 1){?>
|
|
|
- <a href="#" data-toggle="modal" data-target="#modal_aprobar" data-tipo="2" title="Aprobar"><?php echo $ICO["ver"];?></a>
|
|
|
- <?php } //no se cumple la fecha de la reposicion, no es jefe de carrera
|
|
|
- else if(($supervisor || $user->admin) && $reposicion["estado_reposicion_id"] == 2){?>
|
|
|
- <a href="#" data-toggle="modal" data-target="#modal_aprobar" data-tipo="3" title="Autorizar" ><?php echo $ICO["ver"];?></a>
|
|
|
- <?php } else { ?>
|
|
|
- <a href="#" data-toggle="modal" data-target="#modal_aprobar" data-tipo="1" title="Ver detalle"><?php echo $ICO["ver"];?></a>
|
|
|
- <?php } ?>
|
|
|
- <?php
|
|
|
- }else{ //fecha ya pasó?>
|
|
|
- <a href="#" data-toggle="modal" data-target="#modal_aprobar" data-tipo="1" title="Ver detalle"><span class="text-danger"><?php echo $ICO["ver"];?></span></a>
|
|
|
- <?php } ?>
|
|
|
-
|
|
|
- <?php
|
|
|
- if($reposicion["estado_reposicion_id"]<4){
|
|
|
- if(
|
|
|
- (($user->jefe_carrera || $user->admin || $coordinador) && $reposicion["estado_reposicion_id"] == 1)/* nueva */
|
|
|
- || (($user->admin || $coordinador || $supervisor) && $reposicion["estado_reposicion_id"] == 2)/* aprobado facultad */
|
|
|
-=======
|
|
|
if((!$user->jefe_carrera || $user->admin || !$coordinador) && $reposicion["estado"] == 1){?>
|
|
|
<a href="#" data-toggle="modal" data-target="#modal_aprobar" data-estado="2" data-tipo="<?php echo $reposicion["tipo"];?>" title="Aprobar"><?php echo $ICO["ver"];?></a>
|
|
|
<?php } //no se cumple la fecha de la reposicion, no es jefe de carrera
|
|
@@ -447,7 +369,6 @@ if($user->periodo_id!= ""){
|
|
|
if(
|
|
|
(($user->jefe_carrera || $user->admin || $coordinador) && $reposicion["estado"] == 1)/* nueva */
|
|
|
|| (($user->admin || $coordinador || $supervisor) && $reposicion["estado"] == 2)/* aprobado facultad */
|
|
|
->>>>>>> 7688f1aac1824c234bc5f19b154e9ad1f4808d4f
|
|
|
){
|
|
|
?>
|
|
|
<a href="#" data-toggle="modal" data-target="#modal_confirm" title="Cancelar"><span class="text-danger"><?php echo $ICO["cancelar"];?></span></a>
|
|
@@ -483,10 +404,7 @@ if($user->periodo_id!= ""){
|
|
|
<form action="./action/reposicion_autoriza.php" method="post" id="formaModal">
|
|
|
<input type="hidden" name="id" id="id">
|
|
|
<input type="hidden" name="edo" id="edo" value="">
|
|
|
-<<<<<<< HEAD
|
|
|
-=======
|
|
|
<input type="hidden" name="tipo" id="tipo" value="">
|
|
|
->>>>>>> 7688f1aac1824c234bc5f19b154e9ad1f4808d4f
|
|
|
|
|
|
<div class="row">
|
|
|
<div class="col-6 col-sm-4 barra-right text-right">
|
|
@@ -621,8 +539,6 @@ if($user->periodo_id!= ""){
|
|
|
<input type="hidden" id="salon" name="salon" value="">
|
|
|
</div>
|
|
|
</div>
|
|
|
-<<<<<<< HEAD
|
|
|
-=======
|
|
|
|
|
|
<div class="row" id="supervisor" style="display: none;">
|
|
|
<div class="col-6 col-sm-4 barra-right text-right">
|
|
@@ -632,7 +548,6 @@ if($user->periodo_id!= ""){
|
|
|
<p class="rep-sup"></p>
|
|
|
</div>
|
|
|
</div>
|
|
|
->>>>>>> 7688f1aac1824c234bc5f19b154e9ad1f4808d4f
|
|
|
|
|
|
|
|
|
<div class="row mt-4">
|
|
@@ -653,11 +568,7 @@ if($user->periodo_id!= ""){
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
-<<<<<<< HEAD
|
|
|
- <div class="form-group row mt-3">
|
|
|
-=======
|
|
|
<div class="form-group row mt-3" id="submitGroup">
|
|
|
->>>>>>> 7688f1aac1824c234bc5f19b154e9ad1f4808d4f
|
|
|
<div class="col-12 text-center">
|
|
|
|
|
|
<p class="aprobar-block">Una vez realizada la acción no se puede deshacer.</p>
|
|
@@ -668,8 +579,6 @@ if($user->periodo_id!= ""){
|
|
|
|
|
|
</div>
|
|
|
</div>
|
|
|
-<<<<<<< HEAD
|
|
|
-=======
|
|
|
<div class="form-group row mt-3" id="loadingGroup" style="display:none">
|
|
|
<div class="col-12 text-center">
|
|
|
<div class="spinner-border text-primary" role="status">
|
|
@@ -677,7 +586,6 @@ if($user->periodo_id!= ""){
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
->>>>>>> 7688f1aac1824c234bc5f19b154e9ad1f4808d4f
|
|
|
</form>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -810,114 +718,14 @@ if($user->periodo_id!= ""){
|
|
|
$('#modal_aprobar').on('show.bs.modal', function (event) {
|
|
|
var button = $(event.relatedTarget); // Button that triggered the modal
|
|
|
var id = button.parents("tr").data("id");
|
|
|
-<<<<<<< HEAD
|
|
|
- var edo = button.data('tipo');
|
|
|
-=======
|
|
|
var edo = button.data('estado');
|
|
|
var tipo = button.data('tipo');
|
|
|
$("#loadingGroup").hide();
|
|
|
$("#submitGroup").show();
|
|
|
->>>>>>> 7688f1aac1824c234bc5f19b154e9ad1f4808d4f
|
|
|
|
|
|
//1 ver, 2 aprobar, 3 autorizar
|
|
|
$("#edo").val(edo);
|
|
|
$("#id").val(id);
|
|
|
-<<<<<<< HEAD
|
|
|
-
|
|
|
-
|
|
|
- $.ajax({
|
|
|
- url: './action/reposicion_select.php',
|
|
|
- type: 'POST',
|
|
|
- dataType: 'json',
|
|
|
- data: { id: id},
|
|
|
- success: function(result) {
|
|
|
- if(result["error"]!= "" && result["error"] !== undefined){
|
|
|
- triggerMessage(result["error"], "Error");
|
|
|
- $('#modal_aprobar').modal("hide");
|
|
|
- }else{
|
|
|
- $("#dlSalon").val("");
|
|
|
- $("#modal_aprobar .rep-prof").text(result["profesor_nombre"]);
|
|
|
- $("#modal_aprobar .rep-fac").text(result["facultad"]);
|
|
|
- $("#modal_aprobar .rep-carr").text(result["carrera"]);
|
|
|
- $("#modal_aprobar .rep-gpo").text(result["grupo"]);
|
|
|
- $("#modal_aprobar .rep-mat").text(result["materia_desc"]);
|
|
|
- $("#modal_aprobar .rep-ciclo").text(result["ciclo"]);
|
|
|
- $("#modal_aprobar .rep-bloque").text(result["bloque"]);
|
|
|
- if(result["tipo"])
|
|
|
- $("#modal_aprobar .rep-tipo").text("Reposición");
|
|
|
- else
|
|
|
- $("#modal_aprobar .rep-tipo").text("Cambio");
|
|
|
- $("#modal_aprobar .rep-aula").text(result["aula_desc"])
|
|
|
- $("#modal_aprobar .rep-aula").data("aula",result["aula"]);
|
|
|
- $("#modal_aprobar .rep-falta").text(result["fecha_clase"]);
|
|
|
- $("#modal_aprobar .rep-fecha").text(result["fecha_nueva"]+" de "+result["hora_ini"]+":"+result["min_ini"]+" a "+result["hora_fin"]+":"+result["min_fin"]);
|
|
|
- if(result["salon"] =="" || result["salon"] === undefined){
|
|
|
- $('#salon').prop("selectedIndex", 0);
|
|
|
- }else{
|
|
|
- $('#salon').val(result["salon"]);
|
|
|
- }
|
|
|
- $("#modal_aprobar .rep-salon").text(result["salon_desc"]);
|
|
|
- $("#modal_aprobar .rep-comentarios").text(result["comentario"]);
|
|
|
- $('#modal_aprobar .rep-alumnos').text(result["alumnos"]);
|
|
|
-
|
|
|
- if(result["estado"] == 4){//cancelada
|
|
|
- $('#modal_aprobar .rep-motivo').text(result["motivo_cancelacion"]);
|
|
|
- $("#cancelada-block").show();
|
|
|
- }else{
|
|
|
- $("#cancelada-block").hide();
|
|
|
- }
|
|
|
-
|
|
|
- if(edo == 1){// 1 ver
|
|
|
- $("#modalLabel").text("Detalle de reposición");
|
|
|
- $(".aprobar-block").hide();
|
|
|
-
|
|
|
- /*if(parseInt($("#modal_aprobar .rep-aula").data("aula")) != 1){//tipo aula 1 (salon normal) - ver
|
|
|
- $("#salon-ver").hide();
|
|
|
- $("#salon-editar").show();
|
|
|
- }else{
|
|
|
- $("#salon-ver").show();
|
|
|
- $("#salon-editar").hide();
|
|
|
- }*/
|
|
|
- $("#salon-ver").show();
|
|
|
- $("#salon-editar").hide();
|
|
|
-
|
|
|
- }else{
|
|
|
- $("#modalLabel").text("Aprobar reposición");
|
|
|
- $(".aprobar-block").show();
|
|
|
-
|
|
|
- if(edo == 2 && parseInt($("#modal_aprobar .rep-aula").data("aula")) == 1){//tipo aula 1 (salon normal) - ver
|
|
|
- $("#salon-ver").show();
|
|
|
- $("#salon-editar").hide();
|
|
|
- }else if(edo == 3 && parseInt($("#modal_aprobar .rep-aula").data("aula")) != 1){//aprobar (con salón especial)
|
|
|
- $("#salon-ver").show();
|
|
|
- $("#salon-editar").hide();
|
|
|
- }else{
|
|
|
- $("#salon-ver").hide();
|
|
|
- $("#salon-editar").show();
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- if(result["aula_supervisor"]){//Solo supervisor
|
|
|
- <?php if($supervisor){ ?>
|
|
|
- $("#salon-editar").attr("disabled", false);
|
|
|
- <?php }else{?>
|
|
|
- $("#salon-editar").attr("disabled", true);
|
|
|
- <?php } ?>
|
|
|
- }else{// Facultad
|
|
|
- <?php if(!$supervisor){ ?>
|
|
|
- $("#salon-editar").attr("disabled", false);
|
|
|
- <?php }else{?>
|
|
|
- $("#salon-editar").attr("disabled", true);
|
|
|
- <?php } ?>
|
|
|
- }
|
|
|
-
|
|
|
- }
|
|
|
- },
|
|
|
- error: function(jqXHR, textStatus, errorThrown ){
|
|
|
- triggerMessage(errorThrown, "Error");
|
|
|
- }
|
|
|
- });//ajax
|
|
|
-=======
|
|
|
$("#tipo").val(tipo);
|
|
|
|
|
|
var action_pag;
|
|
@@ -1128,7 +936,6 @@ if($user->periodo_id!= ""){
|
|
|
}
|
|
|
|
|
|
|
|
|
->>>>>>> 7688f1aac1824c234bc5f19b154e9ad1f4808d4f
|
|
|
});
|
|
|
/*
|
|
|
$(".btn-borrar").click(function(){
|
|
@@ -1163,11 +970,8 @@ if($user->periodo_id!= ""){
|
|
|
var edo = parseInt($("#edo").val());
|
|
|
console.log(edo)
|
|
|
if((edo == 3 && valida()) || edo == 2){
|
|
|
-<<<<<<< HEAD
|
|
|
-=======
|
|
|
$("#loadingGroup").show();
|
|
|
$("#submitGroup").hide();
|
|
|
->>>>>>> 7688f1aac1824c234bc5f19b154e9ad1f4808d4f
|
|
|
$("#formaModal").submit();
|
|
|
}
|
|
|
});
|