Browse Source
			
			
			Feature/extend user detail dialog (#5844)
			
				* Extend user detail dialog
* Update changelog
			
			
				pull/5832/head
			
			
		 
		
			
				
					
						 Abhishek Singla
					
					6 days ago
						Abhishek Singla
					
					6 days ago
					
						
							committed by
							
								 GitHub
								GitHub
							
						 
					
				 
				
			 
		 
		
			
				
					
					No known key found for this signature in database
					
						
							GPG Key ID: B5690EEEBB952194
						
					
				
			
		
		
		
	
		
			
				 4 changed files with 
77 additions and 
6 deletions
			 
			
		 
		
			
				- 
					
					
					 
					CHANGELOG.md
				
- 
					
					
					 
					apps/client/src/app/components/admin-users/admin-users.component.ts
				
- 
					
					
					 
					apps/client/src/app/components/user-detail-dialog/interfaces/interfaces.ts
				
- 
					
					
					 
					apps/client/src/app/components/user-detail-dialog/user-detail-dialog.html
				
				
				
					
						
							
								
									
	
		
		
			
				
					|  | @ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 | 
			
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
		
		
			
				
					|  |  | ## Unreleased |  |  | ## Unreleased | 
			
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
		
		
			
				
					|  |  |  |  |  | ### Added | 
			
		
	
		
		
			
				
					|  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					|  |  |  |  |  | - Extended the user detail dialog in the users section of the admin control panel | 
			
		
	
		
		
			
				
					|  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					|  |  | ### Fixed |  |  | ### Fixed | 
			
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
		
		
			
				
					|  |  | - Ensured the locale is available in the settings dialog to customize the rule thresholds of the _X-ray_ page |  |  | - Ensured the locale is available in the settings dialog to customize the rule thresholds of the _X-ray_ page | 
			
		
	
	
		
		
			
				
					|  | 
 | 
			
		
	
								
							
						
					 
					
				 
			 
		
			
			
			
			
			
			
				
				
					
						
							
								
									
	
		
		
			
				
					|  | @ -278,9 +278,9 @@ export class GfAdminUsersComponent implements OnDestroy, OnInit { | 
			
		
	
		
		
			
				
					|  |  |       }); |  |  |       }); | 
			
		
	
		
		
			
				
					|  |  |   } |  |  |   } | 
			
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |   private openUserDetailDialog(userId: string) { |  |  |   private openUserDetailDialog(aUserId: string) { | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					|  |  |     const userData = this.dataSource.data.find(({ id }) => { |  |  |     const userData = this.dataSource.data.find(({ id }) => { | 
			
		
	
		
		
			
				
					
					|  |  |       return id === userId; |  |  |       return id === aUserId; | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					|  |  |     }); |  |  |     }); | 
			
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
		
		
			
				
					|  |  |     if (!userData) { |  |  |     if (!userData) { | 
			
		
	
	
		
		
			
				
					|  | @ -293,6 +293,7 @@ export class GfAdminUsersComponent implements OnDestroy, OnInit { | 
			
		
	
		
		
			
				
					|  |  |       data: { |  |  |       data: { | 
			
		
	
		
		
			
				
					|  |  |         userData, |  |  |         userData, | 
			
		
	
		
		
			
				
					|  |  |         deviceType: this.deviceType, |  |  |         deviceType: this.deviceType, | 
			
		
	
		
		
			
				
					|  |  |  |  |  |         hasPermissionForSubscription: this.hasPermissionForSubscription, | 
			
		
	
		
		
			
				
					|  |  |         locale: this.user?.settings?.locale |  |  |         locale: this.user?.settings?.locale | 
			
		
	
		
		
			
				
					|  |  |       } as UserDetailDialogParams, |  |  |       } as UserDetailDialogParams, | 
			
		
	
		
		
			
				
					|  |  |       height: this.deviceType === 'mobile' ? '98vh' : '60vh', |  |  |       height: this.deviceType === 'mobile' ? '98vh' : '60vh', | 
			
		
	
	
		
		
			
				
					|  | 
 | 
			
		
	
								
							
						
					 
					
				 
			 
		
			
			
			
			
			
			
				
				
					
						
							
								
									
	
		
		
			
				
					|  | @ -2,6 +2,7 @@ import { AdminUsers } from '@ghostfolio/common/interfaces'; | 
			
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
		
		
			
				
					|  |  | export interface UserDetailDialogParams { |  |  | export interface UserDetailDialogParams { | 
			
		
	
		
		
			
				
					|  |  |   deviceType: string; |  |  |   deviceType: string; | 
			
		
	
		
		
			
				
					|  |  |  |  |  |   hasPermissionForSubscription: boolean; | 
			
		
	
		
		
			
				
					|  |  |   locale: string; |  |  |   locale: string; | 
			
		
	
		
		
			
				
					|  |  |   userData: AdminUsers['users'][0]; |  |  |   userData: AdminUsers['users'][0]; | 
			
		
	
		
		
			
				
					|  |  | } |  |  | } | 
			
		
	
	
		
		
			
				
					|  | 
 | 
			
		
	
								
							
						
					 
					
				 
			 
		
			
			
			
			
			
			
				
				
					
						
							
								
									
	
		
		
			
				
					|  | @ -8,9 +8,9 @@ | 
			
		
	
		
		
			
				
					|  |  |   <div class="container p-0"> |  |  |   <div class="container p-0"> | 
			
		
	
		
		
			
				
					|  |  |     <div class="mb-3 row"> |  |  |     <div class="mb-3 row"> | 
			
		
	
		
		
			
				
					|  |  |       <div class="col-6 mb-3"> |  |  |       <div class="col-6 mb-3"> | 
			
		
	
		
		
			
				
					
					|  |  |         <gf-value i18n size="medium" [value]="data.userData.id" |  |  |         <gf-value i18n size="medium" [value]="data.userData.id"> | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |           >User ID</gf-value |  |  |           User ID | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |         > |  |  |         </gf-value> | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					|  |  |       </div> |  |  |       </div> | 
			
		
	
		
		
			
				
					|  |  |       <div class="col-6 mb-3"> |  |  |       <div class="col-6 mb-3"> | 
			
		
	
		
		
			
				
					|  |  |         <gf-value |  |  |         <gf-value | 
			
		
	
	
		
		
			
				
					|  | @ -19,10 +19,75 @@ | 
			
		
	
		
		
			
				
					|  |  |           [isDate]="true" |  |  |           [isDate]="true" | 
			
		
	
		
		
			
				
					|  |  |           [locale]="data.locale" |  |  |           [locale]="data.locale" | 
			
		
	
		
		
			
				
					|  |  |           [value]="data.userData.createdAt" |  |  |           [value]="data.userData.createdAt" | 
			
		
	
		
		
			
				
					|  |  |           >Registration Date</gf-value |  |  |  | 
			
		
	
		
		
			
				
					|  |  |         > |  |  |         > | 
			
		
	
		
		
			
				
					|  |  |  |  |  |           Registration Date | 
			
		
	
		
		
			
				
					|  |  |  |  |  |         </gf-value> | 
			
		
	
		
		
			
				
					|  |  |       </div> |  |  |       </div> | 
			
		
	
		
		
			
				
					|  |  |     </div> |  |  |     </div> | 
			
		
	
		
		
			
				
					|  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					|  |  |  |  |  |     <div class="mb-3 row"> | 
			
		
	
		
		
			
				
					|  |  |  |  |  |       <div class="col-6 mb-3"> | 
			
		
	
		
		
			
				
					|  |  |  |  |  |         <gf-value i18n size="medium" [value]="data.userData.role"> | 
			
		
	
		
		
			
				
					|  |  |  |  |  |           Role | 
			
		
	
		
		
			
				
					|  |  |  |  |  |         </gf-value> | 
			
		
	
		
		
			
				
					|  |  |  |  |  |       </div> | 
			
		
	
		
		
			
				
					|  |  |  |  |  |       @if (data.hasPermissionForSubscription) { | 
			
		
	
		
		
			
				
					|  |  |  |  |  |         <div class="col-6 mb-3"> | 
			
		
	
		
		
			
				
					|  |  |  |  |  |           <gf-value i18n size="medium" [value]="data.userData.country"> | 
			
		
	
		
		
			
				
					|  |  |  |  |  |             Country | 
			
		
	
		
		
			
				
					|  |  |  |  |  |           </gf-value> | 
			
		
	
		
		
			
				
					|  |  |  |  |  |         </div> | 
			
		
	
		
		
			
				
					|  |  |  |  |  |       } | 
			
		
	
		
		
			
				
					|  |  |  |  |  |     </div> | 
			
		
	
		
		
			
				
					|  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					|  |  |  |  |  |     <div class="mb-3 row"> | 
			
		
	
		
		
			
				
					|  |  |  |  |  |       <div class="col-6 mb-3"> | 
			
		
	
		
		
			
				
					|  |  |  |  |  |         <gf-value | 
			
		
	
		
		
			
				
					|  |  |  |  |  |           i18n | 
			
		
	
		
		
			
				
					|  |  |  |  |  |           size="medium" | 
			
		
	
		
		
			
				
					|  |  |  |  |  |           [locale]="data.locale" | 
			
		
	
		
		
			
				
					|  |  |  |  |  |           [value]="data.userData.accountCount" | 
			
		
	
		
		
			
				
					|  |  |  |  |  |         > | 
			
		
	
		
		
			
				
					|  |  |  |  |  |           Accounts | 
			
		
	
		
		
			
				
					|  |  |  |  |  |         </gf-value> | 
			
		
	
		
		
			
				
					|  |  |  |  |  |       </div> | 
			
		
	
		
		
			
				
					|  |  |  |  |  |       <div class="col-6 mb-3"> | 
			
		
	
		
		
			
				
					|  |  |  |  |  |         <gf-value | 
			
		
	
		
		
			
				
					|  |  |  |  |  |           i18n | 
			
		
	
		
		
			
				
					|  |  |  |  |  |           size="medium" | 
			
		
	
		
		
			
				
					|  |  |  |  |  |           [locale]="data.locale" | 
			
		
	
		
		
			
				
					|  |  |  |  |  |           [value]="data.userData.activityCount" | 
			
		
	
		
		
			
				
					|  |  |  |  |  |         > | 
			
		
	
		
		
			
				
					|  |  |  |  |  |           Activities | 
			
		
	
		
		
			
				
					|  |  |  |  |  |         </gf-value> | 
			
		
	
		
		
			
				
					|  |  |  |  |  |       </div> | 
			
		
	
		
		
			
				
					|  |  |  |  |  |     </div> | 
			
		
	
		
		
			
				
					|  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					|  |  |  |  |  |     @if (data.hasPermissionForSubscription) { | 
			
		
	
		
		
			
				
					|  |  |  |  |  |       <div class="mb-3 row"> | 
			
		
	
		
		
			
				
					|  |  |  |  |  |         <div class="col-6 mb-3"> | 
			
		
	
		
		
			
				
					|  |  |  |  |  |           <gf-value | 
			
		
	
		
		
			
				
					|  |  |  |  |  |             i18n | 
			
		
	
		
		
			
				
					|  |  |  |  |  |             size="medium" | 
			
		
	
		
		
			
				
					|  |  |  |  |  |             [locale]="data.locale" | 
			
		
	
		
		
			
				
					|  |  |  |  |  |             [precision]="0" | 
			
		
	
		
		
			
				
					|  |  |  |  |  |             [value]="data.userData.engagement" | 
			
		
	
		
		
			
				
					|  |  |  |  |  |           > | 
			
		
	
		
		
			
				
					|  |  |  |  |  |             Engagement per Day | 
			
		
	
		
		
			
				
					|  |  |  |  |  |           </gf-value> | 
			
		
	
		
		
			
				
					|  |  |  |  |  |         </div> | 
			
		
	
		
		
			
				
					|  |  |  |  |  |         <div class="col-6 mb-3"> | 
			
		
	
		
		
			
				
					|  |  |  |  |  |           <gf-value | 
			
		
	
		
		
			
				
					|  |  |  |  |  |             i18n | 
			
		
	
		
		
			
				
					|  |  |  |  |  |             size="medium" | 
			
		
	
		
		
			
				
					|  |  |  |  |  |             [locale]="data.locale" | 
			
		
	
		
		
			
				
					|  |  |  |  |  |             [value]="data.userData.dailyApiRequests" | 
			
		
	
		
		
			
				
					|  |  |  |  |  |           > | 
			
		
	
		
		
			
				
					|  |  |  |  |  |             API Requests Today | 
			
		
	
		
		
			
				
					|  |  |  |  |  |           </gf-value> | 
			
		
	
		
		
			
				
					|  |  |  |  |  |         </div> | 
			
		
	
		
		
			
				
					|  |  |  |  |  |       </div> | 
			
		
	
		
		
			
				
					|  |  |  |  |  |     } | 
			
		
	
		
		
			
				
					|  |  |   </div> |  |  |   </div> | 
			
		
	
		
		
			
				
					|  |  | </div> |  |  | </div> | 
			
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
	
		
		
			
				
					|  | 
 |