Skip to content

Open Source Wealth Management Software. Angular + NestJS + Prisma + Nx + TypeScript 🤍

Feature/add authentication method to user detail dialog (#5970)

Thomas Kaul6f9e466aa2fc
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 2ca25a5a13..e9003f94ea 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
+
+### Added
+
+- Extended the user detail dialog of the admin control panel’s users section by the authentication method
+
## 2.218.0 - 2025-11-20
### Added
diff --git a/apps/api/src/app/admin/admin.service.ts b/apps/api/src/app/admin/admin.service.ts
index 6b29b141a6..0a6df76478 100644
--- a/apps/api/src/app/admin/admin.service.ts
+++ b/apps/api/src/app/admin/admin.service.ts
@@ -876,6 +876,7 @@ export class AdminService {
},
createdAt: true,
id: true,
+ provider: true,
role: true,
subscriptions: {
orderBy: {
@@ -892,7 +893,7 @@ export class AdminService {
});
return usersWithAnalytics.map(
- ({ _count, analytics, createdAt, id, role, subscriptions }) => {
+ ({ _count, analytics, createdAt, id, provider, role, subscriptions }) => {
const daysSinceRegistration =
differenceInDays(new Date(), createdAt) + 1;
const engagement = analytics
@@ -909,6 +910,7 @@ export class AdminService {
createdAt,
engagement,
id,
+ provider,
role,
subscription,
accountCount: _count.accounts || 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 fcefee4f0b..551f9b943e 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
@@ -23,17 +23,38 @@
</div>
<div class="mb-3 row">
+ <div class="col-6 mb-3">
+ <gf-value
+ i18n
+ size="medium"
+ [locale]="data.locale"
+ [value]="user?.provider"
+ >Authentication</gf-value
+ >
+ </div>
<div class="col-6 mb-3">
<gf-value i18n size="medium" [value]="user?.role">Role</gf-value>
</div>
- @if (data.hasPermissionForSubscription) {
+ </div>
+
+ @if (data.hasPermissionForSubscription) {
+ <div class="mb-3 row">
+ <div class="col-6 mb-3">
+ <gf-value
+ i18n
+ size="medium"
+ [locale]="data.locale"
+ [value]="user?.subscription ? 'Premium' : 'Basic'"
+ >Membership</gf-value
+ >
+ </div>
<div class="col-6 mb-3">
<gf-value i18n size="medium" [value]="user?.country"
>Country</gf-value
>
</div>
- }
- </div>
+ </div>
+ }
<div class="mb-3 row">
<div class="col-6 mb-3">
diff --git a/libs/common/src/lib/interfaces/admin-user.interface.ts b/libs/common/src/lib/interfaces/admin-user.interface.ts
index 872abca907..4cb02b16ec 100644
--- a/libs/common/src/lib/interfaces/admin-user.interface.ts
+++ b/libs/common/src/lib/interfaces/admin-user.interface.ts
@@ -1,4 +1,4 @@
-import { Role } from '@prisma/client';
+import { Provider, Role, Subscription } from '@prisma/client';
export interface AdminUser {
accountCount: number;
@@ -9,5 +9,7 @@ export interface AdminUser {
engagement: number;
id: string;
lastActivity: Date;
+ provider: Provider;
role: Role;
+ subscription?: Subscription;
}