integrated get all users API to provide options for user dropdown in permission management

aconnect-UX/1715
atif118-mfsys 4 hours ago
parent c93f231dfd
commit dee23848ea

@ -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<PermissionNode[]> {
@ -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<any[]>(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<any[]>(URIKey.GET_ALL_USER_URI).subscribe((response) => {
if (!(response instanceof HttpErrorResponse)) {
this.users = response.map(item => ({
userName: item.userFullname,
userId: item.userId,
}));
}
});
}
onUserChange() {

@ -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"
}
]
}

Loading…
Cancel
Save