26 lines
576 B
JavaScript
26 lines
576 B
JavaScript
|
import ngModule from '../../module';
|
||
|
import './style.scss';
|
||
|
|
||
|
class Controller {
|
||
|
constructor($state, $scope) {
|
||
|
this.$ = $scope;
|
||
|
this.$state = $state;
|
||
|
this.ticketRequest = {
|
||
|
ticketFk: $state.params.id
|
||
|
};
|
||
|
}
|
||
|
|
||
|
onSubmit() {
|
||
|
this.$.watcher.submit().then(
|
||
|
json => this.$state.go('ticket.card.request.index', {id: json.data.id})
|
||
|
);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
Controller.$inject = ['$state', '$scope'];
|
||
|
|
||
|
ngModule.component('vnTicketRequestCreate', {
|
||
|
template: require('./index.html'),
|
||
|
controller: Controller
|
||
|
});
|