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

25 lines
542 B
JavaScript
Raw Normal View History

2022-03-15 08:36:48 +00:00
import ngModule from '../../module';
2022-03-09 22:54:23 +00:00
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();
});
}
}
2022-03-15 08:36:48 +00:00
ngModule.vnComponent('vnSupplierAgencyTermIndex', {
2022-03-09 22:54:23 +00:00
template: require('./index.html'),
controller: Controller,
bindings: {
supplier: '<'
}
});