listo
This commit is contained in:
@@ -6,6 +6,7 @@ const Servicio = require('../../db/tablas/Servicio');
|
||||
const Programa = require('../../db/tablas/Programa');
|
||||
const Usuario = require('../../db/tablas/Usuario');
|
||||
const Carrera = require('../../db/tablas/Carrera');
|
||||
const Status = require('../../db/tablas/Status');
|
||||
|
||||
const reporte = async (body) => {
|
||||
const inicio = validar.validarFecha(body.inicio);
|
||||
@@ -20,7 +21,12 @@ const reporte = async (body) => {
|
||||
{ fechaInicio: { [Op.lte]: fin } },
|
||||
],
|
||||
},
|
||||
include: [{ model: Programa }, { model: Usuario }, { model: Carrera }],
|
||||
include: [
|
||||
{ model: Programa },
|
||||
{ model: Usuario },
|
||||
{ model: Carrera },
|
||||
{ model: Status },
|
||||
],
|
||||
}).then((res) => {
|
||||
for (let i = 0; i < res.length; i++)
|
||||
data.push({
|
||||
@@ -35,6 +41,7 @@ const reporte = async (body) => {
|
||||
dependencia: res[i].Programa.dependencia,
|
||||
programa: res[i].Programa.programa,
|
||||
clave: res[i].Programa.clavePrograma,
|
||||
status: res[i].Status.status,
|
||||
});
|
||||
try {
|
||||
fs.unlinkSync(path);
|
||||
|
||||
Reference in New Issue
Block a user