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-05-25 08:03:45 +00:00
|
|
|
|
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', {
|
2018-05-25 08:03:45 +00:00
|
|
|
template: require('./index.html'),
|
2018-03-21 14:51:09 +00:00
|
|
|
controller: Controller
|
|
|
|
});
|