Justificado definitivo.

This commit is contained in:
Your Name
2025-02-17 08:16:33 -06:00
parent 02ed033aab
commit e31e1228b1

View File

@@ -17,7 +17,7 @@ try {
$post_data = json_decode($raw, true);
$data = $db->querySingle(
'WITH HORARIOS AS (
"WITH HORARIOS AS (
SELECT *
FROM horario
JOIN horario_profesor USING (horario_id)
@@ -27,8 +27,8 @@ try {
VALUES (:profesor_id, :horario_id, :registro_fecha_ideal, :registro_justificada, :justificador_id, NOW(), :justificacion)
ON CONFLICT (profesor_id, horario_id, registro_fecha_ideal)
DO UPDATE SET registro_justificada = :registro_justificada, justificador_id = :justificador_id, registro_fecha_justificacion = NOW(), justificacion = :justificacion
RETURNING *',
array(
RETURNING *",
[
'periodo_id' => $user->periodo_id,
'profesor_id' => $post_data['profesor_id'],
'horario_id' => $post_data['horario_id'],
@@ -36,7 +36,7 @@ try {
'registro_justificada' => $post_data['registro_justificada'],
'justificador_id' => $user->user['id'],
'justificacion' => empty($post_data['justificacion']) ? null : $post_data['justificacion'],
)
]
);
@@ -49,9 +49,9 @@ try {
JOIN ROL on ROL.rol_id = justificador.rol_id
LEFT JOIN facultad on facultad.facultad_id = justificador.facultad_id
where justificador.usuario_id = :justificador_id",
array(
[
'justificador_id' => $user->user['id'],
)
]
);
// exit('exit');