salix/modules/claim/front/development/index.js

25 lines
612 B
JavaScript
Raw Permalink Normal View History

2018-09-05 09:48:38 +00:00
import ngModule from '../module';
2020-03-16 10:58:14 +00:00
import Section from 'salix/components/section';
2018-09-05 09:48:38 +00:00
import './style.scss';
2020-03-16 10:58:14 +00:00
class Controller extends Section {
2018-09-05 09:48:38 +00:00
onSubmit() {
2020-03-16 10:58:14 +00:00
this.$.watcher.check();
this.$.model.save().then(() => {
this.$.watcher.notifySaved();
this.$.watcher.updateOriginalData();
if (this.aclService.hasAny(['claimManager']))
this.$state.go('claim.card.action');
2018-09-05 09:48:38 +00:00
});
}
}
ngModule.vnComponent('vnClaimDevelopment', {
2018-09-05 09:48:38 +00:00
template: require('./index.html'),
controller: Controller,
bindings: {
claim: '<'
}
});