28 lines
779 B
JavaScript
28 lines
779 B
JavaScript
import ngModule from '../module';
|
|
import SearchPanel from 'core/components/searchbar/search-panel';
|
|
class Controller extends SearchPanel {
|
|
constructor($, $element) {
|
|
super($, $element);
|
|
this.getGroupedStates();
|
|
}
|
|
|
|
getGroupedStates() {
|
|
let groupedStates = [];
|
|
this.$http.get('AlertLevels').then(res => {
|
|
for (let state of res.data) {
|
|
groupedStates.push({
|
|
alertLevel: state.alertLevel,
|
|
code: state.code,
|
|
name: this.$t(state.code)
|
|
});
|
|
}
|
|
this.groupedStates = groupedStates;
|
|
});
|
|
}
|
|
}
|
|
|
|
ngModule.vnComponent('vnTicketSearchPanel', {
|
|
template: require('./index.html'),
|
|
controller: Controller
|
|
});
|