Browse Source
Merge branch 'main' into feature/skip-data-gathering-for-manual-data-source
pull/2379/head
Thomas Kaul
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with
13 additions and
3 deletions
-
CHANGELOG.md
-
apps/api/src/app/portfolio/portfolio.controller.ts
-
libs/common/src/lib/helper.ts
|
|
@ -17,6 +17,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 |
|
|
|
|
|
|
|
- Skipped creating queue jobs for asset profiles with `MANUAL` data source on creating a new activity |
|
|
|
|
|
|
|
### Fixed |
|
|
|
|
|
|
|
- Fixed an issue with the cash position in the holdings table |
|
|
|
|
|
|
|
## 2.4.0 - 2023-09-19 |
|
|
|
|
|
|
|
### Added |
|
|
|
|
|
@ -173,8 +173,14 @@ export class PortfolioController { |
|
|
|
for (const [symbol, portfolioPosition] of Object.entries(holdings)) { |
|
|
|
holdings[symbol] = { |
|
|
|
...portfolioPosition, |
|
|
|
assetClass: hasDetails ? portfolioPosition.assetClass : undefined, |
|
|
|
assetSubClass: hasDetails ? portfolioPosition.assetSubClass : undefined, |
|
|
|
assetClass: |
|
|
|
hasDetails || portfolioPosition.assetClass === 'CASH' |
|
|
|
? portfolioPosition.assetClass |
|
|
|
: undefined, |
|
|
|
assetSubClass: |
|
|
|
hasDetails || portfolioPosition.assetSubClass === 'CASH' |
|
|
|
? portfolioPosition.assetSubClass |
|
|
|
: undefined, |
|
|
|
countries: hasDetails ? portfolioPosition.countries : [], |
|
|
|
currency: hasDetails ? portfolioPosition.currency : undefined, |
|
|
|
markets: hasDetails ? portfolioPosition.markets : undefined, |
|
|
|
|
|
@ -294,7 +294,7 @@ export const DATE_FORMAT_YEARLY = 'yyyy'; |
|
|
|
|
|
|
|
export function parseDate(date: string): Date | null { |
|
|
|
// Transform 'yyyyMMdd' format to supported format by parse function
|
|
|
|
if (date.length === 8) { |
|
|
|
if (date?.length === 8) { |
|
|
|
const match = date.match(/^(\d{4})(\d{2})(\d{2})$/); |
|
|
|
|
|
|
|
if (match) { |
|
|
|