Merge pull request 'fecha asistencia' (#28) from develop into master
Reviewed-on: #28
This commit was merged in pull request #28.
This commit is contained in:
@@ -420,12 +420,14 @@ recibas tu constancia.</p>
|
|||||||
cr.id_cuestionario_respondido,
|
cr.id_cuestionario_respondido,
|
||||||
cr.fecha_respuesta,
|
cr.fecha_respuesta,
|
||||||
p.id_participante,
|
p.id_participante,
|
||||||
p.correo AS correo_participante
|
p.correo AS correo_participante,
|
||||||
|
pe.fecha_asistencia
|
||||||
FROM cuestionario_respondido cr
|
FROM cuestionario_respondido cr
|
||||||
JOIN participante p ON cr.id_participante = p.id_participante
|
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 = ?
|
WHERE cr.id_cuestionario = ?
|
||||||
ORDER BY cr.fecha_respuesta DESC
|
ORDER BY cr.fecha_respuesta DESC
|
||||||
`, [idCuestionario]);
|
`, [cuestionario.evento ? cuestionario.evento.id_evento : null, idCuestionario]);
|
||||||
|
|
||||||
// Obtener todas las respuestas para este cuestionario
|
// Obtener todas las respuestas para este cuestionario
|
||||||
const respuestasAbiertas = await this.dataSource.query(`
|
const respuestasAbiertas = await this.dataSource.query(`
|
||||||
@@ -481,7 +483,8 @@ recibas tu constancia.</p>
|
|||||||
const encabezados = [
|
const encabezados = [
|
||||||
'ID Participante',
|
'ID Participante',
|
||||||
'Correo',
|
'Correo',
|
||||||
'Fecha Respuesta'
|
'Fecha Respuesta',
|
||||||
|
'Asistencia'
|
||||||
];
|
];
|
||||||
|
|
||||||
// Agregar cada pregunta como un encabezado
|
// Agregar cada pregunta como un encabezado
|
||||||
@@ -496,7 +499,8 @@ recibas tu constancia.</p>
|
|||||||
const fila = [
|
const fila = [
|
||||||
participante.id_participante.toString(),
|
participante.id_participante.toString(),
|
||||||
participante.correo_participante,
|
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
|
// Agregar cada respuesta en el orden de las preguntas
|
||||||
|
|||||||
Reference in New Issue
Block a user