salix/modules/ticket/front/request/create/index.js

26 lines
585 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(
2018-11-21 11:41:08 +00:00
json => this.$state.go('ticket.card.request.index', {id: this.$state.params.id})
2018-11-21 07:58:34 +00:00
);
}
}
Controller.$inject = ['$state', '$scope'];
ngModule.component('vnTicketRequestCreate', {
template: require('./index.html'),
controller: Controller
});