This commit is contained in:
parent
288dc1c598
commit
cb4e8355ba
|
@ -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}};
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue