2018-08-29 07:45:37 +00:00
|
|
|
import ngModule from '../module';
|
2018-08-29 09:43:25 +00:00
|
|
|
import './style.scss';
|
2018-08-29 07:45:37 +00:00
|
|
|
|
2019-01-29 10:14:01 +00:00
|
|
|
class Controller {
|
2019-04-08 07:01:10 +00:00
|
|
|
constructor($scope, $state, aclService) {
|
|
|
|
this.$scope = $scope;
|
|
|
|
this.$state = $state;
|
|
|
|
this.$stateParams = $state.params;
|
|
|
|
this.aclService = aclService;
|
|
|
|
}
|
|
|
|
|
|
|
|
onSubmit() {
|
|
|
|
if (this.aclService.hasAny(['salesAssistant'])) {
|
|
|
|
this.$scope.watcher.submit().then(() => {
|
|
|
|
this.$state.go('claim.card.detail');
|
|
|
|
});
|
|
|
|
}
|
2019-01-29 10:14:01 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-04-08 07:01:10 +00:00
|
|
|
Controller.$inject = ['$scope', '$state', 'aclService'];
|
2019-01-29 10:14:01 +00:00
|
|
|
|
2018-08-29 07:45:37 +00:00
|
|
|
ngModule.component('vnClaimBasicData', {
|
|
|
|
template: require('./index.html'),
|
2019-01-29 10:14:01 +00:00
|
|
|
controller: Controller,
|
2018-08-29 07:45:37 +00:00
|
|
|
bindings: {
|
|
|
|
claim: '<'
|
|
|
|
}
|
|
|
|
});
|