salix/modules/claim/front/basic-data/index.js

29 lines
683 B
JavaScript

import ngModule from '../module';
import './style.scss';
class Controller {
constructor($scope, $state, aclService) {
this.$scope = $scope;
this.$state = $state;
this.$stateParams = $state.params;
this.aclService = aclService;
}
onSubmit() {
this.$scope.watcher.submit().then(() => {
if (this.aclService.hasAny(['salesAssistant']))
this.$state.go('claim.card.detail');
});
}
}
Controller.$inject = ['$scope', '$state', 'aclService'];
ngModule.component('vnClaimBasicData', {
template: require('./index.html'),
controller: Controller,
bindings: {
claim: '<'
}
});