fix(claim_search-panel): filter
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Alex Moreno 2022-04-07 12:09:11 +02:00
parent 287aa0c3c6
commit c312eff12e
1 changed files with 7 additions and 1 deletions

View File

@ -97,11 +97,16 @@ module.exports = Self => {
{'cl.socialName': {like: `%${value}%`}} {'cl.socialName': {like: `%${value}%`}}
] ]
}; };
case 'client':
return {'cl.socialName': {like: `%${value}%`}};
case 'clientFk':
return {'cl.clientFk': value};
case 'id': case 'id':
case 'claimStateFk': case 'claimStateFk':
case 'priority': case 'priority':
return {[`cl.${param}`]: value}; return {[`cl.${param}`]: value};
case 'salesPersonFk': case 'salesPersonFk':
return {'cl.salesPersonFk': value};
case 'attenderFk': case 'attenderFk':
return {'cl.workerFk': value}; return {'cl.workerFk': value};
case 'created': case 'created':
@ -129,7 +134,8 @@ module.exports = Self => {
cs.description, cs.description,
cl.created, cl.created,
cs.priority, cs.priority,
cl.claimStateFk cl.claimStateFk,
c.salesPersonFk
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 worker w ON w.id = cl.workerFk LEFT JOIN worker w ON w.id = cl.workerFk