From 340b23e7b6044e79888191a7f0efab7bffaf2ec1 Mon Sep 17 00:00:00 2001 From: "alejandro.lara" Date: Mon, 8 Apr 2024 13:31:40 -0600 Subject: [PATCH] =?UTF-8?q?Mostrar=20d=C3=ADa=20de=20cambio=20permanente?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- action/solicitud_select.php | 8 ++++++-- action/solicitud_update.php | 3 ++- solicitudes_autorizar.php | 3 +-- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/action/solicitud_select.php b/action/solicitud_select.php index b1a64fe..3b53844 100644 --- a/action/solicitud_select.php +++ b/action/solicitud_select.php @@ -40,8 +40,12 @@ $user = unserialize($_SESSION['user']); $dias = array('Domingo','Lunes','Martes','Miércoles','Jueves','Viernes','Sábado'); - $return["fecha_clase"] = isset($rs["fecha_clase"]) ? date('d/m/Y', strtotime($rs["fecha_clase"])):''; - $hora_nueva = explode(":",$rs["horario_hora"]); + if($rs["solicitudtipo_id"]!=4){ + $return["fecha_clase"] = isset($rs["fecha_clase"]) ? date('d/m/Y', strtotime($rs["fecha_clase"])):''; + $hora_nueva = explode(":",$rs["horario_hora"]); + }else{ + $return["fecha_clase"] = $dias[$rs["horario_dia"]]; + } $return["hora_clase_ini"] = $rs["horario_hora"]; $return["hora_clase_fin"] = $rs["horario_hora_fin"]; diff --git a/action/solicitud_update.php b/action/solicitud_update.php index 96c497e..6618dfd 100644 --- a/action/solicitud_update.php +++ b/action/solicitud_update.php @@ -102,6 +102,7 @@ switch($tipo){ $fecha_clase = $fecha_cambio; $fecha_new = DateTime::createFromFormat('d/m/Y', $fecha)->format('Y-m-d')." ".$hora; + $fecha_cambio = DateTime::createFromFormat('d/m/Y', $fecha_cambio)->format('Y-m-d')." ".$hora; $fecha_fin_new = date("Y-m-d", strtotime($fecha_new))." ".$duracion_tiempo; $dia_new = date('w', strtotime($fecha_new)); break; @@ -168,7 +169,7 @@ switch($tipo){ break; case 4: $db_params=[ - "id"=>$id, ":f_falta"=>$fecha_clase, ":f_nueva"=>$fecha_new, ":hora_nueva"=>$hora, ":prof"=>$prof, + "id"=>$id, ":f_falta"=>$fecha_cambio, ":f_nueva"=>$fecha_new, ":hora_nueva"=>$hora, ":prof"=>$prof, ":desc"=>$comentario, ":alumnos"=>$alumnos, ":aula"=>$aula, ":duracion"=>$duracion_tiempo, ":hor"=>$horario, ":bloque"=>$bloque, ":ciclo"=>$ciclo ]; diff --git a/solicitudes_autorizar.php b/solicitudes_autorizar.php index 6d621bd..206e46e 100644 --- a/solicitudes_autorizar.php +++ b/solicitudes_autorizar.php @@ -717,7 +717,6 @@ if($user->periodo_id!= ""){ $("#rep-bloque").parents('.row').hide(); $("#rep-gpo").parents('.row').hide(); break; - gpo case 4://cambio permanente $('#rep-falta').parents('.row').show(); $('#rep-fecha').parents('.row').show(); @@ -772,7 +771,7 @@ if($user->periodo_id!= ""){ 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["fecha_clase"]+"["+result["dia_nombre"]+"]"+" de "+result["hora_clase_ini"]+" a "+result["hora_clase_fin"]); + $("#modal_aprobar #rep-falta").text(result["fecha_clase"]+" 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){