2020-11-20 14:05:57 +00:00
|
|
|
import ngModule from '../module';
|
|
|
|
import SearchPanel from 'core/components/searchbar/search-panel';
|
|
|
|
|
2021-01-07 13:21:17 +00:00
|
|
|
class Controller extends SearchPanel {
|
|
|
|
constructor($, $element) {
|
|
|
|
super($, $element);
|
|
|
|
|
|
|
|
this.filter = this.$.filter;
|
|
|
|
}
|
|
|
|
|
|
|
|
get shippedFrom() {
|
2021-01-22 11:56:46 +00:00
|
|
|
return this.filter.shippedFrom;
|
2021-01-07 13:21:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
set shippedFrom(value) {
|
2021-01-22 11:56:46 +00:00
|
|
|
this.filter.shippedFrom = value;
|
2021-01-07 13:21:17 +00:00
|
|
|
|
2021-01-22 11:56:46 +00:00
|
|
|
if (!this.filter.landedFrom)
|
|
|
|
this.filter.landedFrom = value;
|
2021-01-07 13:21:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
get shippedTo() {
|
2021-01-22 11:56:46 +00:00
|
|
|
return this.filter.shippedTo;
|
2021-01-07 13:21:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
set shippedTo(value) {
|
2021-01-22 11:56:46 +00:00
|
|
|
this.filter.shippedTo = value;
|
2021-01-07 13:21:17 +00:00
|
|
|
|
2021-01-22 11:56:46 +00:00
|
|
|
if (!this.filter.landedTo)
|
|
|
|
this.filter.landedTo = value;
|
2021-01-07 13:21:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
get landedFrom() {
|
2021-01-22 11:56:46 +00:00
|
|
|
return this.filter.landedFrom;
|
2021-01-07 13:21:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
set landedFrom(value) {
|
2021-01-22 11:56:46 +00:00
|
|
|
this.filter.landedFrom = value;
|
2021-01-07 13:21:17 +00:00
|
|
|
|
2021-01-22 11:56:46 +00:00
|
|
|
if (!this.filter.shippedFrom)
|
|
|
|
this.filter.shippedFrom = value;
|
2021-01-07 13:21:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
get landedTo() {
|
2021-01-22 11:56:46 +00:00
|
|
|
return this.filter.landedTo;
|
2021-01-07 13:21:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
set landedTo(value) {
|
2021-01-22 11:56:46 +00:00
|
|
|
this.filter.landedTo = value;
|
2021-01-07 13:21:17 +00:00
|
|
|
|
2021-01-22 11:56:46 +00:00
|
|
|
if (!this.filter.shippedTo)
|
|
|
|
this.filter.shippedTo = value;
|
2021-01-07 13:21:17 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-11-20 14:05:57 +00:00
|
|
|
ngModule.vnComponent('vnExtraCommunitySearchPanel', {
|
|
|
|
template: require('./index.html'),
|
2021-01-07 13:21:17 +00:00
|
|
|
controller: Controller
|
2020-11-20 14:05:57 +00:00
|
|
|
});
|