Merge branch 'dev' into 4875-skip-tests
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
commit
43bd583d6f
|
@ -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,
|
||||||
|
@ -135,7 +140,7 @@ module.exports = Self => {
|
||||||
LEFT JOIN account.user u ON u.id = c.salesPersonFk
|
LEFT JOIN account.user u ON u.id = c.salesPersonFk
|
||||||
LEFT JOIN province p ON p.id = c.provinceFk
|
LEFT JOIN province p ON p.id = c.provinceFk
|
||||||
JOIN vn.address a ON a.clientFk = c.id
|
JOIN vn.address a ON a.clientFk = c.id
|
||||||
`
|
`
|
||||||
);
|
);
|
||||||
|
|
||||||
stmt.merge(conn.makeWhere(filter.where));
|
stmt.merge(conn.makeWhere(filter.where));
|
||||||
|
|
Loading…
Reference in New Issue