|
|
@ -126,7 +126,7 @@ export class GfHoldingDetailDialogComponent implements OnInit { |
|
|
}; |
|
|
}; |
|
|
protected dataProviderInfo: DataProviderInfo; |
|
|
protected dataProviderInfo: DataProviderInfo; |
|
|
protected dataSource: MatTableDataSource<Activity>; |
|
|
protected dataSource: MatTableDataSource<Activity>; |
|
|
protected dateOfFirstActivity: string; |
|
|
protected dateOfFirstActivity: Date; |
|
|
protected dividendInBaseCurrency: number; |
|
|
protected dividendInBaseCurrency: number; |
|
|
protected dividendInBaseCurrencyPrecision = 2; |
|
|
protected dividendInBaseCurrencyPrecision = 2; |
|
|
protected dividendYieldPercentWithCurrencyEffect: number; |
|
|
protected dividendYieldPercentWithCurrencyEffect: number; |
|
|
@ -452,16 +452,16 @@ export class GfHoldingDetailDialogComponent implements OnInit { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if (isToday(parseISO(this.dateOfFirstActivity))) { |
|
|
if (isToday(this.dateOfFirstActivity)) { |
|
|
// Add average price
|
|
|
// Add average price
|
|
|
this.historicalDataItems.push({ |
|
|
this.historicalDataItems.push({ |
|
|
date: this.dateOfFirstActivity, |
|
|
date: this.dateOfFirstActivity.toISOString(), |
|
|
value: this.averagePrice |
|
|
value: this.averagePrice |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
// Add benchmark 1
|
|
|
// Add benchmark 1
|
|
|
this.benchmarkDataItems.push({ |
|
|
this.benchmarkDataItems.push({ |
|
|
date: this.dateOfFirstActivity, |
|
|
date: this.dateOfFirstActivity.toISOString(), |
|
|
value: averagePrice |
|
|
value: averagePrice |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
@ -492,7 +492,7 @@ export class GfHoldingDetailDialogComponent implements OnInit { |
|
|
|
|
|
|
|
|
if ( |
|
|
if ( |
|
|
this.benchmarkDataItems[0]?.value === undefined && |
|
|
this.benchmarkDataItems[0]?.value === undefined && |
|
|
isSameMonth(parseISO(this.dateOfFirstActivity), new Date()) |
|
|
isSameMonth(this.dateOfFirstActivity, new Date()) |
|
|
) { |
|
|
) { |
|
|
this.benchmarkDataItems[0].value = this.averagePrice; |
|
|
this.benchmarkDataItems[0].value = this.averagePrice; |
|
|
} |
|
|
} |
|
|
|