From a6e5123949d79e5ab57ba754aeb0872ebbd01d7c Mon Sep 17 00:00:00 2001 From: vicent Date: Wed, 22 Dec 2021 13:16:45 +0100 Subject: [PATCH] feat: add filter by item.longName --- modules/item/back/methods/item/filter.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/item/back/methods/item/filter.js b/modules/item/back/methods/item/filter.js index a7ca38173..98e78c7aa 100644 --- a/modules/item/back/methods/item/filter.js +++ b/modules/item/back/methods/item/filter.js @@ -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':