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 1/2] 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) { + + } From b0747b025cca4b93231c6b17db2ff74161171c2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=92=D1=8F=D1=87=D0=B5=D1=81=D0=BB=D0=B0=D0=B2=20=D0=94?= =?UTF-8?q?=D0=BE=D1=80=D0=BE=D1=88=D0=B5=D0=BD=D0=BA=D0=BE?= <44668361+SlavaDoroshenko@users.noreply.github.com> Date: Wed, 8 Jul 2026 22:12:54 +0300 Subject: [PATCH 2/2] Task/set change detection strategy to OnPush in analysis page (#7275) * Set change detection strategy to OnPush * Update changelog --- CHANGELOG.md | 1 + .../pages/portfolio/analysis/analysis-page.component.ts | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 88b32f032..22406b5b1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - 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 analysis page - Set the change detection strategy to `OnPush` in the portfolio holdings page - Set the change detection strategy to `OnPush` in the _FIRE_ page - Set the change detection strategy to `OnPush` in the users section of the admin control panel diff --git a/apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts b/apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts index 6c49a9030..ae41f54c8 100644 --- a/apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts +++ b/apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts @@ -25,6 +25,7 @@ import { GfValueComponent } from '@ghostfolio/ui/value'; import { Clipboard } from '@angular/cdk/clipboard'; import { + ChangeDetectionStrategy, ChangeDetectorRef, Component, computed, @@ -51,6 +52,7 @@ import { DeviceDetectorService } from 'ngx-device-detector'; import { NgxSkeletonLoaderModule } from 'ngx-skeleton-loader'; @Component({ + changeDetection: ChangeDetectionStrategy.OnPush, imports: [ GfBenchmarkComparatorComponent, GfInvestmentChartComponent, @@ -148,6 +150,8 @@ export class GfAnalysisPageComponent implements OnInit { .pipe(takeUntilDestroyed(this.destroyRef)) .subscribe((impersonationId) => { this.hasImpersonationId = !!impersonationId; + + this.changeDetectorRef.markForCheck(); }); this.userService.stateChanged @@ -167,6 +171,8 @@ export class GfAnalysisPageComponent implements OnInit { this.update(); } + + this.changeDetectorRef.markForCheck(); }); } @@ -229,6 +235,8 @@ export class GfAnalysisPageComponent implements OnInit { } else if (mode === 'portfolio') { this.isLoadingPortfolioPrompt = false; } + + this.changeDetectorRef.markForCheck(); }); } @@ -382,6 +390,7 @@ export class GfAnalysisPageComponent implements OnInit { }); this.fetchDividendsAndInvestments(); + this.changeDetectorRef.markForCheck(); }