2018-03-27 12:26:20 +00:00
|
|
|
import ngModule from '../../module';
|
|
|
|
|
2018-04-05 09:09:22 +00:00
|
|
|
class Controller {
|
|
|
|
constructor($scope, $state, vnApp, $translate) {
|
2018-03-27 12:26:20 +00:00
|
|
|
this.$ = $scope;
|
|
|
|
this.$state = $state;
|
2018-04-05 09:09:22 +00:00
|
|
|
this.vnApp = vnApp;
|
|
|
|
this.$translate = $translate;
|
2018-03-27 12:26:20 +00:00
|
|
|
this.ticket = {
|
2018-05-31 09:52:39 +00:00
|
|
|
ticketFk: $state.params.id
|
2018-03-27 12:26:20 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
onSubmit() {
|
|
|
|
this.$.watcher.submit().then(
|
|
|
|
() => {
|
2018-05-08 07:30:55 +00:00
|
|
|
this.card.reload();
|
2018-03-27 12:26:20 +00:00
|
|
|
this.$state.go('ticket.card.tracking.index');
|
|
|
|
}
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
2018-04-05 09:09:22 +00:00
|
|
|
Controller.$inject = ['$scope', '$state', 'vnApp', '$translate'];
|
2018-03-27 12:26:20 +00:00
|
|
|
|
|
|
|
ngModule.component('vnTicketTrackingEdit', {
|
2018-05-25 08:03:45 +00:00
|
|
|
template: require('./index.html'),
|
2018-05-08 07:30:55 +00:00
|
|
|
controller: Controller,
|
|
|
|
require: {
|
|
|
|
card: '^vnTicketCard'
|
|
|
|
}
|
2018-03-27 12:26:20 +00:00
|
|
|
});
|