Fixed problems with default search
This commit is contained in:
parent
3f963f2d99
commit
7b7571ae77
|
@ -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">
|
||||
</vn-searchbar>
|
||||
</vn-portal>
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue