Browse Source

(gh-4459): Eliminate firstOrderDate in favor of dateOfFirstActivity in PortfolioSummaryComponent

pull/4462/head
Sayed Murtadha Ahmed 4 weeks ago
parent
commit
7e31396e25
  1. 1
      apps/api/src/app/portfolio/portfolio.service.ts
  2. 2
      apps/api/src/helper/object.helper.spec.ts
  3. 4
      apps/client/src/app/components/portfolio-summary/portfolio-summary.component.ts
  4. 1
      libs/common/src/lib/interfaces/portfolio-summary.interface.ts

1
apps/api/src/app/portfolio/portfolio.service.ts

@ -1918,7 +1918,6 @@ export class PortfolioService {
annualizedPerformancePercentWithCurrencyEffect,
cash,
excludedAccountsAndActivities,
firstOrderDate,
netPerformance,
netPerformancePercentage,
netPerformancePercentageWithCurrencyEffect,

2
apps/api/src/helper/object.helper.spec.ts

@ -1519,7 +1519,6 @@ describe('redactAttributes', () => {
annualizedPerformancePercentWithCurrencyEffect: 0.1694019484552876,
cash: null,
excludedAccountsAndActivities: null,
firstOrderDate: '2017-01-02T23:00:00.000Z',
netPerformance: null,
netPerformancePercentage: 2.3039314216696174,
netPerformancePercentageWithCurrencyEffect: 2.3589806001456606,
@ -3023,7 +3022,6 @@ describe('redactAttributes', () => {
annualizedPerformancePercentWithCurrencyEffect: 0.1694019484552876,
cash: null,
excludedAccountsAndActivities: null,
firstOrderDate: '2017-01-02T23:00:00.000Z',
netPerformance: null,
netPerformancePercentage: 2.3039314216696174,
netPerformancePercentageWithCurrencyEffect: 2.3589806001456606,

4
apps/client/src/app/components/portfolio-summary/portfolio-summary.component.ts

@ -40,8 +40,8 @@ export class PortfolioSummaryComponent implements OnChanges {
public ngOnChanges() {
if (this.summary) {
if (this.summary.firstOrderDate) {
this.timeInMarket = formatDistanceToNow(this.summary.firstOrderDate, {
if (this.user.dateOfFirstActivity) {
this.timeInMarket = formatDistanceToNow(this.user.dateOfFirstActivity, {
locale: getDateFnsLocale(this.language)
});
} else {

1
libs/common/src/lib/interfaces/portfolio-summary.interface.ts

@ -16,7 +16,6 @@ export interface PortfolioSummary extends PortfolioPerformance {
filteredValueInBaseCurrency?: number;
filteredValueInPercentage?: number;
fireWealth: number;
firstOrderDate: Date;
grossPerformance: number;
grossPerformanceWithCurrencyEffect: number;
interest: number;

Loading…
Cancel
Save