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

24 lines
565 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.component('vnTicketRequestCreate', {
template: require('./index.html'),
controller: Controller
});