|
@ -9,6 +9,7 @@ import { DATE_FORMAT, downloadAsFile } from '@ghostfolio/common/helper'; |
|
|
import { |
|
|
import { |
|
|
DataProviderInfo, |
|
|
DataProviderInfo, |
|
|
EnhancedSymbolProfile, |
|
|
EnhancedSymbolProfile, |
|
|
|
|
|
Filter, |
|
|
LineChartItem, |
|
|
LineChartItem, |
|
|
User |
|
|
User |
|
|
} from '@ghostfolio/common/interfaces'; |
|
|
} from '@ghostfolio/common/interfaces'; |
|
@ -152,6 +153,11 @@ export class GfHoldingDetailDialogComponent implements OnDestroy, OnInit { |
|
|
tags: <string[]>[] |
|
|
tags: <string[]>[] |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
const filters: Filter[] = [ |
|
|
|
|
|
{ id: this.data.dataSource, type: 'DATA_SOURCE' }, |
|
|
|
|
|
{ id: this.data.symbol, type: 'SYMBOL' } |
|
|
|
|
|
]; |
|
|
|
|
|
|
|
|
this.tagsAvailable = tags.map(({ id, name }) => { |
|
|
this.tagsAvailable = tags.map(({ id, name }) => { |
|
|
return { |
|
|
return { |
|
|
id, |
|
|
id, |
|
@ -173,12 +179,20 @@ export class GfHoldingDetailDialogComponent implements OnDestroy, OnInit { |
|
|
.subscribe(); |
|
|
.subscribe(); |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
this.dataService |
|
|
|
|
|
.fetchAccounts({ |
|
|
|
|
|
filters |
|
|
|
|
|
}) |
|
|
|
|
|
.pipe(takeUntil(this.unsubscribeSubject)) |
|
|
|
|
|
.subscribe(({ accounts }) => { |
|
|
|
|
|
this.accounts = accounts; |
|
|
|
|
|
|
|
|
|
|
|
this.changeDetectorRef.markForCheck(); |
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
this.dataService |
|
|
this.dataService |
|
|
.fetchActivities({ |
|
|
.fetchActivities({ |
|
|
filters: [ |
|
|
filters, |
|
|
{ id: this.data.dataSource, type: 'DATA_SOURCE' }, |
|
|
|
|
|
{ id: this.data.symbol, type: 'SYMBOL' } |
|
|
|
|
|
], |
|
|
|
|
|
sortColumn: this.sortColumn, |
|
|
sortColumn: this.sortColumn, |
|
|
sortDirection: this.sortDirection |
|
|
sortDirection: this.sortDirection |
|
|
}) |
|
|
}) |
|
@ -197,7 +211,6 @@ export class GfHoldingDetailDialogComponent implements OnDestroy, OnInit { |
|
|
.pipe(takeUntil(this.unsubscribeSubject)) |
|
|
.pipe(takeUntil(this.unsubscribeSubject)) |
|
|
.subscribe( |
|
|
.subscribe( |
|
|
({ |
|
|
({ |
|
|
accounts, |
|
|
|
|
|
averagePrice, |
|
|
averagePrice, |
|
|
dataProviderInfo, |
|
|
dataProviderInfo, |
|
|
dividendInBaseCurrency, |
|
|
dividendInBaseCurrency, |
|
@ -219,7 +232,6 @@ export class GfHoldingDetailDialogComponent implements OnDestroy, OnInit { |
|
|
transactionCount, |
|
|
transactionCount, |
|
|
value |
|
|
value |
|
|
}) => { |
|
|
}) => { |
|
|
this.accounts = accounts; |
|
|
|
|
|
this.averagePrice = averagePrice; |
|
|
this.averagePrice = averagePrice; |
|
|
this.benchmarkDataItems = []; |
|
|
this.benchmarkDataItems = []; |
|
|
this.countries = {}; |
|
|
this.countries = {}; |
|
|