23 lines
681 B
JavaScript
23 lines
681 B
JavaScript
|
import ngModule from '../module';
|
||
|
import FilterTicketList from '../filter-ticket-list';
|
||
|
|
||
|
class Controller extends FilterTicketList {
|
||
|
constructor($scope, $timeout, $stateParams, $http) {
|
||
|
super($scope, $timeout, $stateParams);
|
||
|
this.params = $stateParams;
|
||
|
this.$http = $http;
|
||
|
}
|
||
|
deleteExpedition(expedition) {
|
||
|
this.$http.delete(`/ticket/api/Expeditions/${expedition.id}`, this.params).then(
|
||
|
() => this.$.index.accept()
|
||
|
);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
Controller.$inject = ['$scope', '$timeout', '$state', '$http'];
|
||
|
|
||
|
ngModule.component('vnTicketExpedition', {
|
||
|
template: require('./ticket-expedition.html'),
|
||
|
controller: Controller
|
||
|
});
|