fecha asistencia #28

Merged
eithan merged 1 commits from develop into master 2025-04-25 19:56:48 +00:00
@@ -420,12 +420,14 @@ recibas tu constancia.</p>
cr.id_cuestionario_respondido,
cr.fecha_respuesta,
p.id_participante,
p.correo AS correo_participante
p.correo AS correo_participante,
pe.fecha_asistencia
FROM cuestionario_respondido cr
JOIN participante p ON cr.id_participante = p.id_participante
LEFT JOIN participante_evento pe ON p.id_participante = pe.id_participante AND pe.id_evento = ?
WHERE cr.id_cuestionario = ?
ORDER BY cr.fecha_respuesta DESC
`, [idCuestionario]);
`, [cuestionario.evento ? cuestionario.evento.id_evento : null, idCuestionario]);
// Obtener todas las respuestas para este cuestionario
const respuestasAbiertas = await this.dataSource.query(`
@@ -481,7 +483,8 @@ recibas tu constancia.</p>
const encabezados = [
'ID Participante',
'Correo',
'Fecha Respuesta'
'Fecha Respuesta',
'Asistencia'
];
// Agregar cada pregunta como un encabezado
@@ -496,7 +499,8 @@ recibas tu constancia.</p>
const fila = [
participante.id_participante.toString(),
participante.correo_participante,
new Date(participante.fecha_respuesta).toLocaleString()
new Date(participante.fecha_respuesta).toLocaleString(),
participante.fecha_asistencia ? 'Sí' : 'No'
];
// Agregar cada respuesta en el orden de las preguntas