2018-09-05 09:48:38 +00:00
|
|
|
import ngModule from '../module';
|
|
|
|
import './style.scss';
|
|
|
|
|
|
|
|
class Controller {
|
2019-04-08 07:01:10 +00:00
|
|
|
constructor($state, $scope, aclService) {
|
2018-09-05 09:48:38 +00:00
|
|
|
this.$state = $state;
|
2019-04-08 07:01:10 +00:00
|
|
|
this.$scope = $scope;
|
|
|
|
this.aclService = aclService;
|
2018-09-05 09:48:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
onSubmit() {
|
2019-04-08 07:01:10 +00:00
|
|
|
this.$scope.watcher.check();
|
|
|
|
this.$scope.model.save().then(() => {
|
|
|
|
this.$scope.watcher.notifySaved();
|
|
|
|
this.$scope.watcher.updateOriginalData();
|
|
|
|
|
|
|
|
if (this.aclService.hasAny(['salesAssistant']))
|
|
|
|
this.$state.go('claim.card.action');
|
2018-09-05 09:48:38 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-04-08 07:01:10 +00:00
|
|
|
Controller.$inject = ['$state', '$scope', 'aclService'];
|
2018-09-05 09:48:38 +00:00
|
|
|
|
|
|
|
ngModule.component('vnClaimDevelopment', {
|
|
|
|
template: require('./index.html'),
|
|
|
|
controller: Controller,
|
|
|
|
bindings: {
|
|
|
|
claim: '<'
|
|
|
|
}
|
|
|
|
});
|