update entry filter

This commit is contained in:
Bernat Exposito Domenech 2020-02-21 10:03:08 +01:00
parent d018d9d536
commit 773963e7ab
2 changed files with 24 additions and 0 deletions

View File

@ -68,6 +68,14 @@ module.exports = Self => {
type: 'Number',
description: 'The currency id to filter',
http: {source: 'query'}
}, {
arg: 'from',
type: 'Date',
description: `The from date filter`
}, {
arg: 'to',
type: 'Date',
description: `The to date filter`
}
],
returns: {
@ -91,6 +99,10 @@ module.exports = Self => {
return {[param]: {like: `%${value}%`}};
case 'created':
return {'e.created': {gte: value}};
case 'from':
return {'t.landed': {gte: value}};
case 'to':
return {'t.landed': {lte: value}};
case 'id':
case 'isBooked':
case 'isConfirmed':

View File

@ -54,6 +54,18 @@
ng-model="filter.created">
</vn-date-picker>
</vn-horizontal>
<vn-horizontal>
<vn-date-picker
vn-one
label="From"
ng-model="filter.from">
</vn-date-picker>
<vn-date-picker
vn-one
label="To"
ng-model="filter.to">
</vn-date-picker>
</vn-horizontal>
<vn-horizontal>
<vn-check
vn-one