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

60 lines
1.2 KiB
JavaScript

import ngModule from '../module';
import SearchPanel from 'core/components/searchbar/search-panel';
class Controller extends SearchPanel {
constructor($, $element) {
super($, $element);
this.filter = this.$.filter;
}
get shippedFrom() {
return this._shippedFrom;
}
set shippedFrom(value) {
this._shippedFrom = value;
if (!this.filter.shippedTo)
this.filter.shippedTo = value;
}
get shippedTo() {
return this._shippedTo;
}
set shippedTo(value) {
this._shippedTo = value;
if (!this.filter.shippedFrom)
this.filter.shippedFrom = value;
}
get landedFrom() {
return this._landedFrom;
}
set landedFrom(value) {
this._landedFrom = value;
if (!this.filter.landedTo)
this.filter.landedTo = value;
}
get landedTo() {
return this._landedTo;
}
set landedTo(value) {
this._landedTo = value;
if (!this.filter.landedFrom)
this.filter.landedFrom = value;
}
}
ngModule.vnComponent('vnExtraCommunitySearchPanel', {
template: require('./index.html'),
controller: Controller
});