Editing Super Admin permissions and visual changes

This commit is contained in:
2026-09-20 12:07:05 +03:30
parent 4a9fe0b07c
commit 0e580b19c3
9 changed files with 621 additions and 231 deletions
+8 -3
View File
@@ -688,6 +688,9 @@ export class PlatformService {
organization: { id: string; name: string; isActive: boolean };
}>;
}): PlatformUserDto {
const isBillingOwner = row.memberships.some(
(m) => m.role === 'owner' && m.isActive,
);
return {
id: row.id,
email: row.email,
@@ -696,9 +699,11 @@ export class PlatformService {
isActive: row.isActive,
lastLoginAt: row.lastLoginAt?.toISOString() ?? null,
createdAt: row.createdAt.toISOString(),
billing: row.billingAccount
? this.billing.toDto(row.billingAccount)
: null,
isBillingOwner,
billing:
isBillingOwner && row.billingAccount
? this.billing.toDto(row.billingAccount)
: null,
memberships: row.memberships.map((m) => ({
membershipId: m.id,
organizationId: m.organization.id,