32 lines
887 B
JavaScript
32 lines
887 B
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;
|
|
this.getItemPackingTypes();
|
|
}
|
|
|
|
getItemPackingTypes() {
|
|
let itemPackingTypes = [];
|
|
const filter = {
|
|
where: {isActive: true}
|
|
};
|
|
this.$http.get('ItemPackingTypes', {filter}).then(res => {
|
|
for (let ipt of res.data) {
|
|
itemPackingTypes.push({
|
|
description: this.$t(ipt.description),
|
|
code: ipt.code
|
|
});
|
|
}
|
|
this.itemPackingTypes = itemPackingTypes;
|
|
});
|
|
}
|
|
}
|
|
|
|
ngModule.vnComponent('vnAdvanceTicketSearchPanel', {
|
|
template: require('./index.html'),
|
|
controller: Controller
|
|
});
|