Merge pull request '2524 - Added search by socialName' (#424) from 2524-client_index_socialName into dev
gitea/salix/pipeline/head This commit looks good Details

Reviewed-on: #424
Reviewed-by: Carlos Jimenez <carlosjr@verdnatura.es>
This commit is contained in:
Carlos Jimenez Ruiz 2020-10-27 11:54:05 +00:00
commit 290215d93e
1 changed files with 1 additions and 1 deletions

View File

@ -7,7 +7,7 @@ export default class Client extends ModuleMain {
case 'search':
return /^\d+$/.test(value)
? {id: value}
: {name: {like: `%${value}%`}};
: {or: [{name: {like: `%${value}%`}}, {socialName: {like: `%${value}%`}}]};
case 'phone':
return {
or: [