diff --git a/modules/claim/back/methods/claim/filter.js b/modules/claim/back/methods/claim/filter.js index f4eecae6d..17e07d67c 100644 --- a/modules/claim/back/methods/claim/filter.js +++ b/modules/claim/back/methods/claim/filter.js @@ -97,11 +97,16 @@ module.exports = Self => { {'cl.socialName': {like: `%${value}%`}} ] }; + case 'client': + return {'cl.socialName': {like: `%${value}%`}}; + case 'clientFk': + return {'cl.clientFk': value}; case 'id': case 'claimStateFk': case 'priority': return {[`cl.${param}`]: value}; case 'salesPersonFk': + return {'cl.salesPersonFk': value}; case 'attenderFk': return {'cl.workerFk': value}; case 'created': @@ -129,7 +134,8 @@ module.exports = Self => { cs.description, cl.created, cs.priority, - cl.claimStateFk + cl.claimStateFk, + c.salesPersonFk FROM claim cl LEFT JOIN client c ON c.id = cl.clientFk LEFT JOIN worker w ON w.id = cl.workerFk