Browse Source
Feature/eliminate firstOrderDate in favor of dateOfFirstActivity in portfolio summary component (#4462)
* Eliminate firstOrderDate in favor of dateOfFirstActivity in portfolio summary component
* Update changelog
pull/4471/head
Sayed Murtadha Ahmed
3 weeks ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with
3 additions and
12 deletions
-
CHANGELOG.md
-
apps/api/src/app/portfolio/portfolio.service.ts
-
apps/api/src/helper/object.helper.spec.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
|
|
@ -17,6 +17,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 |
|
|
|
|
|
|
|
- Improved the export functionality by applying filters on accounts and tags |
|
|
|
- Improved the symbol validation in the _Yahoo Finance_ service (get asset profiles) |
|
|
|
- Eliminated `firstOrderDate` from the summary of the portfolio details endpoint in favor of using `dateOfFirstActivity` from the user endpoint |
|
|
|
- Refactored `lodash.uniq` with `Array.from(new Set(...))` |
|
|
|
- Refreshed the cryptocurrencies list |
|
|
|
- Improved the language localization for Turkish (`tr`) |
|
|
|
|
|
@ -1918,7 +1918,6 @@ export class PortfolioService { |
|
|
|
annualizedPerformancePercentWithCurrencyEffect, |
|
|
|
cash, |
|
|
|
excludedAccountsAndActivities, |
|
|
|
firstOrderDate, |
|
|
|
netPerformance, |
|
|
|
netPerformancePercentage, |
|
|
|
netPerformancePercentageWithCurrencyEffect, |
|
|
|
|
|
@ -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, |
|
|
|
|
|
@ -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 { |
|
|
|
|
|
@ -529,12 +529,6 @@ export class DataService { |
|
|
|
}) |
|
|
|
.pipe( |
|
|
|
map((response) => { |
|
|
|
if (response.summary?.firstOrderDate) { |
|
|
|
response.summary.firstOrderDate = parseISO( |
|
|
|
response.summary.firstOrderDate |
|
|
|
); |
|
|
|
} |
|
|
|
|
|
|
|
if (response.holdings) { |
|
|
|
for (const symbol of Object.keys(response.holdings)) { |
|
|
|
response.holdings[symbol].assetClassLabel = translate( |
|
|
|
|
|
@ -16,7 +16,6 @@ export interface PortfolioSummary extends PortfolioPerformance { |
|
|
|
filteredValueInBaseCurrency?: number; |
|
|
|
filteredValueInPercentage?: number; |
|
|
|
fireWealth: number; |
|
|
|
firstOrderDate: Date; |
|
|
|
grossPerformance: number; |
|
|
|
grossPerformanceWithCurrencyEffect: number; |
|
|
|
interest: number; |
|
|
|