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

24 lines
674 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;
}
2018-03-21 14:51:09 +00:00
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('./index.html'),
2018-03-21 14:51:09 +00:00
controller: Controller
});