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

24 lines
567 B
JavaScript

import ngModule from '../../module';
import Section from 'salix/components/section';
import './style.scss';
class Controller extends Section {
constructor($element, $) {
super($element, $);
this.ticketRequest = {
ticketFk: this.$params.id
};
}
onSubmit() {
this.$.watcher.submit().then(() =>
this.$state.go('ticket.card.request.index', {id: this.$params.id})
);
}
}
ngModule.vnComponent('vnTicketRequestCreate', {
template: require('./index.html'),
controller: Controller
});