diff --git a/src/app/user-permissions/user-permissions.component.ts b/src/app/user-permissions/user-permissions.component.ts index 7c7c18b..0041386 100644 --- a/src/app/user-permissions/user-permissions.component.ts +++ b/src/app/user-permissions/user-permissions.component.ts @@ -34,7 +34,10 @@ export class UserPermissionsComponent { this.defaultPermissions().subscribe((data: PermissionNode[]) => { this.permissions = data; }); - this.getAllUsers(HiddenValues.VAC_USER); + } + + ngOnInit(){ + this.getAllUsers(); } defaultPermissions(): Observable { @@ -111,18 +114,15 @@ export class UserPermissionsComponent { } } - getAllUsers(userType: string) { - let porOrgacode = this.credentialService.getPorOrgacode(); - const params = new HttpParams().set('porOrgacode', porOrgacode) - .append('userType', userType); - // this.httpService.requestGET(URIKey.GET_ALL_USER_URI, params).subscribe((response) => { - // if (!(response instanceof HttpErrorResponse)) { - // this.users = response.map(item => ({ - // userName: item.userName, - // userId: item.userId, - // })); - // } - // }); + getAllUsers() { + this.httpService.requestGET(URIKey.GET_ALL_USER_URI).subscribe((response) => { + if (!(response instanceof HttpErrorResponse)) { + this.users = response.map(item => ({ + userName: item.userFullname, + userId: item.userId, + })); + } + }); } onUserChange() { diff --git a/src/assets/data/app.uri.json b/src/assets/data/app.uri.json index 6442eac..fdb81a4 100644 --- a/src/assets/data/app.uri.json +++ b/src/assets/data/app.uri.json @@ -16,6 +16,11 @@ "Id": "ENTITY_USER_REFRESH_TOKEN", "URI": "/refreshtoken", "UUID": "USER_REFRESH_TOKEN" + }, + { + "Id": "ENTITY_GET_ALL_USER_URI", + "URI": "/user/getAllUsers", + "UUID": "GET_ALL_USER_URI" } ] }