25 lines
534 B
JavaScript
25 lines
534 B
JavaScript
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: '<'
|
|
}
|
|
});
|