diff --git a/CHANGELOG.md b/CHANGELOG.md index b694208dd..5e836484a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,10 +9,12 @@ 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 ### Changed +- Made the historical market data editor expandable in the admin control panel - Parallelized the requests in the get quotes functionality of the _Financial Modeling Prep_ service ### Fixed 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/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', 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 @@
+
+
+ +
+
+ @for (itemByMonth of marketDataByMonth | keyvalue; track itemByMonth) {
-
{{ itemByMonth.key }}
+
{{ itemByMonth.key }}
@for (dayItem of days; track dayItem; let i = $index) {