salix/modules/route/front/search-panel/index.js

44 lines
837 B
JavaScript
Raw Normal View History

2019-03-21 12:46:14 +00:00
import ngModule from '../module';
import SearchPanel from 'core/components/searchbar/search-panel';
2021-01-20 12:19:28 +00:00
class Controller extends SearchPanel {
constructor($, $element) {
super($, $element);
this.filter = this.$.filter;
}
get from() {
return this._from;
}
set from(value) {
this._from = value;
this.filter.scopeDays = null;
}
get to() {
return this._to;
}
set to(value) {
this._to = value;
this.filter.scopeDays = null;
}
get scopeDays() {
return this._scopeDays;
}
set scopeDays(value) {
this._scopeDays = value;
this.filter.from = null;
this.filter.to = null;
}
}
ngModule.vnComponent('vnRouteSearchPanel', {
2019-03-21 12:46:14 +00:00
template: require('./index.html'),
2021-01-20 12:19:28 +00:00
controller: Controller
2019-03-21 12:46:14 +00:00
});