This commit is contained in:
parent
8e61160aeb
commit
9c32dc5707
|
@ -80,6 +80,12 @@ module.exports = Self => {
|
|||
description: 'The claimResponsible id',
|
||||
http: {source: 'query'}
|
||||
},
|
||||
{
|
||||
arg: 'zoneFk',
|
||||
type: 'string',
|
||||
description: 'The zone name',
|
||||
http: {source: 'query'}
|
||||
},
|
||||
{
|
||||
arg: 'myTeam',
|
||||
type: 'boolean',
|
||||
|
@ -174,6 +180,8 @@ module.exports = Self => {
|
|||
to.setHours(23, 59, 59, 999);
|
||||
|
||||
return {'cl.created': {between: [value, to]}};
|
||||
case 'zoneFk':
|
||||
return {'t.zoneFk': value};
|
||||
case 'myTeam':
|
||||
if (value)
|
||||
return {'cl.workerFk': {inq: teamMembersId}};
|
||||
|
@ -195,11 +203,15 @@ module.exports = Self => {
|
|||
u.name AS workerName,
|
||||
cs.code stateCode,
|
||||
cs.description stateDescription,
|
||||
cl.created
|
||||
cl.created,
|
||||
z.name zoneName,
|
||||
z.id zoneId
|
||||
FROM claim cl
|
||||
LEFT JOIN client c ON c.id = cl.clientFk
|
||||
LEFT JOIN account.user u ON u.id = cl.workerFk
|
||||
LEFT JOIN claimState cs ON cs.id = cl.claimStateFk`
|
||||
LEFT JOIN claimState cs ON cs.id = cl.claimStateFk
|
||||
LEFT JOIN ticket t ON t.id = cl.ticketFk
|
||||
LEFT JOIN zone z ON z.id = t.zoneFk`
|
||||
);
|
||||
|
||||
stmt.merge(conn.makeSuffix(filter));
|
||||
|
|
Loading…
Reference in New Issue