From f4bad6acafbecfce2fc45760f25f4c24950b7889 Mon Sep 17 00:00:00 2001 From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> Date: Sat, 25 Oct 2025 14:34:45 +0200 Subject: [PATCH 1/2] Bugfix/provide missing locale to rule settings dialog (#5845) * Provide locale to rule settings dialog * Update changelog --- CHANGELOG.md | 6 ++++++ apps/client/src/app/components/rule/rule.component.ts | 2 ++ apps/client/src/app/components/rules/rules.component.html | 1 + apps/client/src/app/components/rules/rules.component.ts | 1 + .../src/app/pages/portfolio/x-ray/x-ray-page.component.html | 2 ++ 5 files changed, 12 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1d5674673..36c8c3c29 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 + +### Fixed + +- Ensured the locale is available in the settings dialog to customize the rule thresholds of the _X-ray_ page + ## 2.211.0 - 2025-10-25 ### Added diff --git a/apps/client/src/app/components/rule/rule.component.ts b/apps/client/src/app/components/rule/rule.component.ts index ba77ce162..a4e9f4dea 100644 --- a/apps/client/src/app/components/rule/rule.component.ts +++ b/apps/client/src/app/components/rule/rule.component.ts @@ -51,6 +51,7 @@ export class GfRuleComponent implements OnInit { @Input() categoryName: string; @Input() hasPermissionToUpdateUserSettings: boolean; @Input() isLoading: boolean; + @Input() locale: string; @Input() rule: PortfolioReportRule; @Input() settings: XRayRulesSettings['AccountClusterRiskCurrentInvestment']; @@ -82,6 +83,7 @@ export class GfRuleComponent implements OnInit { data: { rule, categoryName: this.categoryName, + locale: this.locale, settings: this.settings } as RuleSettingsDialogParams, width: this.deviceType === 'mobile' ? '100vw' : '50rem' diff --git a/apps/client/src/app/components/rules/rules.component.html b/apps/client/src/app/components/rules/rules.component.html index d0cf7ece5..0c3153c52 100644 --- a/apps/client/src/app/components/rules/rules.component.html +++ b/apps/client/src/app/components/rules/rules.component.html @@ -12,6 +12,7 @@ [hasPermissionToUpdateUserSettings]=" hasPermissionToUpdateUserSettings " + [locale]="locale" [rule]="rule" [settings]="settings?.[rule.key]" (ruleUpdated)="onRuleUpdated($event)" diff --git a/apps/client/src/app/components/rules/rules.component.ts b/apps/client/src/app/components/rules/rules.component.ts index 6379a40fb..80a59740b 100644 --- a/apps/client/src/app/components/rules/rules.component.ts +++ b/apps/client/src/app/components/rules/rules.component.ts @@ -26,6 +26,7 @@ export class GfRulesComponent { @Input() categoryName: string; @Input() hasPermissionToUpdateUserSettings: boolean; @Input() isLoading: boolean; + @Input() locale: string; @Input() rules: PortfolioReportRule[]; @Input() settings: XRayRulesSettings; diff --git a/apps/client/src/app/pages/portfolio/x-ray/x-ray-page.component.html b/apps/client/src/app/pages/portfolio/x-ray/x-ray-page.component.html index d4820b59e..af74137d1 100644 --- a/apps/client/src/app/pages/portfolio/x-ray/x-ray-page.component.html +++ b/apps/client/src/app/pages/portfolio/x-ray/x-ray-page.component.html @@ -76,6 +76,7 @@ !hasImpersonationId && hasPermissionToUpdateUserSettings " [isLoading]="isLoading" + [locale]="user?.settings?.locale" [rules]="category.rules" [settings]="user?.settings?.xRayRules" (rulesUpdated)="onRulesUpdated($event)" @@ -90,6 +91,7 @@ !hasImpersonationId && hasPermissionToUpdateUserSettings " [isLoading]="isLoading" + [locale]="user?.settings?.locale" [rules]="inactiveRules" [settings]="user?.settings?.xRayRules" (rulesUpdated)="onRulesUpdated($event)" From 54e0f5e4666e24b49dab9f325e4750b9e979633d Mon Sep 17 00:00:00 2001 From: Abhishek Singla Date: Sat, 25 Oct 2025 23:19:21 +0530 Subject: [PATCH 2/2] Feature/extend user detail dialog (#5844) * Extend user detail dialog * Update changelog --- CHANGELOG.md | 4 + .../admin-users/admin-users.component.ts | 5 +- .../interfaces/interfaces.ts | 1 + .../user-detail-dialog.html | 73 ++++++++++++++++++- 4 files changed, 77 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 36c8c3c29..692029639 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Unreleased +### Added + +- Extended the user detail dialog in the users section of the admin control panel + ### Fixed - Ensured the locale is available in the settings dialog to customize the rule thresholds of the _X-ray_ page diff --git a/apps/client/src/app/components/admin-users/admin-users.component.ts b/apps/client/src/app/components/admin-users/admin-users.component.ts index fce97877b..4c20f3fe9 100644 --- a/apps/client/src/app/components/admin-users/admin-users.component.ts +++ b/apps/client/src/app/components/admin-users/admin-users.component.ts @@ -278,9 +278,9 @@ export class GfAdminUsersComponent implements OnDestroy, OnInit { }); } - private openUserDetailDialog(userId: string) { + private openUserDetailDialog(aUserId: string) { const userData = this.dataSource.data.find(({ id }) => { - return id === userId; + return id === aUserId; }); if (!userData) { @@ -293,6 +293,7 @@ export class GfAdminUsersComponent implements OnDestroy, OnInit { data: { userData, deviceType: this.deviceType, + hasPermissionForSubscription: this.hasPermissionForSubscription, locale: this.user?.settings?.locale } as UserDetailDialogParams, height: this.deviceType === 'mobile' ? '98vh' : '60vh', diff --git a/apps/client/src/app/components/user-detail-dialog/interfaces/interfaces.ts b/apps/client/src/app/components/user-detail-dialog/interfaces/interfaces.ts index 81cf84d12..5f3f4b87a 100644 --- a/apps/client/src/app/components/user-detail-dialog/interfaces/interfaces.ts +++ b/apps/client/src/app/components/user-detail-dialog/interfaces/interfaces.ts @@ -2,6 +2,7 @@ import { AdminUsers } from '@ghostfolio/common/interfaces'; export interface UserDetailDialogParams { deviceType: string; + hasPermissionForSubscription: boolean; locale: string; userData: AdminUsers['users'][0]; } diff --git a/apps/client/src/app/components/user-detail-dialog/user-detail-dialog.html b/apps/client/src/app/components/user-detail-dialog/user-detail-dialog.html index d90a6abf6..6bc468b59 100644 --- a/apps/client/src/app/components/user-detail-dialog/user-detail-dialog.html +++ b/apps/client/src/app/components/user-detail-dialog/user-detail-dialog.html @@ -8,9 +8,9 @@
- User ID + + User ID +
Registration Date + Registration Date +
+ +
+
+ + Role + +
+ @if (data.hasPermissionForSubscription) { +
+ + Country + +
+ } +
+ +
+
+ + Accounts + +
+
+ + Activities + +
+
+ + @if (data.hasPermissionForSubscription) { +
+
+ + Engagement per Day + +
+
+ + API Requests Today + +
+
+ }