From c16352b76cee4771ea8a0e9b087658fcb783a257 Mon Sep 17 00:00:00 2001 From: Martin Clifford Date: Sat, 19 Apr 2025 22:54:34 -0700 Subject: [PATCH 1/3] Bugfix/fix typos in permissions (#4572) * Fix typos in permissions --- libs/common/src/lib/permissions.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/common/src/lib/permissions.ts b/libs/common/src/lib/permissions.ts index 1c79720f5..f675a278b 100644 --- a/libs/common/src/lib/permissions.ts +++ b/libs/common/src/lib/permissions.ts @@ -18,8 +18,8 @@ export const permissions = { createTag: 'createTag', createUserAccount: 'createUserAccount', deleteAccess: 'deleteAccess', - deleteAccount: 'deleteAcccount', - deleteAccountBalance: 'deleteAcccountBalance', + deleteAccount: 'deleteAccount', + deleteAccountBalance: 'deleteAccountBalance', deleteAuthDevice: 'deleteAuthDevice', deleteOrder: 'deleteOrder', deleteOwnUser: 'deleteOwnUser', From 6b2966b7dc063f22ba24aa8f9e9a09176615b667 Mon Sep 17 00:00:00 2001 From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> Date: Sun, 20 Apr 2025 08:01:03 +0200 Subject: [PATCH 2/3] Feature/extend benchmark detail dialog by market price (#4565) * Add current market price * Update changelog --- CHANGELOG.md | 1 + .../benchmark-detail-dialog.component.ts | 18 +++++++++++++++--- .../benchmark-detail-dialog.html | 11 +++++++++++ 3 files changed, 27 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2f0057a0c..94f5b12ef 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 +- Extended the benchmark detail dialog by the current market price - Added `watchlist` to the `User` database schema as a preparation for watching assets ### Fixed diff --git a/libs/ui/src/lib/benchmark/benchmark-detail-dialog/benchmark-detail-dialog.component.ts b/libs/ui/src/lib/benchmark/benchmark-detail-dialog/benchmark-detail-dialog.component.ts index 96dc6800e..ff309a47a 100644 --- a/libs/ui/src/lib/benchmark/benchmark-detail-dialog/benchmark-detail-dialog.component.ts +++ b/libs/ui/src/lib/benchmark/benchmark-detail-dialog/benchmark-detail-dialog.component.ts @@ -7,6 +7,7 @@ import { LineChartItem } from '@ghostfolio/common/interfaces'; import { GfLineChartComponent } from '@ghostfolio/ui/line-chart'; +import { GfValueComponent } from '@ghostfolio/ui/value'; import { CUSTOM_ELEMENTS_SCHEMA, @@ -35,6 +36,7 @@ import { BenchmarkDetailDialogParams } from './interfaces/interfaces'; GfDialogFooterModule, GfDialogHeaderModule, GfLineChartComponent, + GfValueComponent, MatDialogModule ], schemas: [CUSTOM_ELEMENTS_SCHEMA], @@ -45,6 +47,7 @@ import { BenchmarkDetailDialogParams } from './interfaces/interfaces'; export class GfBenchmarkDetailDialogComponent implements OnDestroy, OnInit { public assetProfile: AdminMarketDataDetails['assetProfile']; public historicalDataItems: LineChartItem[]; + public value: number; private unsubscribeSubject = new Subject(); @@ -65,9 +68,18 @@ export class GfBenchmarkDetailDialogComponent implements OnDestroy, OnInit { .subscribe(({ assetProfile, marketData }) => { this.assetProfile = assetProfile; - this.historicalDataItems = marketData.map(({ date, marketPrice }) => { - return { date: format(date, DATE_FORMAT), value: marketPrice }; - }); + this.historicalDataItems = marketData.map( + ({ date, marketPrice }, index) => { + if (marketData.length - 1 === index) { + this.value = marketPrice; + } + + return { + date: format(date, DATE_FORMAT), + value: marketPrice + }; + } + ); this.changeDetectorRef.markForCheck(); }); diff --git a/libs/ui/src/lib/benchmark/benchmark-detail-dialog/benchmark-detail-dialog.html b/libs/ui/src/lib/benchmark/benchmark-detail-dialog/benchmark-detail-dialog.html index 23196f162..032663355 100644 --- a/libs/ui/src/lib/benchmark/benchmark-detail-dialog/benchmark-detail-dialog.html +++ b/libs/ui/src/lib/benchmark/benchmark-detail-dialog/benchmark-detail-dialog.html @@ -8,6 +8,17 @@
+
+
+ +
+
+ Date: Sun, 20 Apr 2025 11:06:24 -0300 Subject: [PATCH 3/3] Feature/add expansion panel for historical market data editor (#4550) * Add expansion panel for historical market data editor * Update changelog --- CHANGELOG.md | 4 ++ .../asset-profile-dialog.html | 40 +++++++++++++------ ...storical-market-data-editor.component.html | 2 +- 3 files changed, 32 insertions(+), 14 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 94f5b12ef..dd4c0a2c9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Extended the benchmark detail dialog by the current market price - Added `watchlist` to the `User` database schema as a preparation for watching assets +### Changed + +- Made the historical market data editor expandable in the admin control panel + ### Fixed - Fixed the word wrap in the menu of the historical market data table in the admin control panel diff --git a/apps/client/src/app/components/admin-market-data/asset-profile-dialog/asset-profile-dialog.html b/apps/client/src/app/components/admin-market-data/asset-profile-dialog/asset-profile-dialog.html index 32f946ad8..ab3468dcd 100644 --- a/apps/client/src/app/components/admin-market-data/asset-profile-dialog/asset-profile-dialog.html +++ b/apps/client/src/app/components/admin-market-data/asset-profile-dialog/asset-profile-dialog.html @@ -77,17 +77,29 @@ [showYAxis]="true" [symbol]="data.symbol" /> - +
+ + + + Historical Market Data + + + + + +
@if (isEditAssetProfileIdentifierMode) { @@ -360,8 +372,10 @@ (closed)="scraperConfiguationIsExpanded.set(false)" (opened)="scraperConfiguationIsExpanded.set(true)" > - - Scraper Configuration + + Scraper Configuration
diff --git a/libs/ui/src/lib/historical-market-data-editor/historical-market-data-editor.component.html b/libs/ui/src/lib/historical-market-data-editor/historical-market-data-editor.component.html index b72ba15f8..c64d597b5 100644 --- a/libs/ui/src/lib/historical-market-data-editor/historical-market-data-editor.component.html +++ b/libs/ui/src/lib/historical-market-data-editor/historical-market-data-editor.component.html @@ -1,7 +1,7 @@
@for (itemByMonth of marketDataByMonth | keyvalue; track itemByMonth) {
-
{{ itemByMonth.key }}
+
{{ itemByMonth.key }}
@for (dayItem of days; track dayItem; let i = $index) {