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