From bc26289fa5365bd212a5887d9df3ae34d33edc0a Mon Sep 17 00:00:00 2001 From: VijayHirudayasamy-bc <103512567+VijayHirudayasamy-bc@users.noreply.github.com> Date: Mon, 24 Apr 2023 22:18:37 +0100 Subject: [PATCH] Feature/ppg 40 vijay the manage groups functionality changes UI (#1262) * Group related changes are done for manage my account page * normal users A/Cs are verified and fixed. --- .../accordion/accordion.component.html | 85 +- .../accordion/accordion.component.ts | 15 +- src/app/models/user.ts | 23 +- .../verify-user-status.component.html | 97 +-- .../user-profile/user-profile-component.html | 723 +++++++++--------- .../user-profile/user-profile-component.ts | 316 ++++---- 6 files changed, 679 insertions(+), 580 deletions(-) diff --git a/src/app/components/accordion/accordion.component.html b/src/app/components/accordion/accordion.component.html index a3d4c27dd..59834a2e3 100644 --- a/src/app/components/accordion/accordion.component.html +++ b/src/app/components/accordion/accordion.component.html @@ -4,12 +4,14 @@ {{headerText}} -

{{groupShow == +

{{groupShow == true ? 'hide all assigned' : (groupShow == false ? 'show all assigned' : '')}} ({{data.length}})

-

{{groupShow == - true ? 'hide all unassigned' : (groupShow == false ? 'show all unassigned' : '')}} - ({{data.length}})

+

{{groupShow == + true ? 'hide all unassigned' : (groupShow == false ? 'show all unassigned' : '')}} + ({{data.length}})

@@ -24,17 +26,21 @@ @@ -51,32 +57,57 @@ {{headerText}}

- - This user is not member of any group. - There are no unassigned groups for this user. + + {{!noDataGroupsMemberMessage? 'This user is not + member of any group.':noDataGroupsMemberMessage}} + + {{!noDatanoneGroupsMemberMessage? 'There are no unassigned groups for + this user.':noDatanoneGroupsMemberMessage}} + +
- +
- - - - + + + + - - - - + + + + -
Group name
Group name
{{groupdata[headerTextKeys]}} - - {{getElementStatus(groupdata.groupId)}}
{{groupdata[headerTextKeys]}} + + {{getElementStatus(groupdata.groupId)}}
-
+ + +
+
+ {{headerText}} +
+
+ + {{!noDataGroupsMemberMessage? 'This user is not + member of any group.':noDataGroupsMemberMessage}} +
+
+
+ \ No newline at end of file diff --git a/src/app/components/accordion/accordion.component.ts b/src/app/components/accordion/accordion.component.ts index 67176000b..383dc9c7d 100644 --- a/src/app/components/accordion/accordion.component.ts +++ b/src/app/components/accordion/accordion.component.ts @@ -14,9 +14,16 @@ export class AccordionComponent implements OnInit, OnChanges { @Input() isAdmin!: boolean @Input() accessTable!: string @Input() groupShow!: boolean + + @Input() noRoleMessage!: string + @Input() noDataGroupsMemberMessage!: string + @Input() noDatanoneGroupsMemberMessage!: string + + @Output() checkBoxRemoveRoles = new EventEmitter(); @Output() checkBoxAddRoles = new EventEmitter(); + // public groupShow: boolean = false; constructor(private router: Router) { } @@ -45,18 +52,18 @@ export class AccordionComponent implements OnInit, OnChanges { this[eventName].emit(data); } - public toggleRoleForUser(id: string):void{ + public toggleRoleForUser(id: string): void { const el: any = document.getElementById(id); el.style.display = (el.style.display === 'block') ? 'none' : 'block'; } - public goToEditGroup(groupId:any){ - let data = { + public goToEditGroup(groupId: any) { + let data = { isEdit: false, groupId: groupId, accessFrom: "users", isUserAccess: true }; - window.open( 'manage-groups/view?data=' + JSON.stringify(data)); + window.open('manage-groups/view?data=' + JSON.stringify(data)); } } diff --git a/src/app/models/user.ts b/src/app/models/user.ts index 7987f89d2..2040482a2 100644 --- a/src/app/models/user.ts +++ b/src/app/models/user.ts @@ -70,8 +70,8 @@ export interface ServicePermissionInfo { name: string; key: string; id: number, - serviceClientId ?: string; - serviceClientName ?: string; + serviceClientId?: string; + serviceClientName?: string; } export interface UserProfileRequestInfo extends UserDetail { @@ -132,22 +132,25 @@ export interface OrgUserListResponse extends PaginationInfo { export interface PendingApproveRole { userName: string; - detail : PendingApproveRoleDetail + detail: PendingApproveRoleDetail } export interface PendingApproveRoleDetail { - roleIds : [] + roleIds: [] } export interface acceptRejectRequestDetail { - pendingRoleIds : [] + pendingRoleIds: [] status: number } export interface userGroupTableDetail { - isAdmin : boolean + isAdmin: boolean headerTextKey: string - headerText:string, - accessTable:string - groupShow:boolean - data:any[] + headerText: string, + accessTable: string + groupShow: boolean + noRoleMessage?: string | any + noDataGroupsMemberMessage?: string | any + noDatanoneGroupsMemberMessage?: string | any + data: any[] } \ No newline at end of file diff --git a/src/app/pages/manage-user/verify-user-status/verify-user-status.component.html b/src/app/pages/manage-user/verify-user-status/verify-user-status.component.html index 1ceb34925..6085a94d2 100644 --- a/src/app/pages/manage-user/verify-user-status/verify-user-status.component.html +++ b/src/app/pages/manage-user/verify-user-status/verify-user-status.component.html @@ -1,59 +1,60 @@
-
- +
\ No newline at end of file diff --git a/src/app/pages/user-profile/user-profile-component.html b/src/app/pages/user-profile/user-profile-component.html index fe3887f3c..9d86958e8 100644 --- a/src/app/pages/user-profile/user-profile-component.html +++ b/src/app/pages/user-profile/user-profile-component.html @@ -1,385 +1,422 @@ -