Bugfix/time in market for impersonation mode (#6103)

* Fix time in market for impersonation mode

* Update changelog
pull/6176/head
Vahant Sharma 4 months ago committed by GitHub
parent 5b7356ff28
commit e668c6465e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -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;

Loading…
Cancel
Save