diff --git a/modules/route/front/main/index.html b/modules/route/front/main/index.html index 7be7153af..7d4cd33ee 100644 --- a/modules/route/front/main/index.html +++ b/modules/route/front/main/index.html @@ -10,7 +10,7 @@ panel="vn-route-search-panel" info="Search routes by id" fetch-params="$ctrl.fetchParams($params)" - suggested-filter="$ctrl.filterParams" + filter="$ctrl.filterParams" model="model"> diff --git a/modules/route/front/main/index.js b/modules/route/front/main/index.js index cbebc4369..938f81bcc 100644 --- a/modules/route/front/main/index.js +++ b/modules/route/front/main/index.js @@ -2,12 +2,17 @@ import ngModule from '../module'; import ModuleMain from 'salix/components/module-main'; export default class Route extends ModuleMain { - constructor() { - super(); + $postLink() { + const to = new Date(); + to.setDate(to.getDate() + 1); + to.setHours(0, 0, 0, 0); - this.filterParams = { - scopeDays: 1 - }; + const from = new Date(); + from.setDate(from.getDate()); + from.setHours(0, 0, 0, 0); + + this.filterParams = {from, to}; + this.$.model.applyFilter(null, this.filterParams); } fetchParams($params) {