Open Source Wealth Management Software. Angular + NestJS + Prisma + Nx + TypeScript 🤍
TypeScript angularetffinancefintechghostfoliohacktoberfestinvestingnestjsosspersonal-financeportfolioprismasoftwarestocktrackertradingtypescriptwealth-managementweb
Feature/add new market data preset (#6346)
David Requeno117a938bad9c
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 2e2312b89a..ea423e8f44 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0### Added+- Added a _No Activities_ preset to the historical market data table of the admin control panel- Added support for custom cryptocurrencies defined in the database- Added support for the cryptocurrency _Sky_diff --git a/apps/api/src/app/admin/admin.service.ts b/apps/api/src/app/admin/admin.service.tsindex 2cc8bbfb8a..d77fde3468 100644--- a/apps/api/src/app/admin/admin.service.ts+++ b/apps/api/src/app/admin/admin.service.ts@@ -225,6 +225,10 @@ export class AdminService {presetId === 'ETF_WITHOUT_SECTORS') {filters = [{ id: 'ETF', type: 'ASSET_SUB_CLASS' }];+ } else if (presetId === 'NO_ACTIVITIES') {+ where.activities = {+ none: {}+ };}const searchQuery = filters.find(({ type }) => {diff --git a/apps/client/src/app/components/admin-market-data/admin-market-data.component.ts b/apps/client/src/app/components/admin-market-data/admin-market-data.component.tsindex 8f956b782c..6a079c20a8 100644--- a/apps/client/src/app/components/admin-market-data/admin-market-data.component.ts+++ b/apps/client/src/app/components/admin-market-data/admin-market-data.component.ts@@ -140,6 +140,11 @@ export class GfAdminMarketDataComponentid: 'ETF_WITHOUT_SECTORS',label: $localize`ETFs without Sectors`,type: 'PRESET_ID' as Filter['type']+ },+ {+ id: 'NO_ACTIVITIES',+ label: $localize`No Activities`,+ type: 'PRESET_ID' as Filter['type']}];public benchmarks: Partial<SymbolProfile>[];diff --git a/libs/common/src/lib/types/market-data-preset.type.ts b/libs/common/src/lib/types/market-data-preset.type.tsindex 0dbf914fa5..2622feac3b 100644--- a/libs/common/src/lib/types/market-data-preset.type.ts+++ b/libs/common/src/lib/types/market-data-preset.type.ts@@ -2,4 +2,5 @@ export type MarketDataPreset =| 'BENCHMARKS'| 'CURRENCIES'| 'ETF_WITHOUT_COUNTRIES'- | 'ETF_WITHOUT_SECTORS';+ | 'ETF_WITHOUT_SECTORS'+ | 'NO_ACTIVITIES';