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

24 lines
567 B
JavaScript
Raw Permalink Normal View History

2018-11-21 07:58:34 +00:00
import ngModule from '../../module';
2020-03-18 07:35:59 +00:00
import Section from 'salix/components/section';
2018-11-21 07:58:34 +00:00
import './style.scss';
2020-03-18 07:35:59 +00:00
class Controller extends Section {
constructor($element, $) {
super($element, $);
2018-11-21 07:58:34 +00:00
this.ticketRequest = {
2020-03-18 07:35:59 +00:00
ticketFk: this.$params.id
2018-11-21 07:58:34 +00:00
};
}
onSubmit() {
2020-03-18 07:35:59 +00:00
this.$.watcher.submit().then(() =>
this.$state.go('ticket.card.request.index', {id: this.$params.id})
2018-11-21 07:58:34 +00:00
);
}
}
ngModule.vnComponent('vnTicketRequestCreate', {
2018-11-21 07:58:34 +00:00
template: require('./index.html'),
controller: Controller
});