salix/client/ticket/src/expedition/ticket-expedition.js

23 lines
681 B
JavaScript
Raw Normal View History

2018-03-21 14:51:09 +00:00
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
});