salix/modules/supplier/front/create/index.js

24 lines
534 B
JavaScript

import ngModule from '../module';
import Section from 'salix/components/section';
class Controller extends Section {
constructor($element, $) {
super($element, $);
}
onSubmit() {
this.$.watcher.submit().then(
json => {
this.$state.go(`supplier.card.fiscalData`, {id: json.data.id});
}
);
}
}
Controller.$inject = ['$element', '$scope'];
ngModule.vnComponent('vnSupplierCreate', {
template: require('./index.html'),
controller: Controller
});