From 6f9e466aa2fcfd061f6f70936e9b617afdbd1a50 Mon Sep 17 00:00:00 2001 From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> Date: Sat, 22 Nov 2025 10:19:30 +0100 Subject: [PATCH] Feature/add authentication method to user detail dialog (#5970) * Extend user detail dialog * Update changelog --- CHANGELOG.md | 6 +++++ apps/api/src/app/admin/admin.service.ts | 4 ++- .../user-detail-dialog.html | 27 ++++++++++++++++--- .../lib/interfaces/admin-user.interface.ts | 4 ++- 4 files changed, 36 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2ca25a5a1..e9003f94e 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 6b29b141a..0a6df7647 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 fcefee4f0..551f9b943 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 @@
+
+ Authentication +
Role
- @if (data.hasPermissionForSubscription) { +
+ + @if (data.hasPermissionForSubscription) { +
+
+ Membership +
Country
- } -
+ + }
diff --git a/libs/common/src/lib/interfaces/admin-user.interface.ts b/libs/common/src/lib/interfaces/admin-user.interface.ts index 872abca90..4cb02b16e 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; }