diff --git a/action/action_auditoria.php b/action/action_auditoria.php index 0809dc0..0fc07c0 100644 --- a/action/action_auditoria.php +++ b/action/action_auditoria.php @@ -68,7 +68,7 @@ try { comentario, registro_fecha_justificacion, profesor.profesor_id, profesor_nombre, profesor_clave, profesor_correo, - materia, carrera, horarios.facultad_id, facultad, nivel, horario_hora, horario_fin, horario_grupo, salon, + materia, carrera, horarios.facultad_id, facultad, nivel, horario_hora, horario_fin, horario_grupo, horarios.salon, fechas.registro_fecha_ideal, estado_supervisor.estado_supervisor_id as estado_supervisor_id, estado_supervisor.nombre as nombre, @@ -78,12 +78,18 @@ try { justificador.usuario_clave as justificador_clave, facultad.facultad_nombre as justificador_facultad, rol.rol_titulo as justificador_rol, + registro.reposicion_id, + reposicion_fecha, + reposicion_hora, + salon_reposicion.salon as reposicion_salon, CASE WHEN registro_retardo THEN 'warning' ELSE 'primary' END as color FROM horarios JOIN fechas using (horario_id) JOIN horario_profesor using (horario_id) JOIN profesor using (profesor_id) LEFT JOIN registro USING (horario_id, registro_fecha_ideal, profesor_id) + LEFT JOIN reposicion USING (reposicion_id) + LEFT JOIN salon as salon_reposicion ON salon_reposicion.salon_id = reposicion.salon_id join estado_supervisor ON estado_supervisor.estado_supervisor_id = COALESCE(registro.estado_supervisor_id, 0) LEFT JOIN USUARIO ON USUARIO.usuario_id = REGISTRO.supervisor_id LEFT JOIN USUARIO JUSTIFICADOR ON JUSTIFICADOR.usuario_id = REGISTRO.justificador_id diff --git a/action/rutas_salón_horario.php b/action/rutas_salón_horario.php index 777ac09..b19f230 100644 --- a/action/rutas_salón_horario.php +++ b/action/rutas_salón_horario.php @@ -1,4 +1,8 @@ [ @@ -6,6 +10,7 @@ $information = [ 'bloque_horario_id', ], ]; + #output rutas: [ ...ruta, salones: [{...salon}] ] header('Content-Type: application/json charset=utf-8'); $ruta = "../"; @@ -28,7 +33,6 @@ try { ->where("{$_GET['id_espacio_sgu']} = ANY(id_espacio_sgu_array)") ->get('salon_view', columns: 'id_espacio_sgu, salon, salon_id, salon_array'); - // step 3: get horario $columns = [ // horario 'horario_view.horario_id', @@ -56,7 +60,7 @@ try { 'reposicion_hora', 'salon_reposicion.salon as reposicion_salon', ]; - $fecha = "'2023-09-01'::DATE"; + $data = array_map( fn($ruta) => array_merge( [ @@ -66,24 +70,34 @@ try { ->join('salon_view', 'salon_view.salon_id = horario_view.salon_id') ->join('horario_profesor', 'horario_profesor.horario_id = horario_view.horario_id') ->join('profesor', 'profesor.profesor_id = horario_profesor.profesor_id') - ->join('registro', "(registro.profesor_id, registro.horario_id, registro.registro_fecha_ideal) = (profesor.profesor_id, horario_view.horario_id, $fecha)", 'LEFT') + ->join('registro', '(registro.profesor_id, registro.horario_id, registro.registro_fecha_ideal) = (profesor.profesor_id, horario_view.horario_id, CURRENT_DATE)', 'LEFT') ->join('reposicion', 'reposicion.reposicion_id = registro.reposicion_id', 'LEFT') ->join('salon as salon_reposicion', 'salon_reposicion.salon_id = reposicion.salon_id', 'LEFT') - ->where("$fecha BETWEEN periodo.periodo_fecha_inicio AND periodo.periodo_fecha_fin") - ->where("horario_dia = EXTRACT(DOW FROM $fecha)") + ->where('CURRENT_DATE BETWEEN periodo.periodo_fecha_inicio AND periodo.periodo_fecha_fin') + ->where('horario_dia = EXTRACT(DOW FROM CURRENT_DATE)') ->where('bloque_horario.id', $_GET['bloque_horario_id']) ->where('salon_view.id_espacio_padre', $ruta['id_espacio_sgu']) - ->get('horario_view', columns: $columns), - 'reposiciones' => $db - ->join('periodo', 'periodo.periodo_id = horario_view.periodo_id') - ->join('registro', 'registro.horario_id = horario_view.horario_id') - ->join('reposicion', 'registro.reposicion_id = reposicion.reposicion_id') - ->join('bloque_horario', '(bloque_horario.hora_inicio, bloque_horario.hora_fin) OVERLAPS (reposicion_hora, reposicion_hora + horario_view.duracion)') - ->join('profesor', 'profesor.profesor_id = registro.profesor_id') - ->join('salon as salon_reposicion', 'salon_reposicion.salon_id = reposicion.salon_id', 'LEFT') - ->where("$fecha BETWEEN periodo.periodo_fecha_inicio AND periodo.periodo_fecha_fin") - ->where("reposicion_fecha = $fecha") - ->get('horario_view', columns: $columns), + ->get( + 'horario_view', + columns: $columns + ), + 'query' => $db->getLastQuery(), + 'reposiciones' => $db + ->join('periodo', 'periodo.periodo_id = horario_view.periodo_id') + ->join('registro', 'registro.horario_id = horario_view.horario_id') + ->join('reposicion', 'registro.reposicion_id = reposicion.reposicion_id') + ->join('bloque_horario', '(bloque_horario.hora_inicio, bloque_horario.hora_fin) OVERLAPS (reposicion_hora, reposicion_hora + horario_view.duracion)') + ->join('profesor', 'profesor.profesor_id = registro.profesor_id') + ->join('salon_view', 'salon_view.salon_id = reposicion.salon_id', 'LEFT') + ->join('salon as salon_reposicion', 'salon_reposicion.salon_id = horario_view.salon_id', 'LEFT') + ->where("CURRENT_DATE BETWEEN periodo.periodo_fecha_inicio AND periodo.periodo_fecha_fin") + ->where("reposicion_fecha = CURRENT_DATE") + ->where('bloque_horario.id', $_GET['bloque_horario_id']) + ->where('salon_view.id_espacio_padre', $ruta['id_espacio_sgu']) + ->get( + 'horario_view', + columns: $columns + ), ], $ruta, ), diff --git a/auditoria.php b/auditoria.php index 2ddd83c..30ca405 100644 --- a/auditoria.php +++ b/auditoria.php @@ -271,7 +271,8 @@ No hay clases en este horario + :key="`${registro.registro_id}-${registro.registro_fecha_ideal}-${registro.horario_id}-${registro.profesor_id}-${registro.salon_id}`" + :class="{ 'table-warning': registro.reposicion_id }"> {{ registro.registro_fecha_ideal }} {{ registro.salon }} @@ -313,7 +314,8 @@ - {{ registro.usuario_nombre }} + {{ registro.usuario_nombre + }}
Hora @@ -452,8 +454,7 @@
Horario: - {{ clase_vista.horario_hora?.slice(0, 5) }} - {{ - clase_vista.horario_fin?.slice(0, 5) }} + {{ clase_vista.horario_hora?.slice(0, 5) }} - {{clase_vista.horario_fin?.slice(0, 5) }}
Salón: @@ -537,6 +538,19 @@
+ + +
+

Reposición

+ +
+
+ Esta clase se reprogramó para el día + {{ clase_vista.reposicion_fecha }} a las + {{ clase_vista.reposicion_hora?.slice(0, 5) }} +
+
+
@@ -580,10 +594,14 @@
- Justificar - {{store.current.justificada.nombre}} del día {{store.current.justificada.registro_fecha_ideal}} a - las {{store.current.justificada.horario_hora?.slice(0,5)}} - para el profesor {{store.current.justificada.profesor_nombre}} + Justificar + {{store.current.justificada.nombre}} del día {{store.current.justificada.registro_fecha_ideal}} a + las {{store.current.justificada.horario_hora?.slice(0,5)}} + para el profesor {{store.current.justificada.profesor_nombre}}
diff --git a/reposiciones_crear.php b/reposiciones_crear.php index 27b9f05..8107836 100644 --- a/reposiciones_crear.php +++ b/reposiciones_crear.php @@ -95,6 +95,11 @@ $fecha_fin_db= date("Y-m-d", strtotime($fecha_fin)); .wizard.active > div:first-child { background: #00A6CE; } .wizard.active > div:last-child { width: 0px; height: 0px; border-style: solid; border-width: 10px 0 10px 6px; border-color: transparent transparent transparent #00a6ce; transform: rotate(0deg); } + + + + + @@ -257,7 +262,7 @@ $fecha_fin_db= date("Y-m-d", strtotime($fecha_fin));
  • " profesor){ echo "class='selected'";} ?> >
  • - +
    @@ -360,9 +365,7 @@ $fecha_fin_db= date("Y-m-d", strtotime($fecha_fin)); - - -
    +
    diff --git a/supervisor.php b/supervisor.php index 6f94b3e..88bf891 100644 --- a/supervisor.php +++ b/supervisor.php @@ -172,7 +172,7 @@
    @@ -209,8 +209,10 @@
    - - + + Reposiciones + + {{ clase.salon }}
    @@ -218,18 +220,18 @@
    - {{ clase.horario_hora?.slice(0, 5) }} - {{ clase.horario_fin?.slice(0, 5) }} + {{ clase.reposicion_hora?.slice(0, 5) }} - {{ clase.horario_fin?.slice(0, 5) }}