|
|
|
@ -83,10 +83,10 @@ export class AdminMarketDataDetailComponent implements OnChanges, OnInit {
|
|
|
|
|
public ngOnChanges() {
|
|
|
|
|
this.defaultDateFormat = getDateFormatString(this.locale);
|
|
|
|
|
|
|
|
|
|
this.historicalDataItems = this.marketData.map((marketDataItem) => {
|
|
|
|
|
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: <MarketDataDetailDialogParams>{
|
|
|
|
|
date,
|
|
|
|
|