feat: refs #7524 myteam filter
gitea/salix/pipeline/pr-master This commit looks good Details

This commit is contained in:
Jorge Penadés 2024-10-21 10:58:36 +02:00
parent 288dc1c598
commit cb4e8355ba
1 changed files with 3 additions and 3 deletions

View File

@ -82,7 +82,7 @@ module.exports = Self => {
const teamMembersId = []; const teamMembersId = [];
if (args.myTeam != null) { if (args.myTeam != null) {
const worker = await models.Worker.findById(userId, { const worker = await Self.app.models.Worker.findById(userId, {
include: { include: {
relation: 'collegues' relation: 'collegues'
} }
@ -119,9 +119,9 @@ module.exports = Self => {
return {'f.isFullMovable': value}; return {'f.isFullMovable': value};
case 'myTeam': case 'myTeam':
if (value) if (value)
return {'c.salesPersonFk': {inq: teamMembersId}}; return {'workerFk': {inq: teamMembersId}};
else else
return {'c.salesPersonFk': {nin: teamMembersId}}; return {'workerFk': {nin: teamMembersId}};
} }
}); });