salix/modules/supplier/front/agency-term/create/index.js

27 lines
604 B
JavaScript
Raw Normal View History

2022-03-15 08:36:48 +00:00
import ngModule from '../../module';
import Section from 'salix/components/section';
export default class Controller extends Section {
constructor($element, $) {
super($element, $);
2022-03-15 13:50:09 +00:00
this.supplierAgencyTerm = {
supplierFk: this.$params.id
};
}
2022-03-15 08:36:48 +00:00
onSubmit() {
this.$.watcher.submit().then(res => {
2022-03-15 13:50:09 +00:00
this.$state.go('supplier.card.agencyTerm.index');
2022-03-15 08:36:48 +00:00
});
}
}
ngModule.vnComponent('vnSupplierAgencyTermCreate', {
template: require('./index.html'),
controller: Controller,
bindings: {
supplier: '<'
}
});