From d44243d737a3164311d04fbf5439c3dda72228d1 Mon Sep 17 00:00:00 2001 From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> Date: Wed, 8 Jul 2026 21:05:02 +0200 Subject: [PATCH] Task/improve date formatting in market data table of admin control panel (#7278) * Reuse value component for first activity column * Update changelog --- CHANGELOG.md | 1 + .../admin-market-data/admin-market-data.component.ts | 10 +--------- .../admin-market-data/admin-market-data.html | 8 +++++++- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0b0237916..88b32f032 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed - Improved the user account deletion flow in the user settings of the user account page +- Improved the date formatting of the first activity in the historical market data table of the admin control panel - Set the change detection strategy to `OnPush` in the allocations page - Set the change detection strategy to `OnPush` in the portfolio holdings page - Set the change detection strategy to `OnPush` in the _FIRE_ page diff --git a/apps/client/src/app/components/admin-market-data/admin-market-data.component.ts b/apps/client/src/app/components/admin-market-data/admin-market-data.component.ts index ae0f8fda2..c64405cb6 100644 --- a/apps/client/src/app/components/admin-market-data/admin-market-data.component.ts +++ b/apps/client/src/app/components/admin-market-data/admin-market-data.component.ts @@ -4,10 +4,7 @@ import { DEFAULT_LOCALE, DEFAULT_PAGE_SIZE } from '@ghostfolio/common/config'; -import { - canDeleteAssetProfile, - getDateFormatString -} from '@ghostfolio/common/helper'; +import { canDeleteAssetProfile } from '@ghostfolio/common/helper'; import { AssetProfileIdentifier, AssetProfileItem, @@ -153,7 +150,6 @@ export class GfAdminMarketDataComponent implements AfterViewInit, OnInit { ]; protected readonly canDeleteAssetProfile = canDeleteAssetProfile; protected dataSource = new MatTableDataSource(); - protected defaultDateFormat: string; protected readonly displayedColumns: string[] = []; protected readonly filters$ = new Subject(); protected isLoading = true; @@ -236,10 +232,6 @@ export class GfAdminMarketDataComponent implements AfterViewInit, OnInit { .subscribe((state) => { if (state?.user) { this.user = state.user; - - this.defaultDateFormat = getDateFormatString( - this.user.settings.locale - ); } }); diff --git a/apps/client/src/app/components/admin-market-data/admin-market-data.html b/apps/client/src/app/components/admin-market-data/admin-market-data.html index 83703b548..ae7adfdd8 100644 --- a/apps/client/src/app/components/admin-market-data/admin-market-data.html +++ b/apps/client/src/app/components/admin-market-data/admin-market-data.html @@ -147,7 +147,13 @@ First Activity - {{ (element.date | date: defaultDateFormat) ?? '' }} + @if (element.date) { + + }