This commit is contained in:
Joan Sanchez 2022-04-07 12:24:41 +02:00
commit fa1fb37795
2 changed files with 9 additions and 3 deletions

View File

@ -31,9 +31,9 @@ module.exports = Self => {
const recipient = to.replace('@', '');
if (sender.name != recipient) {
const request = await sendMessage(sender, to, message);
await sendMessage(sender, to, message);
return request ? request : false;
return true;
}
return false;

View File

@ -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