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
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with
36 additions and
5 deletions
-
CHANGELOG.md
-
apps/api/src/app/admin/admin.service.ts
-
apps/client/src/app/components/user-detail-dialog/user-detail-dialog.html
-
libs/common/src/lib/interfaces/admin-user.interface.ts
|
|
|
@ -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 |
|
|
|
|
|
|
|
@ -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, |
|
|
|
|
|
|
|
@ -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"> |
|
|
|
|
|
|
|
@ -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; |
|
|
|
} |
|
|
|
|