Преглед на файлове

Cambio de horas de cambio permanente

alejandro.lara преди 1 година
родител
ревизия
384dfd741c
променени са 3 файла, в които са добавени 16 реда и са изтрити 10 реда
  1. 2 1
      action/solicitud_insert.php
  2. 6 0
      action/solicitud_select.php
  3. 8 9
      solicitudes_autorizar.php

+ 2 - 1
action/solicitud_insert.php

@@ -58,6 +58,7 @@ if($horario!= null && $tipo !=3)
     
     $materia = $horario_rs["materia_id"];
     $dia = $horario_rs["horario_dia"];
+    $fecha_orig = $horario_rs["horario_fecha_inicio"];
     $hora_orig = $horario_rs["horario_hora"];
 }else{
     $dia = date('w', strtotime($fecha));
@@ -102,7 +103,7 @@ switch($tipo){
         $dia_new = date('w', strtotime($fecha_new));
 
         $fecha_nueva = date('d/m/Y', strtotime($fecha_new));
-        $fecha_clase = date('d/m/Y', strtotime($fecha_cambio));
+        $fecha_clase = date('d/m/Y', strtotime($fecha_orig));
     break;
 }
 

+ 6 - 0
action/solicitud_select.php

@@ -40,10 +40,16 @@ $user = unserialize($_SESSION['user']);
     
     
     $return["fecha_clase"] = isset($rs["fecha_clase"]) ? date('d/m/Y', strtotime($rs["fecha_clase"])):'';
+    $hora_nueva = explode(":",$rs["horario_hora"]);
+    $return["hora_clase_ini"] = $rs["horario_hora"];
+    $return["hora_clase_fin"] = $rs["horario_fin"];
+
     $return["fecha_nueva"] = isset($rs["fecha_nueva"]) ? date('d/m/Y', strtotime($rs["fecha_nueva"])):'';
+    $return["hora_nueva"] = $rs["hora_nueva"];
     $hora_nueva = explode(":",$rs["hora_nueva"]);
     $return["hora_ini"] = $hora_nueva[0];
     $return["min_ini"] = $hora_nueva[1];
+    $return["hora_nueva_fin"] = $rs["hora_nueva_fin"];
     $hora_nueva_fin = explode(":",$rs["hora_nueva_fin"]);
     $return["hora_fin"] = $hora_nueva_fin[0];
     $return["min_fin"] = $hora_nueva_fin[1];

+ 8 - 9
solicitudes_autorizar.php

@@ -760,21 +760,20 @@ if($user->periodo_id!= ""){
                             $("#dlSalon").val("");
                             $("#modal_aprobar #rep-prof").text(result["profesor_nombre"]);
                             $("#modal_aprobar #rep-fac").text(result["facultad"]);
-                            $("#modal_aprobar #rep-carr").parents(".row").show();
                             $("#modal_aprobar #rep-carr").text(result["carrera"]);
-                            $("#modal_aprobar #rep-gpo").parents(".row").show();
                             $("#modal_aprobar #rep-gpo").text(result["grupo"]);
-                            $("#modal_aprobar #rep-mat").parents(".row").show();
                             $("#modal_aprobar #rep-mat").text(result["materia_desc"]);
-                            $("#modal_aprobar #rep-ciclo").parents(".row").show();
                             $("#modal_aprobar #rep-ciclo").text(result["ciclo"]);
                             $("#modal_aprobar #rep-bloque").text(result["bloque"]);
                             $("#modal_aprobar #rep-tipo").text(result["solicitudtipo"]);
-                            
                             $("#modal_aprobar #rep-aula").text(result["aula_desc"])
                             $("#modal_aprobar #rep-aula").data("aula",result["aula"]);
-                            $("#modal_aprobar #rep-falta").parents(".row").show();
-                            $("#modal_aprobar #rep-falta").text(result["fecha_clase"]);
+                            
+                            if(tipo!=4){
+                                $("#modal_aprobar #rep-falta").text(result["fecha_clase"]+" de "+result["hora_clase_ini"]+" a "+result["hora_clase_fin"]);
+                            }else{
+                                $("#modal_aprobar #rep-falta").text(result["dia"]+" de "+result["hora_clase_ini"]+" a "+result["hora_clase_fin"]);
+                            }    
                             $("#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);
@@ -800,7 +799,7 @@ if($user->periodo_id!= ""){
                             }
 
                             if(edo == 1){// 1  ver
-                                $("#modalLabel").text("Detalle de reposición");
+                                $("#modalLabel").text("Detalle de solicitud");
                                 $(".aprobar-block").hide();
 
                                 /*if(parseInt($("#modal_aprobar #rep-aula").data("aula")) != 1){//tipo aula 1 (salon normal)  - ver
@@ -814,7 +813,7 @@ if($user->periodo_id!= ""){
                                 $("#salon-editar").hide();
                                 
                             }else{
-                                $("#modalLabel").text("Aprobar reposición");
+                                $("#modalLabel").text("Aprobar solicitud");
                                 $(".aprobar-block").show();
 
                                 if(edo == 2 && parseInt($("#modal_aprobar #rep-aula").data("aula")) == 1){//tipo aula 1 (salon normal)  - ver