From 72bff4d6db3a055c453b76ef82f0ec013edf55ca Mon Sep 17 00:00:00 2001 From: Sudarshan Kumar Date: Mon, 30 Mar 2020 16:59:58 +0530 Subject: Changes made for Role assignment Support Addition of Roles to Non Human User Id Issue-ID: PORTAL-866 Change-Id: Ib45f4f56ca97c89e3305090dc5c61a9960049a54 Signed-off-by: Sudarshan Kumar --- portal-FE-common/src/app/pages/users/users.component.ts | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'portal-FE-common/src') diff --git a/portal-FE-common/src/app/pages/users/users.component.ts b/portal-FE-common/src/app/pages/users/users.component.ts index 23538b5f..935be921 100644 --- a/portal-FE-common/src/app/pages/users/users.component.ts +++ b/portal-FE-common/src/app/pages/users/users.component.ts @@ -2,7 +2,7 @@ * ============LICENSE_START========================================== * ONAP Portal * =================================================================== - * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2020 AT&T Intellectual Property. All rights reserved. * =================================================================== * * Unless otherwise specified, all software contained herein is licensed @@ -93,7 +93,19 @@ export class UsersComponent implements OnInit { openExistingUserModal(userData: any) { const modalRef = this.ngbModal.open(NewUserModalComponent); - modalRef.componentInstance.userTitle = `${userData.firstName}, ${userData.lastName} ` + '(' + `${userData.orgUserId}` + ')'; + let firstName = ''; + let lastName = ''; + let orgUserId = ''; + if(userData && userData.firstName && userData.firstName!=null){ + firstName = userData.firstName; + } + if(userData && userData.lastName && userData.lastName!=null){ + lastName = ',' + userData.lastName; + } + if(userData && userData.orgUserId && userData.orgUserId!=null){ + orgUserId = ' (' +userData.orgUserId + ')'; + } + modalRef.componentInstance.userTitle = `${firstName} ${lastName} ${orgUserId}` ; modalRef.componentInstance.dialogState = 2; modalRef.componentInstance.userModalData = userData; modalRef.componentInstance.disableBack = true; -- cgit 1.2.3-korg