salix/client/ticket/src/request/create/index.js

26 lines
576 B
JavaScript
Raw Normal View History

2018-11-21 07:58:34 +00:00
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
});