db tamaños de strings mejorados
This commit is contained in:
@@ -17,7 +17,7 @@ const serviciosResponsable = async (body) => {
|
||||
let numeroCuenta = body.numeroCuenta
|
||||
? validar.validarNumeroCuenta(body.numeroCuenta)
|
||||
: '';
|
||||
let where = { nombre: { [Op.like]: `%${nombre}%` } };
|
||||
let where = {};
|
||||
|
||||
if (idStatus) where.idStatus = idStatus;
|
||||
return Usuario.findOne({ where: { idUsuario } })
|
||||
@@ -32,7 +32,10 @@ const serviciosResponsable = async (body) => {
|
||||
{
|
||||
model: Usuario,
|
||||
include: { model: TipoUsuario },
|
||||
where: { usuario: { [Op.like]: `%${numeroCuenta}%` } },
|
||||
where: {
|
||||
usuario: { [Op.like]: `%${numeroCuenta}%` },
|
||||
nombre: { [Op.like]: `%${nombre}%` },
|
||||
},
|
||||
},
|
||||
{ model: Carrera },
|
||||
{ model: Status },
|
||||
@@ -45,7 +48,6 @@ const serviciosResponsable = async (body) => {
|
||||
for (let i = pagina * 25 - 25; i < res.length && i < pagina * 25; i++)
|
||||
data.push({
|
||||
idServicio: res[i].idServicio,
|
||||
nombre: res[i].nombre,
|
||||
fechaInicio: res[i].fechaInicio,
|
||||
fechaFin: res[i].fechaFin,
|
||||
idCuestionarioAlumno: res[i].idCuestionarioAlumno,
|
||||
@@ -53,6 +55,7 @@ const serviciosResponsable = async (body) => {
|
||||
Usuario: {
|
||||
idUsuario: res[i].Usuario.idUsuario,
|
||||
usuario: res[i].Usuario.usuario,
|
||||
nombre: res[i].Usuario.nombre,
|
||||
TipoUsuario: {
|
||||
idTipoUsuario: res[i].Usuario.TipoUsuario.idTipoUsuario,
|
||||
tipoUsuario: res[i].Usuario.TipoUsuario.tipoUsuario,
|
||||
|
||||
Reference in New Issue
Block a user