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

35 lines
774 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, $);
this.filter = {
fields: [
'name'
],
include: [{
relation: 'supplierAgencyTerm',
where: {
supplierFk: 1
}
}],
};
}
onSubmit() {
this.$.watcher.submit().then(res => {
this.$state.go('supplier.card.address.index');
});
}
}
ngModule.vnComponent('vnSupplierAgencyTermCreate', {
template: require('./index.html'),
controller: Controller,
bindings: {
supplier: '<'
}
});