Browse Source

Fix Detail DIalog

pull/5027/head
Dan 10 months ago
parent
commit
92d048773e
  1. 3
      apps/client/src/app/components/holding-detail-dialog/holding-detail-dialog.component.ts

3
apps/client/src/app/components/holding-detail-dialog/holding-detail-dialog.component.ts

@ -350,7 +350,7 @@ export class GfHoldingDetailDialogComponent implements OnDestroy, OnInit {
} }
} }
if (isToday(parseISO(this.firstBuyDate))) { if (this.firstBuyDate && isToday(parseISO(this.firstBuyDate))) {
// Add average price // Add average price
this.historicalDataItems.push({ this.historicalDataItems.push({
date: this.firstBuyDate, date: this.firstBuyDate,
@ -390,6 +390,7 @@ export class GfHoldingDetailDialogComponent implements OnDestroy, OnInit {
if ( if (
this.benchmarkDataItems[0]?.value === undefined && this.benchmarkDataItems[0]?.value === undefined &&
this.firstBuyDate &&
isSameMonth(parseISO(this.firstBuyDate), new Date()) isSameMonth(parseISO(this.firstBuyDate), new Date())
) { ) {
this.benchmarkDataItems[0].value = this.averagePrice; this.benchmarkDataItems[0].value = this.averagePrice;

Loading…
Cancel
Save