+ private setFunctionRole = (service : Service) : void => {
+ if (service.serviceFunction) {
+ const functionList : string[] = this.$scope.getMetadataKeyValidValues('Service Function');
+ if (functionList.find(value => value == service.serviceFunction) != undefined) {
+ this.$scope.functionOption = service.serviceFunction;
+ } else {
+ this.$scope.functionOption = 'Others';
+ this.$scope.othersFlag = true;
+ }
+ }
+
+ if (service.serviceRole) {
+ const roleList : string[] = this.$scope.getMetadataKeyValidValues('Service Role');
+ if (roleList.find(value => value == service.serviceRole) != undefined) {
+ this.$scope.roleOption = service.serviceRole;
+ } else {
+ this.$scope.roleOption = 'Others';
+ this.$scope.othersRoleFlag = true;
+ }
+ }
+ }
+