Browse Source
			
			
			Feature/minor improvements in the page components (#310)
			
				* Move permissions to constructor
* Sort imports
			
			
				pull/312/head
			
			
		 
		
			
				
					
						 Thomas Kaul
					
					4 years ago
						Thomas Kaul
					
					4 years ago
					
						
							committed by
							
								 GitHub
								GitHub
							
						 
					
				 
				
			 
		 
		
			
				
					
					No known key found for this signature in database
					
						
							GPG Key ID: 4AEE18F83AFDEB23
						
					
				
			
		
		
		
	
		
			
				 2 changed files with 
7 additions and 
7 deletions
			 
			
		 
		
			
				- 
					
					
					 
					apps/client/src/app/pages/about/about-page.component.ts
				
- 
					
					
					 
					apps/client/src/app/pages/portfolio/allocations/allocations-page.component.ts
				
				
				
					
						
							
								
									
	
		
			
				
					|  |  | @ -35,12 +35,7 @@ export class AboutPageComponent implements OnDestroy, OnInit { | 
			
		
	
		
			
				
					|  |  |  |     private changeDetectorRef: ChangeDetectorRef, | 
			
		
	
		
			
				
					|  |  |  |     private dataService: DataService, | 
			
		
	
		
			
				
					|  |  |  |     private userService: UserService | 
			
		
	
		
			
				
					|  |  |  |   ) {} | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |   /** | 
			
		
	
		
			
				
					|  |  |  |    * Initializes the controller | 
			
		
	
		
			
				
					|  |  |  |    */ | 
			
		
	
		
			
				
					|  |  |  |   public ngOnInit() { | 
			
		
	
		
			
				
					|  |  |  |   ) { | 
			
		
	
		
			
				
					|  |  |  |     const { globalPermissions, statistics } = this.dataService.fetchInfo(); | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |     this.hasPermissionForBlog = hasPermission( | 
			
		
	
	
		
			
				
					|  |  | @ -59,7 +54,12 @@ export class AboutPageComponent implements OnDestroy, OnInit { | 
			
		
	
		
			
				
					|  |  |  |     ); | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |     this.statistics = statistics; | 
			
		
	
		
			
				
					|  |  |  |   } | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |   /** | 
			
		
	
		
			
				
					|  |  |  |    * Initializes the controller | 
			
		
	
		
			
				
					|  |  |  |    */ | 
			
		
	
		
			
				
					|  |  |  |   public ngOnInit() { | 
			
		
	
		
			
				
					|  |  |  |     this.userService.stateChanged | 
			
		
	
		
			
				
					|  |  |  |       .pipe(takeUntil(this.unsubscribeSubject)) | 
			
		
	
		
			
				
					|  |  |  |       .subscribe((state) => { | 
			
		
	
	
		
			
				
					|  |  | 
 | 
			
		
	
								
							
						
					 
					
				 
			 
		
			
			
			
			
			
			
				
				
					
						
							
								
									
	
		
			
				
					|  |  | @ -3,7 +3,7 @@ import { ToggleOption } from '@ghostfolio/client/components/toggle/interfaces/to | 
			
		
	
		
			
				
					|  |  |  | import { DataService } from '@ghostfolio/client/services/data.service'; | 
			
		
	
		
			
				
					|  |  |  | import { ImpersonationStorageService } from '@ghostfolio/client/services/impersonation-storage.service'; | 
			
		
	
		
			
				
					|  |  |  | import { UserService } from '@ghostfolio/client/services/user/user.service'; | 
			
		
	
		
			
				
					|  |  |  | import { ghostfolioCashSymbol, UNKNOWN_KEY } from '@ghostfolio/common/config'; | 
			
		
	
		
			
				
					|  |  |  | import { UNKNOWN_KEY, ghostfolioCashSymbol } from '@ghostfolio/common/config'; | 
			
		
	
		
			
				
					|  |  |  | import { | 
			
		
	
		
			
				
					|  |  |  |   PortfolioDetails, | 
			
		
	
		
			
				
					|  |  |  |   PortfolioPosition, | 
			
		
	
	
		
			
				
					|  |  | 
 |