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

25 lines
534 B
JavaScript
Raw Normal View History

2022-03-09 22:54:23 +00:00
import ngModule from '../module';
import Section from 'salix/components/section';
class Controller extends Section {
add() {
this.$.model.insert({});
}
onSubmit() {
this.$.watcher.check();
this.$.model.save().then(() => {
this.$.watcher.notifySaved();
this.$.watcher.updateOriginalData();
});
}
}
ngModule.vnComponent('vnSupplierAgencyTerm', {
template: require('./index.html'),
controller: Controller,
bindings: {
supplier: '<'
}
});