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.filter.shippedFrom;
}
set shippedFrom(value) {
this.filter.shippedFrom = value;
if (!this.filter.landedFrom)
this.filter.landedFrom = value;
}
get shippedTo() {
return this.filter.shippedTo;
}
set shippedTo(value) {
this.filter.shippedTo = value;
if (!this.filter.landedTo)
this.filter.landedTo = value;
}
get landedFrom() {
return this.filter.landedFrom;
}
set landedFrom(value) {
this.filter.landedFrom = value;
if (!this.filter.shippedFrom)
this.filter.shippedFrom = value;
}
get landedTo() {
return this.filter.landedTo;
}
set landedTo(value) {
this.filter.landedTo = value;
if (!this.filter.shippedTo)
this.filter.shippedTo = value;
}
}
ngModule.vnComponent('vnExtraCommunitySearchPanel', {
template: require('./index.html'),
controller: Controller
});