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
parent
commit
60ccf82ed1
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      CHANGELOG.md
  2. 10
      apps/api/src/app/portfolio/portfolio.controller.ts
  3. 2
      libs/common/src/lib/helper.ts

4
CHANGELOG.md

@ -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 - 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 ## 2.4.0 - 2023-09-19
### Added ### Added

10
apps/api/src/app/portfolio/portfolio.controller.ts

@ -173,8 +173,14 @@ export class PortfolioController {
for (const [symbol, portfolioPosition] of Object.entries(holdings)) { for (const [symbol, portfolioPosition] of Object.entries(holdings)) {
holdings[symbol] = { holdings[symbol] = {
...portfolioPosition, ...portfolioPosition,
assetClass: hasDetails ? portfolioPosition.assetClass : undefined, assetClass:
assetSubClass: hasDetails ? portfolioPosition.assetSubClass : undefined, hasDetails || portfolioPosition.assetClass === 'CASH'
? portfolioPosition.assetClass
: undefined,
assetSubClass:
hasDetails || portfolioPosition.assetSubClass === 'CASH'
? portfolioPosition.assetSubClass
: undefined,
countries: hasDetails ? portfolioPosition.countries : [], countries: hasDetails ? portfolioPosition.countries : [],
currency: hasDetails ? portfolioPosition.currency : undefined, currency: hasDetails ? portfolioPosition.currency : undefined,
markets: hasDetails ? portfolioPosition.markets : undefined, markets: hasDetails ? portfolioPosition.markets : undefined,

2
libs/common/src/lib/helper.ts

@ -294,7 +294,7 @@ export const DATE_FORMAT_YEARLY = 'yyyy';
export function parseDate(date: string): Date | null { export function parseDate(date: string): Date | null {
// Transform 'yyyyMMdd' format to supported format by parse function // 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})$/); const match = date.match(/^(\d{4})(\d{2})(\d{2})$/);
if (match) { if (match) {

Loading…
Cancel
Save