Remove test reposiciones

This commit is contained in:
2023-08-31 19:27:57 +00:00
parent a2c075fa83
commit c0ce381118

View File

@@ -28,11 +28,7 @@ try {
->get('salon_view'); ->get('salon_view');
// step 3: get horarios // step 3: get horarios
$fecha = "'2023-10-13':DATE";
$data = array_map( $data = array_map(
fn($ruta) => array_merge( fn($ruta) => array_merge(
[ [
'horarios' => $db 'horarios' => $db
@@ -41,9 +37,9 @@ try {
->join('salon_view', 'salon_view.salon_id = horario_view.salon_id') ->join('salon_view', 'salon_view.salon_id = horario_view.salon_id')
->join('horario_profesor', 'horario_profesor.horario_id = horario_view.horario_id') ->join('horario_profesor', 'horario_profesor.horario_id = horario_view.horario_id')
->join('profesor', 'profesor.profesor_id = horario_profesor.profesor_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')
->where("$fecha BETWEEN periodo.periodo_fecha_inicio AND periodo.periodo_fecha_fin") ->where('CURRENT_DATE BETWEEN periodo.periodo_fecha_inicio AND periodo.periodo_fecha_fin')
->where("horario_dia = EXTRACT(DOW FROM $fecha)") ->where('horario_dia = EXTRACT(DOW FROM CURRENT_DATE)')
->where('bloque_horario.id', $_GET['bloque_horario_id']) ->where('bloque_horario.id', $_GET['bloque_horario_id'])
->where('id_espacio_padre', $ruta['id_espacio_sgu']) ->where('id_espacio_padre', $ruta['id_espacio_sgu'])
->get('horario_view', null, '*, horario_view.horario_id, profesor.profesor_id'), ->get('horario_view', null, '*, horario_view.horario_id, profesor.profesor_id'),
@@ -65,7 +61,7 @@ try {
http_response_code(500); http_response_code(500);
echo json_encode([ echo json_encode([
'error' => $th->getMessage(), 'error' => $th->getMessage(),
// 'query' => $db->getLastQuery(), 'query' => $db->getLastQuery(),
], JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT); ], JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT);
exit; exit;
} catch (Exception $th) { } catch (Exception $th) {