#1350 route.index
This commit is contained in:
parent
46756dfdcb
commit
28a69c8d2b
|
@ -48,6 +48,11 @@ module.exports = Self => {
|
||||||
type: 'Number',
|
type: 'Number',
|
||||||
description: 'The m3 filter',
|
description: 'The m3 filter',
|
||||||
http: {source: 'query'}
|
http: {source: 'query'}
|
||||||
|
}, {
|
||||||
|
arg: 'warehouseFk',
|
||||||
|
type: 'Number',
|
||||||
|
description: 'The warehouse filter',
|
||||||
|
http: {source: 'query'}
|
||||||
}, {
|
}, {
|
||||||
arg: 'description',
|
arg: 'description',
|
||||||
type: 'String',
|
type: 'String',
|
||||||
|
@ -81,6 +86,7 @@ module.exports = Self => {
|
||||||
case 'description':
|
case 'description':
|
||||||
return {'r.description': {like: `%${value}%`}};
|
return {'r.description': {like: `%${value}%`}};
|
||||||
case 'workerFk':
|
case 'workerFk':
|
||||||
|
case 'warehouseFk':
|
||||||
case 'vehicleFk':
|
case 'vehicleFk':
|
||||||
case 'agencyModeFk':
|
case 'agencyModeFk':
|
||||||
return {[param]: value};
|
return {[param]: value};
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
<div class="vn-list">
|
<div class="vn-list">
|
||||||
<vn-card pad-medium-h>
|
<vn-card pad-medium-h>
|
||||||
<vn-searchbar
|
<vn-searchbar
|
||||||
|
filter="$ctrl.filter"
|
||||||
panel="vn-route-search-panel"
|
panel="vn-route-search-panel"
|
||||||
on-search="$ctrl.onSearch($params)"
|
on-search="$ctrl.onSearch($params)"
|
||||||
info="Search routes by id"
|
info="Search routes by id"
|
||||||
|
|
|
@ -4,6 +4,19 @@ export default class Controller {
|
||||||
constructor($scope, vnToken) {
|
constructor($scope, vnToken) {
|
||||||
this.accessToken = vnToken.token;
|
this.accessToken = vnToken.token;
|
||||||
this.$ = $scope;
|
this.$ = $scope;
|
||||||
|
|
||||||
|
this.setDefaultFilter();
|
||||||
|
}
|
||||||
|
|
||||||
|
setDefaultFilter() {
|
||||||
|
let to = new Date();
|
||||||
|
to.setDate(to.getDate() + 1);
|
||||||
|
to.setHours(0, 0, 0, 0);
|
||||||
|
|
||||||
|
let from = new Date();
|
||||||
|
from.setHours(0, 0, 0, 0);
|
||||||
|
|
||||||
|
this.filter = {from, to, warehouseFk: localStorage.defaultWarehouseFk};
|
||||||
}
|
}
|
||||||
|
|
||||||
showWorkerDescriptor(event, workerFk) {
|
showWorkerDescriptor(event, workerFk) {
|
||||||
|
|
|
@ -55,6 +55,14 @@
|
||||||
</vn-textfield>
|
</vn-textfield>
|
||||||
</vn-horizontal>
|
</vn-horizontal>
|
||||||
<vn-horizontal>
|
<vn-horizontal>
|
||||||
|
<vn-autocomplete
|
||||||
|
vn-one
|
||||||
|
label="Warehouse"
|
||||||
|
field="filter.warehouseFk"
|
||||||
|
url="/route/api/Warehouses"
|
||||||
|
show-field="name"
|
||||||
|
value-field="id">
|
||||||
|
</vn-autocomplete>
|
||||||
<vn-textfield
|
<vn-textfield
|
||||||
vn-one
|
vn-one
|
||||||
label="Description"
|
label="Description"
|
||||||
|
|
Loading…
Reference in New Issue