26 lines
593 B
JavaScript
26 lines
593 B
JavaScript
|
import ngModule from '../../module';
|
||
|
|
||
|
export default class Controller {
|
||
|
constructor($scope, $state) {
|
||
|
this.$ = $scope;
|
||
|
this.$state = $state;
|
||
|
this.ticket = {
|
||
|
ticketFk: $state.params.id,
|
||
|
text: null
|
||
|
};
|
||
|
}
|
||
|
onSubmit() {
|
||
|
this.$.watcher.submit().then(
|
||
|
() => {
|
||
|
this.$state.go('ticket.card.tracking.index');
|
||
|
}
|
||
|
);
|
||
|
}
|
||
|
}
|
||
|
Controller.$inject = ['$scope', '$state'];
|
||
|
|
||
|
ngModule.component('vnTicketTrackingEdit', {
|
||
|
template: require('./edit.html'),
|
||
|
controller: Controller
|
||
|
});
|