Feature/allow to edit market data of today (#2515)
* Allow to edit today's market data * Update changelog
This commit is contained in:
parent
60b2115e3b
commit
750c627613
@ -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/),
|
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).
|
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
|
## 2.13.0 - 2023-10-20
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
@ -9,7 +9,11 @@
|
|||||||
[showYAxis]="true"
|
[showYAxis]="true"
|
||||||
[symbol]="symbol"
|
[symbol]="symbol"
|
||||||
></gf-line-chart>
|
></gf-line-chart>
|
||||||
<div *ngFor="let itemByMonth of marketDataByMonth | keyvalue" class="d-flex">
|
<div
|
||||||
|
*ngFor="let itemByMonth of marketDataByMonth | keyvalue"
|
||||||
|
class="d-flex"
|
||||||
|
[hidden]="!marketData.length > 0"
|
||||||
|
>
|
||||||
<div class="date px-1 text-nowrap">{{ itemByMonth.key }}</div>
|
<div class="date px-1 text-nowrap">{{ itemByMonth.key }}</div>
|
||||||
<div class="align-items-center d-flex flex-grow-1 px-1">
|
<div class="align-items-center d-flex flex-grow-1 px-1">
|
||||||
<div
|
<div
|
||||||
|
@ -28,7 +28,6 @@
|
|||||||
|
|
||||||
&.today {
|
&.today {
|
||||||
background-color: rgba(var(--palette-accent-500), 1);
|
background-color: rgba(var(--palette-accent-500), 1);
|
||||||
cursor: default;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -83,10 +83,10 @@ export class AdminMarketDataDetailComponent implements OnChanges, OnInit {
|
|||||||
public ngOnChanges() {
|
public ngOnChanges() {
|
||||||
this.defaultDateFormat = getDateFormatString(this.locale);
|
this.defaultDateFormat = getDateFormatString(this.locale);
|
||||||
|
|
||||||
this.historicalDataItems = this.marketData.map((marketDataItem) => {
|
this.historicalDataItems = this.marketData.map(({ date, marketPrice }) => {
|
||||||
return {
|
return {
|
||||||
date: format(marketDataItem.date, DATE_FORMAT),
|
date: format(date, DATE_FORMAT),
|
||||||
value: marketDataItem.marketPrice
|
value: marketPrice
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -157,10 +157,6 @@ export class AdminMarketDataDetailComponent implements OnChanges, OnInit {
|
|||||||
const date = parseISO(`${yearMonth}-${day}`);
|
const date = parseISO(`${yearMonth}-${day}`);
|
||||||
const marketPrice = this.marketDataByMonth[yearMonth]?.[day]?.marketPrice;
|
const marketPrice = this.marketDataByMonth[yearMonth]?.[day]?.marketPrice;
|
||||||
|
|
||||||
if (isSameDay(date, new Date())) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
const dialogRef = this.dialog.open(MarketDataDetailDialog, {
|
const dialogRef = this.dialog.open(MarketDataDetailDialog, {
|
||||||
data: <MarketDataDetailDialogParams>{
|
data: <MarketDataDetailDialogParams>{
|
||||||
date,
|
date,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user