carrera en reporte cuestionario alumno
This commit is contained in:
@@ -4,6 +4,7 @@ const helperPath = '../../helper';
|
||||
const helper = require(`${helperPath}/helper`);
|
||||
const { validarNumero } = require(`${helperPath}/validar`);
|
||||
const dbPath = '../../db/tablas';
|
||||
const Carrera = require(`${dbPath}/Carrera`);
|
||||
const CuestionarioAlumno = require(`${dbPath}/CuestionarioAlumno`);
|
||||
const Programa = require(`${dbPath}/Programa`);
|
||||
const Servicio = require(`${dbPath}/Servicio`);
|
||||
@@ -21,7 +22,7 @@ const get = async (body) => {
|
||||
where: { idCuestionarioAlumno: { [Op.not]: null } },
|
||||
},
|
||||
{ model: Programa, where: { clavePrograma: { [Op.like]: `${year}%` } } },
|
||||
{ model: Usuario },
|
||||
{ model: Usuario, include: [{ model: Carrera }] },
|
||||
],
|
||||
order: [['createdAt']],
|
||||
})
|
||||
@@ -32,6 +33,7 @@ const get = async (body) => {
|
||||
clavePrograma: res[i].Programa.clavePrograma,
|
||||
usuario: res[i].Usuario.usuario,
|
||||
nombre: res[i].Usuario.nombre,
|
||||
carrera: res[i].Usuario.Carrera.carrera,
|
||||
idCuestionarioAlumno: res[i].CuestionarioAlumno.idCuestionarioAlumno,
|
||||
sexo: res[i].CuestionarioAlumno.sexo,
|
||||
edad: res[i].CuestionarioAlumno.edad,
|
||||
|
||||
Reference in New Issue
Block a user