+
- {{role.roleName}}
+ {{role.accessRoleName}}
+
+
+ {{role.accessRoleName}}
+
+
{{ 'RETURN_MANAGE_YOUR_USER_ACCOUNTS' | translate }}
diff --git a/src/app/pages/operation-success/operation-success.component.ts b/src/app/pages/operation-success/operation-success.component.ts
index 532f2814a..c29572072 100644
--- a/src/app/pages/operation-success/operation-success.component.ts
+++ b/src/app/pages/operation-success/operation-success.component.ts
@@ -11,6 +11,7 @@ import { ScrollHelper } from 'src/app/services/helper/scroll-helper.services';
import { ViewportScroller } from '@angular/common';
import { Title } from '@angular/platform-browser';
import { SessionStorageKey } from 'src/app/constants/constant';
+import { environment } from 'src/environments/environment';
@Component({
selector: 'app-operation-success',
@@ -24,7 +25,10 @@ import { SessionStorageKey } from 'src/app/constants/constant';
]
})
export class OperationSuccessComponent extends BaseComponent implements OnInit {
+ public showRoleView:boolean = environment.appSetting.hideSimplifyRole
operation: OperationEnum;
+ userServiceTableHeaders = ['NAME'];
+ userServiceColumnsToDisplay = ['accessRoleName',]
operationEnum = OperationEnum;
userName: string = '';
isOrgAdmin: boolean = false;
@@ -34,10 +38,25 @@ export class OperationSuccessComponent extends BaseComponent implements OnInit {
super(uiStore, viewportScroller, scrollHelper);
this.operation = parseInt(this.activatedRoute.snapshot.paramMap.get('operation') || '0');
this.userName = sessionStorage.getItem(SessionStorageKey.OperationSuccessUserName) ?? '';
- this.approveRequiredRole = JSON.parse(localStorage.getItem('user_approved_role') || 'null' );
- console.log("this.approveRequiredRole",this.approveRequiredRole)
+ this.approveRequiredRole = this.getSelectedRole(JSON.parse(localStorage.getItem('user_approved_role') || 'null' ))
}
+
+ public getSelectedRole(role:any):void{
+ let data:any=[]
+ role.forEach((f:any)=>{
+ let obj = {
+ accessRoleName: f.roleName,
+ serviceName: f.serviceName,
+ description:f.description,
+ serviceView:!this.showRoleView
+ }
+ data.push(obj)
+ })
+ return data
+ }
+
+
ngOnInit() {
this.isOrgAdmin = JSON.parse(localStorage.getItem('isOrgAdmin') || 'false');
let area: string = "";
diff --git a/src/app/pages/user-profile/user-profile-component.ts b/src/app/pages/user-profile/user-profile-component.ts
index 85605080c..fd432ac76 100644
--- a/src/app/pages/user-profile/user-profile-component.ts
+++ b/src/app/pages/user-profile/user-profile-component.ts
@@ -160,7 +160,7 @@ export class UserProfileComponent extends FormBaseComponent implements OnInit {
}
}
await this.getApprovalRequriedRoles()
- // await this.getPendingApprovalUserRole();
+ await this.getPendingApprovalUserRole();
await this.getOrgDetails()
await this.orgGroupService
.getOrganisationRoles(this.organisationId)
diff --git a/src/app/services/wrapper/wrapper-org--group-service.ts b/src/app/services/wrapper/wrapper-org--group-service.ts
index 088d33a1c..46c7a015b 100644
--- a/src/app/services/wrapper/wrapper-org--group-service.ts
+++ b/src/app/services/wrapper/wrapper-org--group-service.ts
@@ -174,12 +174,36 @@ export class WrapperOrganisationGroupService {
}
getOrganisationApprovalRequiredRoles(): Observable
{
- const url = `${this.configURl}/approve/roles`;
- return this.http.get(url).pipe(map((data: Role[]) => { return data }),
- catchError(err => {
- return throwError(err);
- })
- );
+ if(!environment.appSetting.hideSimplifyRole){
+ const structureData:any = []
+ const url = `${this.configURl}/approve/servicerolegroups`;
+ return this.http.get(url).pipe(map((data: Role[]) => {
+ data.forEach((f:any) => {
+ let structureObj = {
+ roleId: f.id,
+ roleKey:f.key,
+ roleName: f.name,
+ orgTypeEligibility: f.orgTypeEligibility,
+ subscriptionTypeEligibility: f.subscriptionTypeEligibility,
+ tradeEligibility: f.tradeEligibility,
+ description : f.description
+ }
+ structureData.push(structureObj)
+ })
+ return structureData
+ }),
+ catchError(err => {
+ return throwError(err);
+ })
+ );
+ } else {
+ const url = `${this.configURl}/approve/roles`;
+ return this.http.get(url).pipe(map((data: Role[]) => {return data } ),
+ catchError(err => {
+ return throwError(err);
+ })
+ );
+ }
}
getGroupOrganisationRoles(organisationId: string): Observable {
@@ -211,7 +235,6 @@ export class WrapperOrganisationGroupService {
const url = `${this.url}/${organisationId}/roles`;
return this.http.get(url).pipe(
map((data: Role[]) => {
- console.log("data", data)
return data;
}), catchError(error => {
return throwError(error);
diff --git a/src/app/services/wrapper/wrapper-user.service.ts b/src/app/services/wrapper/wrapper-user.service.ts
index bc6d54f0b..60c06d8f7 100644
--- a/src/app/services/wrapper/wrapper-user.service.ts
+++ b/src/app/services/wrapper/wrapper-user.service.ts
@@ -96,7 +96,6 @@ export class WrapperUserService {
const url = `${this.url}/v1?user-id=${encodeURIComponent(userName)}`;
return this.http.get(url, this.options).pipe(
map((data: any) => {
- console.log("data",data.detail.serviceRoleGroupInfo)
data.detail.serviceRoleGroupInfo.forEach((roles:any)=>{
let structureObj = {
roleId: roles.id,
@@ -126,27 +125,60 @@ export class WrapperUserService {
}
getPendingApprovalUserRole(userName: string): Observable {
- const url = `${this.url}/approve/roles?user-id=${encodeURIComponent(userName)}`;
- return this.http.get(url, this.options).pipe(
- map((data: any) => {
- return data;
- }),
- catchError((error) => {
- return throwError(error);
- })
- );
+ if(!environment.appSetting.hideSimplifyRole){
+ let roleInfo: any=[]
+ const url = `${this.url}/approve/servicerolegroups?user-id=${encodeURIComponent(userName)}`;
+ return this.http.get(url, this.options).pipe(
+ map((data: any) => {
+ data.forEach((role:any)=>{
+ let structureObj = {
+ roleId: role.id,
+ roleKey:role.key,
+ roleName: role.name,
+ }
+ roleInfo.push(structureObj)
+ })
+ return roleInfo;
+ }),
+ catchError((error) => {
+ return throwError(error);
+ })
+ );
+ } else {
+ const url = `${this.url}/approve/roles?user-id=${encodeURIComponent(userName)}`;
+ return this.http.get(url, this.options).pipe(
+ map((data: any) => {
+ return data;
+ }),
+ catchError((error) => {
+ return throwError(error);
+ })
+ );
+ }
}
userTokenVerify(encryptedToken: string): Observable {
- const url = `${this.url}/approve/verify?token=${encodeURIComponent(encryptedToken)}`;
- return this.http.get(url, this.options).pipe(
- map((data: any) => {
- return data
- }),
- catchError((error) => {
- return throwError(error);
- })
- );
+ if(!environment.appSetting.hideSimplifyRole){
+ const url = `${this.url}/approve/servicerolegroup/verify?token=${encodeURIComponent(encryptedToken)}`;
+ return this.http.get(url, this.options).pipe(
+ map((data: any) => {
+ return data
+ }),
+ catchError((error) => {
+ return throwError(error);
+ })
+ );
+ } else {
+ const url = `${this.url}/approve/verify?token=${encodeURIComponent(encryptedToken)}`;
+ return this.http.get(url, this.options).pipe(
+ map((data: any) => {
+ return data
+ }),
+ catchError((error) => {
+ return throwError(error);
+ })
+ );
+ }
}
updateUser(