38 lines
792 B
JavaScript
38 lines
792 B
JavaScript
import ngModule from '../module';
|
|
import SearchPanel from 'core/components/searchbar/search-panel';
|
|
import './style.scss';
|
|
|
|
class Controller extends SearchPanel {
|
|
constructor($, $element) {
|
|
super($, $element);
|
|
}
|
|
|
|
changeShipped() {
|
|
this.filter.scopeDays = null;
|
|
this.addFilters();
|
|
}
|
|
|
|
changeScopeDays() {
|
|
this.filter.shippedFrom = null;
|
|
this.filter.shippedTo = null;
|
|
this.addFilters();
|
|
}
|
|
|
|
addFilters() {
|
|
this.model.addFilter({}, this.filter);
|
|
}
|
|
|
|
removeParamFilter(param) {
|
|
this.filter[param] = null;
|
|
this.addFilters();
|
|
}
|
|
}
|
|
|
|
ngModule.vnComponent('vnTravelSearchPanel', {
|
|
template: require('./index.html'),
|
|
controller: Controller,
|
|
bindings: {
|
|
model: '<'
|
|
}
|
|
});
|