|  | @ -1,3 +1,5 @@ | 
			
		
	
		
		
			
				
					|  |  |  |  |  | import { ConfirmationDialogType } from '@ghostfolio/client/core/notification/confirmation-dialog/confirmation-dialog.type'; | 
			
		
	
		
		
			
				
					|  |  |  |  |  | import { NotificationService } from '@ghostfolio/client/core/notification/notification.service'; | 
			
		
	
		
		
			
				
					|  |  | import { getLocale, resolveMarketCondition } from '@ghostfolio/common/helper'; |  |  | import { getLocale, resolveMarketCondition } from '@ghostfolio/common/helper'; | 
			
		
	
		
		
			
				
					|  |  | import { |  |  | import { | 
			
		
	
		
		
			
				
					|  |  |   AssetProfileIdentifier, |  |  |   AssetProfileIdentifier, | 
			
		
	
	
		
		
			
				
					|  | @ -13,11 +15,15 @@ import { | 
			
		
	
		
		
			
				
					|  |  |   CUSTOM_ELEMENTS_SCHEMA, |  |  |   CUSTOM_ELEMENTS_SCHEMA, | 
			
		
	
		
		
			
				
					|  |  |   ChangeDetectionStrategy, |  |  |   ChangeDetectionStrategy, | 
			
		
	
		
		
			
				
					|  |  |   Component, |  |  |   Component, | 
			
		
	
		
		
			
				
					|  |  |  |  |  |   EventEmitter, | 
			
		
	
		
		
			
				
					|  |  |   Input, |  |  |   Input, | 
			
		
	
		
		
			
				
					|  |  |   OnChanges, |  |  |   OnChanges, | 
			
		
	
		
		
			
				
					
					|  |  |   OnDestroy |  |  |   OnDestroy, | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					|  |  |  |  |  |   Output | 
			
		
	
		
		
			
				
					|  |  | } from '@angular/core'; |  |  | } from '@angular/core'; | 
			
		
	
		
		
			
				
					|  |  |  |  |  | import { MatButtonModule } from '@angular/material/button'; | 
			
		
	
		
		
			
				
					|  |  | import { MatDialog } from '@angular/material/dialog'; |  |  | import { MatDialog } from '@angular/material/dialog'; | 
			
		
	
		
		
			
				
					|  |  |  |  |  | import { MatMenuModule } from '@angular/material/menu'; | 
			
		
	
		
		
			
				
					|  |  | import { MatTableModule } from '@angular/material/table'; |  |  | import { MatTableModule } from '@angular/material/table'; | 
			
		
	
		
		
			
				
					|  |  | import { ActivatedRoute, Router, RouterModule } from '@angular/router'; |  |  | import { ActivatedRoute, Router, RouterModule } from '@angular/router'; | 
			
		
	
		
		
			
				
					|  |  | import { isNumber } from 'lodash'; |  |  | import { isNumber } from 'lodash'; | 
			
		
	
	
		
		
			
				
					|  | @ -33,6 +39,8 @@ import { BenchmarkDetailDialogParams } from './benchmark-detail-dialog/interface | 
			
		
	
		
		
			
				
					|  |  |     CommonModule, |  |  |     CommonModule, | 
			
		
	
		
		
			
				
					|  |  |     GfTrendIndicatorComponent, |  |  |     GfTrendIndicatorComponent, | 
			
		
	
		
		
			
				
					|  |  |     GfValueComponent, |  |  |     GfValueComponent, | 
			
		
	
		
		
			
				
					|  |  |  |  |  |     MatButtonModule, | 
			
		
	
		
		
			
				
					|  |  |  |  |  |     MatMenuModule, | 
			
		
	
		
		
			
				
					|  |  |     MatTableModule, |  |  |     MatTableModule, | 
			
		
	
		
		
			
				
					|  |  |     NgxSkeletonLoaderModule, |  |  |     NgxSkeletonLoaderModule, | 
			
		
	
		
		
			
				
					|  |  |     RouterModule |  |  |     RouterModule | 
			
		
	
	
		
		
			
				
					|  | @ -45,10 +53,19 @@ import { BenchmarkDetailDialogParams } from './benchmark-detail-dialog/interface | 
			
		
	
		
		
			
				
					|  |  | export class GfBenchmarkComponent implements OnChanges, OnDestroy { |  |  | export class GfBenchmarkComponent implements OnChanges, OnDestroy { | 
			
		
	
		
		
			
				
					|  |  |   @Input() benchmarks: Benchmark[]; |  |  |   @Input() benchmarks: Benchmark[]; | 
			
		
	
		
		
			
				
					|  |  |   @Input() deviceType: string; |  |  |   @Input() deviceType: string; | 
			
		
	
		
		
			
				
					|  |  |  |  |  |   @Input() hasPermissionToDeleteItem: boolean; | 
			
		
	
		
		
			
				
					|  |  |   @Input() locale = getLocale(); |  |  |   @Input() locale = getLocale(); | 
			
		
	
		
		
			
				
					|  |  |   @Input() user: User; |  |  |   @Input() user: User; | 
			
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |   public displayedColumns = ['name', 'date', 'change', 'marketCondition']; |  |  |   @Output() itemDeleted = new EventEmitter<AssetProfileIdentifier>(); | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					|  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					|  |  |  |  |  |   public displayedColumns = [ | 
			
		
	
		
		
			
				
					|  |  |  |  |  |     'name', | 
			
		
	
		
		
			
				
					|  |  |  |  |  |     'date', | 
			
		
	
		
		
			
				
					|  |  |  |  |  |     'change', | 
			
		
	
		
		
			
				
					|  |  |  |  |  |     'marketCondition', | 
			
		
	
		
		
			
				
					|  |  |  |  |  |     'actions' | 
			
		
	
		
		
			
				
					|  |  |  |  |  |   ]; | 
			
		
	
		
		
			
				
					|  |  |   public isLoading = true; |  |  |   public isLoading = true; | 
			
		
	
		
		
			
				
					|  |  |   public isNumber = isNumber; |  |  |   public isNumber = isNumber; | 
			
		
	
		
		
			
				
					|  |  |   public resolveMarketCondition = resolveMarketCondition; |  |  |   public resolveMarketCondition = resolveMarketCondition; | 
			
		
	
	
		
		
			
				
					|  | @ -58,6 +75,7 @@ export class GfBenchmarkComponent implements OnChanges, OnDestroy { | 
			
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
		
		
			
				
					|  |  |   public constructor( |  |  |   public constructor( | 
			
		
	
		
		
			
				
					|  |  |     private dialog: MatDialog, |  |  |     private dialog: MatDialog, | 
			
		
	
		
		
			
				
					|  |  |  |  |  |     private notificationService: NotificationService, | 
			
		
	
		
		
			
				
					|  |  |     private route: ActivatedRoute, |  |  |     private route: ActivatedRoute, | 
			
		
	
		
		
			
				
					|  |  |     private router: Router |  |  |     private router: Router | 
			
		
	
		
		
			
				
					|  |  |   ) { |  |  |   ) { | 
			
		
	
	
		
		
			
				
					|  | @ -89,11 +107,22 @@ export class GfBenchmarkComponent implements OnChanges, OnDestroy { | 
			
		
	
		
		
			
				
					|  |  |         'trend200d', |  |  |         'trend200d', | 
			
		
	
		
		
			
				
					|  |  |         'date', |  |  |         'date', | 
			
		
	
		
		
			
				
					|  |  |         'change', |  |  |         'change', | 
			
		
	
		
		
			
				
					
					|  |  |         'marketCondition' |  |  |         'marketCondition', | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					|  |  |  |  |  |         'actions' | 
			
		
	
		
		
			
				
					|  |  |       ]; |  |  |       ]; | 
			
		
	
		
		
			
				
					|  |  |     } |  |  |     } | 
			
		
	
		
		
			
				
					|  |  |   } |  |  |   } | 
			
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
		
		
			
				
					|  |  |  |  |  |   public onDeleteItem({ dataSource, symbol }: AssetProfileIdentifier) { | 
			
		
	
		
		
			
				
					|  |  |  |  |  |     this.notificationService.confirm({ | 
			
		
	
		
		
			
				
					|  |  |  |  |  |       confirmFn: () => { | 
			
		
	
		
		
			
				
					|  |  |  |  |  |         this.itemDeleted.emit({ dataSource, symbol }); | 
			
		
	
		
		
			
				
					|  |  |  |  |  |       }, | 
			
		
	
		
		
			
				
					|  |  |  |  |  |       confirmType: ConfirmationDialogType.Warn, | 
			
		
	
		
		
			
				
					|  |  |  |  |  |       title: $localize`Do you really want to delete this item?` | 
			
		
	
		
		
			
				
					|  |  |  |  |  |     }); | 
			
		
	
		
		
			
				
					|  |  |  |  |  |   } | 
			
		
	
		
		
			
				
					|  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					|  |  |   public onOpenBenchmarkDialog({ dataSource, symbol }: AssetProfileIdentifier) { |  |  |   public onOpenBenchmarkDialog({ dataSource, symbol }: AssetProfileIdentifier) { | 
			
		
	
		
		
			
				
					|  |  |     this.router.navigate([], { |  |  |     this.router.navigate([], { | 
			
		
	
		
		
			
				
					|  |  |       queryParams: { dataSource, symbol, benchmarkDetailDialog: true } |  |  |       queryParams: { dataSource, symbol, benchmarkDetailDialog: true } | 
			
		
	
	
		
		
			
				
					|  | 
 |