Browse Source
Bugfix/time in market for impersonation mode (#6103)
* Fix time in market for impersonation mode
* Update changelog
pull/6114/head
Vahant Sharma
1 week ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with
16 additions and
4 deletions
-
CHANGELOG.md
-
apps/api/src/app/portfolio/portfolio.service.ts
-
apps/client/src/app/components/portfolio-summary/portfolio-summary.component.ts
-
apps/client/src/app/services/data.service.ts
-
libs/common/src/lib/interfaces/portfolio-summary.interface.ts
|
|
|
@ -19,6 +19,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 |
|
|
|
### Fixed |
|
|
|
|
|
|
|
- Added the missing currency suffix to the cash balance field in the create or update account dialog |
|
|
|
- Fixed the time in market display of the portfolio summary tab on the home page for the impersonation mode |
|
|
|
- Fixed the delete button in the asset profile details dialog of the admin control panel by providing the missing `watchedByCount` parameter |
|
|
|
|
|
|
|
## 2.224.2 - 2025-12-20 |
|
|
|
|
|
|
|
@ -1954,6 +1954,7 @@ export class PortfolioService { |
|
|
|
}).length, |
|
|
|
committedFunds: committedFunds.toNumber(), |
|
|
|
currentValueInBaseCurrency: currentValueInBaseCurrency.toNumber(), |
|
|
|
dateOfFirstActivity: firstOrderDate, |
|
|
|
dividendInBaseCurrency: dividendInBaseCurrency.toNumber(), |
|
|
|
emergencyFund: { |
|
|
|
assets: emergencyFundHoldingsValueInBaseCurrency, |
|
|
|
|
|
|
|
@ -84,10 +84,13 @@ export class GfPortfolioSummaryComponent implements OnChanges { |
|
|
|
this.precision = 0; |
|
|
|
} |
|
|
|
|
|
|
|
if (this.user.dateOfFirstActivity) { |
|
|
|
this.timeInMarket = formatDistanceToNow(this.user.dateOfFirstActivity, { |
|
|
|
locale: getDateFnsLocale(this.language) |
|
|
|
}); |
|
|
|
if (this.summary.dateOfFirstActivity) { |
|
|
|
this.timeInMarket = formatDistanceToNow( |
|
|
|
this.summary.dateOfFirstActivity, |
|
|
|
{ |
|
|
|
locale: getDateFnsLocale(this.language) |
|
|
|
} |
|
|
|
); |
|
|
|
} else { |
|
|
|
this.timeInMarket = '-'; |
|
|
|
} |
|
|
|
|
|
|
|
@ -564,6 +564,12 @@ export class DataService { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if (response.summary?.dateOfFirstActivity) { |
|
|
|
response.summary.dateOfFirstActivity = parseISO( |
|
|
|
response.summary.dateOfFirstActivity |
|
|
|
); |
|
|
|
} |
|
|
|
|
|
|
|
return response; |
|
|
|
}) |
|
|
|
); |
|
|
|
|
|
|
|
@ -7,6 +7,7 @@ export interface PortfolioSummary extends PortfolioPerformance { |
|
|
|
annualizedPerformancePercentWithCurrencyEffect: number; |
|
|
|
cash: number; |
|
|
|
committedFunds: number; |
|
|
|
dateOfFirstActivity: Date; |
|
|
|
dividendInBaseCurrency: number; |
|
|
|
emergencyFund: { |
|
|
|
assets: number; |
|
|
|
|