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';
|
2023-03-02 10:33:55 +00:00
|
|
|
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);
|
|
|
|
}
|
|
|
|
|
2023-03-02 10:33:55 +00:00
|
|
|
changeShipped() {
|
2021-01-29 10:45:35 +00:00
|
|
|
this.filter.scopeDays = null;
|
2023-03-02 10:33:55 +00:00
|
|
|
this.addFilters();
|
2021-01-29 10:45:35 +00:00
|
|
|
}
|
|
|
|
|
2023-03-02 10:33:55 +00:00
|
|
|
changeScopeDays() {
|
|
|
|
this.filter.shippedFrom = null;
|
|
|
|
this.filter.shippedTo = null;
|
|
|
|
this.addFilters();
|
2021-01-29 10:45:35 +00:00
|
|
|
}
|
|
|
|
|
2023-03-02 10:33:55 +00:00
|
|
|
addFilters() {
|
|
|
|
this.model.addFilter({}, this.filter);
|
2021-01-29 10:45:35 +00:00
|
|
|
}
|
|
|
|
|
2023-03-02 10:33:55 +00:00
|
|
|
removeParamFilter(param) {
|
|
|
|
this.filter[param] = null;
|
|
|
|
this.addFilters();
|
2021-01-29 10:45:35 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-07-24 12:22:30 +00:00
|
|
|
ngModule.vnComponent('vnTravelSearchPanel', {
|
2018-11-13 06:44:03 +00:00
|
|
|
template: require('./index.html'),
|
2023-03-02 10:33:55 +00:00
|
|
|
controller: Controller,
|
|
|
|
bindings: {
|
|
|
|
model: '<'
|
|
|
|
}
|
2018-11-13 06:44:03 +00:00
|
|
|
});
|