This commit is contained in:
Lemuel Marquez
2021-01-13 12:00:11 -06:00
parent ff6699ff20
commit 5de85194fe
8 changed files with 53 additions and 75 deletions
@@ -18,6 +18,7 @@ const serviciosResponsable = async (body) => {
? validar.validarNumeroCuenta(body.numeroCuenta)
: '';
let where = { [Op.and]: [{ idStatus: { [Op.ne]: 10 } }] };
let data = [];
if (idStatus) where[Op.and].push({ idStatus });
return Usuario.findOne({ where: { idUsuario } })
@@ -40,11 +41,10 @@ const serviciosResponsable = async (body) => {
{ model: Carrera },
{ model: Status },
],
order: [['updatedAt', 'DESC']],
});
})
.then((res) => {
let data = [];
for (let i = pagina * 25 - 25; i < res.length && i < pagina * 25; i++)
data.push({
idServicio: res[i].idServicio,