2384 - Searchbar filters fixed
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Joan Sanchez 2020-08-12 08:26:00 +02:00
parent debd2a8693
commit b0df4973e9
1 changed files with 8 additions and 4 deletions

View File

@ -17,19 +17,19 @@ module.exports = Self => {
type: 'String',
description: `If it's and integer searchs by id, otherwise it searchs by name`
}, {
arg: 'itemFk',
arg: 'itemId',
type: 'Integer',
description: 'Item id'
}, {
arg: 'categoryFk',
arg: 'categoryId',
type: 'Integer',
description: 'Category id'
}, {
arg: 'typeFk',
arg: 'typeId',
type: 'Integer',
description: 'Item type id',
}, {
arg: 'buyerFk',
arg: 'buyerId',
type: 'Integer',
description: 'Buyer id'
}, {
@ -75,6 +75,10 @@ module.exports = Self => {
return {'it.id': value};
case 'buyerId':
return {'it.workerFk': value};
case 'from':
return {'t.shipped': {gte: value}};
case 'to':
return {'t.shipped': {lte: value}};
}
});
filter = mergeFilters(filter, {where});