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