Merge branch 'dev' into 4875-skip-tests
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Alex Moreno 2022-11-30 13:49:59 +00:00
commit 43bd583d6f
1 changed files with 11 additions and 6 deletions

View File

@ -95,6 +95,14 @@ module.exports = Self => {
{'c.name': {like: `%${value}%`}}, {'c.name': {like: `%${value}%`}},
{'c.socialName': {like: `%${value}%`}}, {'c.socialName': {like: `%${value}%`}},
]}; ]};
case 'phone':
return {or: [
{'c.phone': {like: `%${value}%`}},
{'c.mobile': {like: `%${value}%`}},
]};
case 'zoneFk':
param = 'a.postalCode';
return {[param]: {inq: postalCode}};
case 'name': case 'name':
case 'salesPersonFk': case 'salesPersonFk':
case 'fi': case 'fi':
@ -103,12 +111,8 @@ module.exports = Self => {
case 'postcode': case 'postcode':
case 'provinceFk': case 'provinceFk':
case 'email': case 'email':
case 'phone':
param = `c.${param}`; param = `c.${param}`;
return {[param]: value}; return {[param]: {like: `%${value}%`}};
case 'zoneFk':
param = 'a.postalCode';
return {[param]: {inq: postalCode}};
} }
}); });
@ -122,6 +126,7 @@ module.exports = Self => {
c.fi, c.fi,
c.socialName, c.socialName,
c.phone, c.phone,
c.mobile,
c.city, c.city,
c.postcode, c.postcode,
c.email, c.email,