#1343 update worker filter

This commit is contained in:
Bernat 2019-04-16 07:59:29 +02:00
parent 9c596b06c8
commit 0d680bdaed
2 changed files with 8 additions and 1 deletions

View File

@ -28,6 +28,11 @@ module.exports = Self => {
type: 'Integer', type: 'Integer',
description: 'The worker id', description: 'The worker id',
http: {source: 'query'} http: {source: 'query'}
}, {
arg: 'userFk',
type: 'Integer',
description: 'The user id',
http: {source: 'query'}
}, { }, {
arg: 'fi', arg: 'fi',
type: 'String', type: 'String',
@ -85,6 +90,8 @@ module.exports = Self => {
]}; ]};
case 'id': case 'id':
return {'w.id': value}; return {'w.id': value};
case 'userFk':
return {'w.userFk': value};
case 'name': case 'name':
return {'w.name': {like: `%${value}%`}}; return {'w.name': {like: `%${value}%`}};
case 'firstName': case 'firstName':

View File

@ -18,7 +18,7 @@
<vn-textfield <vn-textfield
vn-one vn-one
label="User id" label="User id"
model="filter.id"> model="filter.userFk">
</vn-textfield> </vn-textfield>
</vn-horizontal> </vn-horizontal>
<vn-horizontal> <vn-horizontal>