Mejora de NULL y de salones array

This commit is contained in:
Your Name
2025-01-21 11:45:04 -06:00
parent 5792338d29
commit 4b4a4a55ca

View File

@@ -190,11 +190,11 @@ function getFormattedValue($key, $registro)
return match ($key) { return match ($key) {
'asistencia' => is_null($registro['registro_fecha']) ? "Sin registro" : ($registro['registro_retardo'] ? "Retardo " : "Asistencia "), 'asistencia' => is_null($registro['registro_fecha']) ? "Sin registro" : ($registro['registro_retardo'] ? "Retardo " : "Asistencia "),
'registro_fecha', 'registro_fecha',
'registro_fecha_supervisor' => is_null($registro[$key]) ? 'Sin registro' : date('H:i', strtotime($registro[$key])), 'registro_fecha_supervisor' => $registro[$key] === null ? 'Sin registro' : date('H:i', strtotime($registro[$key])),
'nombre' => $registro[$key] ?? "Sin registro", 'nombre' => $registro[$key] ?? "Sin registro",
'horario_hora_completa' => "{$registro['horario_hora']} - {$registro['horario_fin']}", 'horario_hora_completa' => "{$registro['horario_hora']} - {$registro['horario_fin']}",
'usuario_nombre' => $registro[$key] ?? "Sin registro", 'usuario_nombre' => $registro[$key] ?? "Sin registro",
'salon_array' => json_encode($registro[$key], JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE), 'salon_array' => $registro[$key],
'justificacion', 'justificacion',
'comentario' => $registro[$key] ?? "Sin registro", 'comentario' => $registro[$key] ?? "Sin registro",
default => $registro[$key] default => $registro[$key]