Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] main from ghostfolio:main #498

Merged
merged 3 commits into from
Feb 21, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -5,18 +5,20 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## Unreleased
## 2.140.0 - 2025-02-20

### Changed

- Reloaded the available tags after creating a custom tag in the holding detail dialog (experimental)
- Improved the validation of the currency management in the admin control panel
- Migrated the `@ghostfolio/client` components to control flow
- Migrated the `@ghostfolio/ui` components to control flow
- Improved the language localization for German (`de`)

### Fixed

- Improved the error handling in the `HttpResponseInterceptor`
- Fixed an issue while using symbol profile overrides in the historical market data table of the admin control panel
- Added missing assets in _Storybook_ setup

## 2.139.1 - 2025-02-15
40 changes: 34 additions & 6 deletions apps/api/src/app/admin/admin.service.ts
Original file line number Diff line number Diff line change
@@ -30,6 +30,7 @@ import {
EnhancedSymbolProfile,
Filter
} from '@ghostfolio/common/interfaces';
import { Sector } from '@ghostfolio/common/interfaces/sector.interface';
import { MarketDataPreset } from '@ghostfolio/common/types';

import { BadRequestException, Injectable, Logger } from '@nestjs/common';
@@ -259,7 +260,8 @@ export class AdminService {
},
scraperConfiguration: true,
sectors: true,
symbol: true
symbol: true,
SymbolProfileOverrides: true
}
}),
this.prismaService.symbolProfile.count({ where })
@@ -313,11 +315,10 @@ export class AdminService {
name,
Order,
sectors,
symbol
symbol,
SymbolProfileOverrides
}) => {
const countriesCount = countries
? Object.keys(countries).length
: 0;
let countriesCount = countries ? Object.keys(countries).length : 0;

const lastMarketPrice = lastMarketPriceMap.get(
getAssetProfileIdentifier({ dataSource, symbol })
@@ -331,7 +332,34 @@ export class AdminService {
);
})?._count ?? 0;

const sectorsCount = sectors ? Object.keys(sectors).length : 0;
let sectorsCount = sectors ? Object.keys(sectors).length : 0;

if (SymbolProfileOverrides) {
assetClass = SymbolProfileOverrides.assetClass ?? assetClass;
assetSubClass =
SymbolProfileOverrides.assetSubClass ?? assetSubClass;

if (
(
SymbolProfileOverrides.countries as unknown as Prisma.JsonArray
)?.length > 0
) {
countriesCount = (
SymbolProfileOverrides.countries as unknown as Prisma.JsonArray
).length;
}

name = SymbolProfileOverrides.name ?? name;

if (
(SymbolProfileOverrides.sectors as unknown as Sector[])
?.length > 0
) {
sectorsCount = (
SymbolProfileOverrides.sectors as unknown as Prisma.JsonArray
).length;
}
}

return {
assetClass,
11 changes: 5 additions & 6 deletions apps/api/src/services/symbol-profile/symbol-profile.service.ts
Original file line number Diff line number Diff line change
@@ -204,8 +204,7 @@ export class SymbolProfileService {
?.length > 0
) {
item.countries = this.getCountries(
item.SymbolProfileOverrides
?.countries as unknown as Prisma.JsonArray
item.SymbolProfileOverrides.countries as unknown as Prisma.JsonArray
);
}

@@ -214,22 +213,22 @@ export class SymbolProfileService {
?.length > 0
) {
item.holdings = this.getHoldings(
item.SymbolProfileOverrides?.holdings as unknown as Prisma.JsonArray
item.SymbolProfileOverrides.holdings as unknown as Prisma.JsonArray
);
}

item.name = item.SymbolProfileOverrides?.name ?? item.name;
item.name = item.SymbolProfileOverrides.name ?? item.name;

if (
(item.SymbolProfileOverrides.sectors as unknown as Sector[])?.length >
0
) {
item.sectors = this.getSectors(
item.SymbolProfileOverrides?.sectors as unknown as Prisma.JsonArray
item.SymbolProfileOverrides.sectors as unknown as Prisma.JsonArray
);
}

item.url = item.SymbolProfileOverrides?.url ?? item.url;
item.url = item.SymbolProfileOverrides.url ?? item.url;

delete item.SymbolProfileOverrides;
}
Loading
Oops, something went wrong.
Loading
Oops, something went wrong.