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

38 lines
792 B
JavaScript
Raw Normal View History

2018-11-13 06:44:03 +00:00
import ngModule from '../module';
2018-12-27 11:54:16 +00:00
import SearchPanel from 'core/components/searchbar/search-panel';
import './style.scss';
2018-11-13 06:44:03 +00:00
2021-01-29 10:45:35 +00:00
class Controller extends SearchPanel {
constructor($, $element) {
super($, $element);
}
changeShipped() {
2021-01-29 10:45:35 +00:00
this.filter.scopeDays = null;
this.addFilters();
2021-01-29 10:45:35 +00:00
}
changeScopeDays() {
this.filter.shippedFrom = null;
this.filter.shippedTo = null;
this.addFilters();
2021-01-29 10:45:35 +00:00
}
addFilters() {
this.model.addFilter({}, this.filter);
2021-01-29 10:45:35 +00:00
}
removeParamFilter(param) {
this.filter[param] = null;
this.addFilters();
2021-01-29 10:45:35 +00:00
}
}
ngModule.vnComponent('vnTravelSearchPanel', {
2018-11-13 06:44:03 +00:00
template: require('./index.html'),
controller: Controller,
bindings: {
model: '<'
}
2018-11-13 06:44:03 +00:00
});