Merge pull request 'feat: add filter by item.longName' (#830) from 3439-item_search-panel into dev
gitea/salix/pipeline/head This commit looks good Details

Reviewed-on: #830
Reviewed-by: Carlos Jimenez Ruiz <carlosjr@verdnatura.es>
This commit is contained in:
Carlos Jimenez Ruiz 2021-12-24 10:12:32 +00:00
commit 67dc173f83
1 changed files with 4 additions and 1 deletions

View File

@ -112,7 +112,10 @@ module.exports = Self => {
case 'search':
return /^\d+$/.test(value)
? {or: [{'i.id': value}, codeWhere]}
: {or: [{'i.name': {like: `%${value}%`}}, codeWhere]};
: {or: [
{'i.name': {like: `%${value}%`}},
{'i.longName': {like: `%${value}%`}},
codeWhere]};
case 'id':
case 'isActive':
case 'typeFk':