refactor(item.filter): buildFilter switch refactor
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Carlos Jimenez Ruiz 2021-11-18 14:49:05 +01:00
parent 924e6d063d
commit 3eb7b4cf55
1 changed files with 4 additions and 6 deletions

View File

@ -109,13 +109,13 @@ module.exports = Self => {
? {or: [{'i.id': value}, codeWhere]}
: {or: [{'i.name': {like: `%${value}%`}}, codeWhere]};
case 'id':
return {'i.id': value};
case 'isActive':
return {'i.isActive': value};
case 'typeFk':
case 'isFloramondo':
param = `i.${param}`;
return {[param]: value};
case 'multiplier':
return {'i.stemMultiplier': value};
case 'typeFk':
return {'i.typeFk': value};
case 'categoryFk':
return {'ic.id': value};
case 'buyerFk':
@ -126,8 +126,6 @@ module.exports = Self => {
return {'intr.description': value};
case 'landed':
return {'lb.landed': value};
case 'isFloramondo':
return {'i.isFloramondo': value};
}
});