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 = {
|
|
|
|
ticketFk: $state.params.id,
|
|
|
|
text: null
|
|
|
|
};
|
|
|
|
}
|
|
|
|
onSubmit() {
|
|
|
|
this.$.watcher.submit().then(
|
|
|
|
() => {
|
|
|
|
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', {
|
|
|
|
template: require('./edit.html'),
|
|
|
|
controller: Controller
|
|
|
|
});
|