Browse Source

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

* Extend user detail dialog

* Update changelog
pull/5971/head
Thomas Kaul 7 days ago
committed by GitHub
parent
commit
6f9e466aa2
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 6
      CHANGELOG.md
  2. 4
      apps/api/src/app/admin/admin.service.ts
  3. 27
      apps/client/src/app/components/user-detail-dialog/user-detail-dialog.html
  4. 4
      libs/common/src/lib/interfaces/admin-user.interface.ts

6
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

4
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,

27
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">

4
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;
}

Loading…
Cancel
Save