#7524 myteam filter #3134

Merged
jgallego merged 5 commits from 7524-hotfix-myTeamFilter into master 2024-10-22 11:59:45 +00:00
1 changed files with 3 additions and 3 deletions
Showing only changes of commit cb4e8355ba - Show all commits

View File

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