From 750c6276138389334f26e083fe48158c9b7df3ab Mon Sep 17 00:00:00 2001 From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> Date: Fri, 20 Oct 2023 17:37:55 +0200 Subject: [PATCH] Feature/allow to edit market data of today (#2515) * Allow to edit today's market data * Update changelog --- CHANGELOG.md | 6 ++++++ .../admin-market-data-detail.component.html | 6 +++++- .../admin-market-data-detail.component.scss | 1 - .../admin-market-data-detail.component.ts | 10 +++------- 4 files changed, 14 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 169995508..69ea038f7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ 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 + +### Changed + +- Allowed to edit today’s historical market data in the asset profile details dialog of the admin control panel + ## 2.13.0 - 2023-10-20 ### Added diff --git a/apps/client/src/app/components/admin-market-data-detail/admin-market-data-detail.component.html b/apps/client/src/app/components/admin-market-data-detail/admin-market-data-detail.component.html index d6f67faa3..c6e972f45 100644 --- a/apps/client/src/app/components/admin-market-data-detail/admin-market-data-detail.component.html +++ b/apps/client/src/app/components/admin-market-data-detail/admin-market-data-detail.component.html @@ -9,7 +9,11 @@ [showYAxis]="true" [symbol]="symbol" > -
+
{{ itemByMonth.key }}
{ + this.historicalDataItems = this.marketData.map(({ date, marketPrice }) => { return { - date: format(marketDataItem.date, DATE_FORMAT), - value: marketDataItem.marketPrice + date: format(date, DATE_FORMAT), + value: marketPrice }; }); @@ -157,10 +157,6 @@ export class AdminMarketDataDetailComponent implements OnChanges, OnInit { const date = parseISO(`${yearMonth}-${day}`); const marketPrice = this.marketDataByMonth[yearMonth]?.[day]?.marketPrice; - if (isSameDay(date, new Date())) { - return; - } - const dialogRef = this.dialog.open(MarketDataDetailDialog, { data: { date,