Editing Super Admin permissions and visual changes
This commit is contained in:
@@ -651,6 +651,7 @@ export class AuthService {
|
||||
membership?.organization.enabledModules,
|
||||
),
|
||||
subscription: sub,
|
||||
isOrgOwner: role === 'owner',
|
||||
});
|
||||
}
|
||||
|
||||
@@ -737,6 +738,7 @@ export class AuthService {
|
||||
avatarStorageKey?: string | null;
|
||||
enabledModules?: OrgModuleKey[];
|
||||
subscription?: SubscriptionSummaryDto | null;
|
||||
isOrgOwner?: boolean;
|
||||
}): AuthUserDto {
|
||||
return {
|
||||
id: user.id,
|
||||
@@ -749,6 +751,7 @@ export class AuthService {
|
||||
...(user.mobile ? { mobile: user.mobile } : {}),
|
||||
...(user.enabledModules ? { enabledModules: user.enabledModules } : {}),
|
||||
...(user.subscription ? { subscription: user.subscription } : {}),
|
||||
...(user.isOrgOwner !== undefined ? { isOrgOwner: user.isOrgOwner } : {}),
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -94,7 +94,7 @@ export class BillingService {
|
||||
});
|
||||
}
|
||||
|
||||
/** اشتراک محیط = BillingAccount اولین مالک فعال */
|
||||
/** اشتراک محیط = BillingAccount اولین مالک فعال — برای عضو زیرمجموعه حساب جدید ساخته نمیشود */
|
||||
async resolveForOrganization(organizationId: string) {
|
||||
const owner = await this.prisma.membership.findFirst({
|
||||
where: {
|
||||
@@ -106,25 +106,25 @@ export class BillingService {
|
||||
select: { userId: true },
|
||||
});
|
||||
if (!owner) return null;
|
||||
let account = await this.getByOwnerUserId(owner.userId);
|
||||
if (!account) {
|
||||
account = await this.ensureTrialForOwner(owner.userId);
|
||||
}
|
||||
return account;
|
||||
return this.getByOwnerUserId(owner.userId);
|
||||
}
|
||||
|
||||
async requireActiveForOrganization(organizationId: string): Promise<SubscriptionSummaryDto> {
|
||||
const account = await this.resolveForOrganization(organizationId);
|
||||
if (!account) {
|
||||
throw new UnauthorizedException('اشتراک این محیط یافت نشد');
|
||||
throw new UnauthorizedException(
|
||||
'اشتراک این محیط یافت نشد؛ مالک باید از پنل سوپرادمین پلن داشته باشد',
|
||||
);
|
||||
}
|
||||
return this.assertActive(account);
|
||||
}
|
||||
|
||||
async requireActiveForOwner(ownerUserId: string): Promise<SubscriptionSummaryDto> {
|
||||
let account = await this.getByOwnerUserId(ownerUserId);
|
||||
const account = await this.getByOwnerUserId(ownerUserId);
|
||||
if (!account) {
|
||||
account = await this.ensureTrialForOwner(ownerUserId);
|
||||
throw new UnauthorizedException(
|
||||
'اشتراک یافت نشد؛ ابتدا پلن را از سوپرادمین اعمال کنید',
|
||||
);
|
||||
}
|
||||
return this.assertActive(account);
|
||||
}
|
||||
@@ -154,7 +154,12 @@ export class BillingService {
|
||||
}
|
||||
|
||||
async assertCanCreateOrganization(ownerUserId: string) {
|
||||
const summary = await this.requireActiveForOwner(ownerUserId);
|
||||
let account = await this.getByOwnerUserId(ownerUserId);
|
||||
if (!account) {
|
||||
// اولین محیط مالک: trial خودکار
|
||||
account = await this.ensureTrialForOwner(ownerUserId, { maxOrganizations: 1 });
|
||||
}
|
||||
const summary = await this.assertActive(account);
|
||||
const ownedCount = await this.prisma.membership.count({
|
||||
where: { userId: ownerUserId, role: 'owner', isActive: true },
|
||||
});
|
||||
@@ -169,6 +174,16 @@ export class BillingService {
|
||||
ownerUserId: string,
|
||||
dto: ApplyBillingPlanRequest,
|
||||
): Promise<BillingAccountDto> {
|
||||
const ownerMembership = await this.prisma.membership.findFirst({
|
||||
where: { userId: ownerUserId, role: 'owner', isActive: true },
|
||||
select: { id: true },
|
||||
});
|
||||
if (!ownerMembership) {
|
||||
throw new BadRequestException(
|
||||
'اشتراک فقط برای مالک محیط تعریف میشود؛ این کاربر مالک هیچ محیطی نیست',
|
||||
);
|
||||
}
|
||||
|
||||
const planCode = dto.planCode;
|
||||
const now = new Date();
|
||||
let expiresAt: Date;
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import { computed } from 'vue';
|
||||
import { RouterLink, RouterView, useRouter } from 'vue-router';
|
||||
import { RouterLink, RouterView, useRoute, useRouter } from 'vue-router';
|
||||
import { usePlatformAuthStore } from '@/stores/platform-auth';
|
||||
import UiIcon from '@/components/UiIcon.vue';
|
||||
import MentoLogo from '@/components/brand/MentoLogo.vue';
|
||||
@@ -8,9 +8,32 @@ import BrandName from '@/components/brand/BrandName.vue';
|
||||
|
||||
const platform = usePlatformAuthStore();
|
||||
const router = useRouter();
|
||||
const route = useRoute();
|
||||
|
||||
const displayName = computed(() => platform.admin?.fullName || 'سوپرادمین');
|
||||
|
||||
const pageTitle = computed(() => {
|
||||
switch (route.name) {
|
||||
case 'adm-dashboard':
|
||||
return 'داشبورد';
|
||||
case 'adm-organizations':
|
||||
return 'محیطها';
|
||||
case 'adm-users':
|
||||
return 'کاربران';
|
||||
case 'adm-admins':
|
||||
return 'ادمینها';
|
||||
default:
|
||||
return 'سوپرادمین';
|
||||
}
|
||||
});
|
||||
|
||||
const tabs = [
|
||||
{ name: 'adm-dashboard', label: 'خانه', icon: 'home' as const },
|
||||
{ name: 'adm-organizations', label: 'محیطها', icon: 'building' as const },
|
||||
{ name: 'adm-users', label: 'کاربران', icon: 'users' as const },
|
||||
{ name: 'adm-admins', label: 'ادمینها', icon: 'lock' as const },
|
||||
];
|
||||
|
||||
function onLogout() {
|
||||
platform.logout();
|
||||
void router.push({ name: 'adm-login' });
|
||||
@@ -19,36 +42,41 @@ function onLogout() {
|
||||
|
||||
<template>
|
||||
<div class="adm-shell">
|
||||
<aside class="sidebar">
|
||||
<aside class="sidebar desktop-only">
|
||||
<div class="brand">
|
||||
<MentoLogo :size="32" :show-text="false" />
|
||||
<div class="brand-mark">
|
||||
<MentoLogo :size="36" :show-text="false" />
|
||||
</div>
|
||||
<div class="brand-copy">
|
||||
<BrandName />
|
||||
<span>پنل سوپرادمین</span>
|
||||
<span>کنترل پلتفرم</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<nav class="nav">
|
||||
<RouterLink :to="{ name: 'adm-dashboard' }" class="nav-item">
|
||||
<UiIcon name="home" :size="18" />
|
||||
<span>داشبورد</span>
|
||||
</RouterLink>
|
||||
<RouterLink :to="{ name: 'adm-organizations' }" class="nav-item">
|
||||
<UiIcon name="building" :size="18" />
|
||||
<span>محیطها</span>
|
||||
</RouterLink>
|
||||
<RouterLink :to="{ name: 'adm-users' }" class="nav-item">
|
||||
<UiIcon name="users" :size="18" />
|
||||
<span>کاربران</span>
|
||||
</RouterLink>
|
||||
<RouterLink :to="{ name: 'adm-admins' }" class="nav-item">
|
||||
<UiIcon name="lock" :size="18" />
|
||||
<span>ادمینها</span>
|
||||
<nav class="nav" aria-label="منوی سوپرادمین">
|
||||
<RouterLink
|
||||
v-for="tab in tabs"
|
||||
:key="tab.name"
|
||||
:to="{ name: tab.name }"
|
||||
class="nav-item"
|
||||
>
|
||||
<span class="nav-ico" aria-hidden="true">
|
||||
<UiIcon :name="tab.icon" :size="18" />
|
||||
</span>
|
||||
<span>{{ tab.label }}</span>
|
||||
</RouterLink>
|
||||
</nav>
|
||||
|
||||
<div class="side-foot">
|
||||
<p class="who">{{ displayName }}</p>
|
||||
<div class="who-card">
|
||||
<span class="who-avatar" aria-hidden="true">
|
||||
{{ displayName.slice(0, 1) }}
|
||||
</span>
|
||||
<div class="who-meta">
|
||||
<strong>{{ displayName }}</strong>
|
||||
<small>سوپرادمین</small>
|
||||
</div>
|
||||
</div>
|
||||
<button type="button" class="logout" @click="onLogout">
|
||||
<UiIcon name="logout" :size="16" />
|
||||
<span>خروج</span>
|
||||
@@ -56,9 +84,40 @@ function onLogout() {
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
<main class="main">
|
||||
<RouterView />
|
||||
</main>
|
||||
<div class="stage">
|
||||
<header class="topbar">
|
||||
<div class="top-brand mobile-only">
|
||||
<MentoLogo :size="28" :show-text="false" />
|
||||
<div>
|
||||
<strong>{{ pageTitle }}</strong>
|
||||
<small>سوپرادمین</small>
|
||||
</div>
|
||||
</div>
|
||||
<div class="top-desktop desktop-only">
|
||||
<h1>{{ pageTitle }}</h1>
|
||||
<p>مدیریت حسابها، اشتراک و ماژولها</p>
|
||||
</div>
|
||||
<button type="button" class="logout-top mobile-only" @click="onLogout">
|
||||
<UiIcon name="logout" :size="18" />
|
||||
</button>
|
||||
</header>
|
||||
|
||||
<main class="main">
|
||||
<RouterView />
|
||||
</main>
|
||||
</div>
|
||||
|
||||
<nav class="tabbar" aria-label="ناوبری پایین">
|
||||
<RouterLink
|
||||
v-for="tab in tabs"
|
||||
:key="tab.name"
|
||||
:to="{ name: tab.name }"
|
||||
class="tab"
|
||||
>
|
||||
<UiIcon :name="tab.icon" :size="20" />
|
||||
<span>{{ tab.label }}</span>
|
||||
</RouterLink>
|
||||
</nav>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -67,122 +126,299 @@ function onLogout() {
|
||||
min-height: 100vh;
|
||||
min-height: 100dvh;
|
||||
display: grid;
|
||||
grid-template-columns: 240px minmax(0, 1fr);
|
||||
grid-template-columns: 260px minmax(0, 1fr);
|
||||
background:
|
||||
radial-gradient(ellipse 60% 40% at 100% 0%, rgba(45, 212, 191, 0.08), transparent 55%),
|
||||
var(--bg);
|
||||
radial-gradient(ellipse 70% 45% at 100% -10%, rgba(20, 184, 166, 0.14), transparent 55%),
|
||||
radial-gradient(ellipse 50% 35% at 0% 100%, rgba(14, 165, 233, 0.08), transparent 50%),
|
||||
linear-gradient(180deg, #f4fbfa 0%, var(--bg) 40%);
|
||||
}
|
||||
|
||||
.desktop-only {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.mobile-only {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.sidebar {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 1.2rem;
|
||||
padding: 1.15rem 0.9rem;
|
||||
background: #fff;
|
||||
border-inline-end: 1px solid var(--line);
|
||||
box-shadow: 8px 0 24px rgba(15, 23, 42, 0.03);
|
||||
gap: 1.35rem;
|
||||
padding: 1.25rem 1rem;
|
||||
background: rgba(255, 255, 255, 0.86);
|
||||
backdrop-filter: blur(12px);
|
||||
border-inline-end: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
|
||||
box-shadow: 10px 0 40px rgba(15, 23, 42, 0.04);
|
||||
}
|
||||
|
||||
.brand {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.7rem;
|
||||
padding: 0.2rem 0.35rem;
|
||||
gap: 0.75rem;
|
||||
padding: 0.35rem 0.4rem;
|
||||
}
|
||||
|
||||
.brand-mark {
|
||||
display: grid;
|
||||
place-items: center;
|
||||
width: 48px;
|
||||
height: 48px;
|
||||
border-radius: 16px;
|
||||
background: linear-gradient(145deg, var(--accent-subtle), #fff);
|
||||
border: 1px solid color-mix(in srgb, var(--accent) 18%, white);
|
||||
box-shadow: 0 8px 20px rgba(13, 148, 136, 0.08);
|
||||
}
|
||||
|
||||
.brand-copy {
|
||||
display: grid;
|
||||
min-width: 0;
|
||||
gap: 0.1rem;
|
||||
}
|
||||
|
||||
.brand-copy span {
|
||||
color: var(--muted);
|
||||
font-size: 0.75rem;
|
||||
font-weight: 700;
|
||||
font-size: 0.72rem;
|
||||
font-weight: 800;
|
||||
letter-spacing: -0.01em;
|
||||
}
|
||||
|
||||
.nav {
|
||||
display: grid;
|
||||
gap: 0.25rem;
|
||||
gap: 0.35rem;
|
||||
flex: 1;
|
||||
align-content: start;
|
||||
}
|
||||
|
||||
.nav-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.6rem;
|
||||
padding: 0.7rem 0.8rem;
|
||||
border-radius: 12px;
|
||||
gap: 0.7rem;
|
||||
padding: 0.72rem 0.8rem;
|
||||
border-radius: 14px;
|
||||
color: var(--ink-secondary);
|
||||
text-decoration: none;
|
||||
font-weight: 700;
|
||||
font-size: 0.9rem;
|
||||
font-weight: 750;
|
||||
font-size: 0.92rem;
|
||||
transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
|
||||
}
|
||||
|
||||
.nav-item:hover {
|
||||
background: rgba(255, 255, 255, 0.9);
|
||||
color: var(--ink);
|
||||
}
|
||||
|
||||
.nav-ico {
|
||||
display: grid;
|
||||
place-items: center;
|
||||
width: 34px;
|
||||
height: 34px;
|
||||
border-radius: 11px;
|
||||
background: var(--surface-subtle);
|
||||
color: var(--muted);
|
||||
}
|
||||
|
||||
.nav-item.router-link-active {
|
||||
background: var(--accent-subtle);
|
||||
background: linear-gradient(135deg, var(--accent-subtle), #fff);
|
||||
color: var(--accent-deep);
|
||||
box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 22%, white);
|
||||
}
|
||||
|
||||
.nav-item.router-link-active .nav-ico {
|
||||
background: var(--accent);
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.side-foot {
|
||||
display: grid;
|
||||
gap: 0.45rem;
|
||||
padding: 0.35rem;
|
||||
gap: 0.65rem;
|
||||
padding-top: 0.35rem;
|
||||
border-top: 1px solid var(--line-light);
|
||||
}
|
||||
|
||||
.who {
|
||||
margin: 0;
|
||||
.who-card {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.65rem;
|
||||
padding: 0.55rem;
|
||||
border-radius: 14px;
|
||||
background: #fff;
|
||||
border: 1px solid var(--line-light);
|
||||
}
|
||||
|
||||
.who-avatar {
|
||||
display: grid;
|
||||
place-items: center;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
border-radius: 12px;
|
||||
background: var(--accent-soft);
|
||||
color: var(--accent-deep);
|
||||
font-weight: 900;
|
||||
}
|
||||
|
||||
.who-meta {
|
||||
display: grid;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.who-meta strong {
|
||||
font-size: 0.86rem;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.who-meta small {
|
||||
color: var(--muted);
|
||||
font-size: 0.8rem;
|
||||
font-size: 0.72rem;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.logout {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 0.4rem;
|
||||
border: 0;
|
||||
background: transparent;
|
||||
color: #94a3b8;
|
||||
border: 1px solid var(--line);
|
||||
background: #fff;
|
||||
color: var(--muted);
|
||||
font: inherit;
|
||||
font-size: 0.8rem;
|
||||
font-size: 0.82rem;
|
||||
font-weight: 750;
|
||||
cursor: pointer;
|
||||
padding: 0.55rem 0.75rem;
|
||||
border-radius: 12px;
|
||||
}
|
||||
|
||||
.logout:hover {
|
||||
color: var(--danger);
|
||||
border-color: color-mix(in srgb, var(--danger) 30%, white);
|
||||
}
|
||||
|
||||
.stage {
|
||||
min-width: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-height: 100dvh;
|
||||
}
|
||||
|
||||
.topbar {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 20;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 0.75rem;
|
||||
padding: 1rem 1.5rem 0.85rem;
|
||||
background: color-mix(in srgb, #f4fbfa 78%, transparent);
|
||||
backdrop-filter: blur(14px);
|
||||
border-bottom: 1px solid transparent;
|
||||
}
|
||||
|
||||
.top-desktop h1 {
|
||||
margin: 0;
|
||||
font-size: 1.35rem;
|
||||
letter-spacing: -0.02em;
|
||||
}
|
||||
|
||||
.top-desktop p {
|
||||
margin: 0.2rem 0 0;
|
||||
color: var(--muted);
|
||||
font-size: 0.84rem;
|
||||
}
|
||||
|
||||
.top-brand {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.65rem;
|
||||
}
|
||||
|
||||
.top-brand strong {
|
||||
display: block;
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
.top-brand small {
|
||||
color: var(--muted);
|
||||
font-size: 0.72rem;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.logout-top {
|
||||
border: 0;
|
||||
background: #fff;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
border-radius: 12px;
|
||||
display: grid;
|
||||
place-items: center;
|
||||
color: var(--muted);
|
||||
box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
|
||||
cursor: pointer;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.main {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
padding: 1.4rem 1.5rem 2rem;
|
||||
padding: 0.4rem 1.5rem 2rem;
|
||||
}
|
||||
|
||||
@media (max-width: 800px) {
|
||||
.tabbar {
|
||||
display: none;
|
||||
position: sticky;
|
||||
bottom: 0;
|
||||
z-index: 30;
|
||||
grid-template-columns: repeat(4, 1fr);
|
||||
gap: 0.15rem;
|
||||
padding: 0.45rem 0.55rem calc(0.45rem + env(safe-area-inset-bottom));
|
||||
background: rgba(255, 255, 255, 0.92);
|
||||
backdrop-filter: blur(16px);
|
||||
border-top: 1px solid var(--line-light);
|
||||
box-shadow: 0 -10px 30px rgba(15, 23, 42, 0.06);
|
||||
}
|
||||
|
||||
.tab {
|
||||
display: grid;
|
||||
justify-items: center;
|
||||
gap: 0.15rem;
|
||||
padding: 0.45rem 0.2rem;
|
||||
border-radius: 12px;
|
||||
text-decoration: none;
|
||||
color: var(--muted);
|
||||
font-size: 0.68rem;
|
||||
font-weight: 800;
|
||||
}
|
||||
|
||||
.tab.router-link-active {
|
||||
color: var(--accent-deep);
|
||||
background: var(--accent-subtle);
|
||||
}
|
||||
|
||||
@media (max-width: 860px) {
|
||||
.adm-shell {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.sidebar {
|
||||
border-inline-end: 0;
|
||||
border-bottom: 1px solid var(--line);
|
||||
padding-bottom: 0.75rem;
|
||||
.desktop-only {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.nav {
|
||||
grid-template-columns: repeat(4, 1fr);
|
||||
flex: none;
|
||||
.mobile-only {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.nav-item {
|
||||
justify-content: center;
|
||||
font-size: 0.8rem;
|
||||
}
|
||||
|
||||
.side-foot {
|
||||
grid-template-columns: 1fr auto;
|
||||
align-items: center;
|
||||
.topbar {
|
||||
padding: 0.75rem 0.9rem;
|
||||
border-bottom: 1px solid var(--line-light);
|
||||
}
|
||||
|
||||
.main {
|
||||
padding: 1rem 0.9rem 1.6rem;
|
||||
padding: 0.75rem 0.9rem calc(1.2rem + env(safe-area-inset-bottom));
|
||||
}
|
||||
|
||||
.tabbar {
|
||||
display: grid;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -125,10 +125,7 @@ onMounted(() => {
|
||||
<template>
|
||||
<div class="page">
|
||||
<header class="head">
|
||||
<div>
|
||||
<h1>سوپرادمینها</h1>
|
||||
<p>افزودن ادمین با موبایل و رمز ثابت، فعال/غیرفعال و ریست رمز.</p>
|
||||
</div>
|
||||
<p class="lead">افزودن سوپرادمین با موبایل، فعال/غیرفعال و ریست رمز.</p>
|
||||
<button class="btn" type="button" @click="showCreate = !showCreate">
|
||||
{{ showCreate ? 'بستن فرم' : 'ادمین جدید' }}
|
||||
</button>
|
||||
@@ -234,26 +231,24 @@ onMounted(() => {
|
||||
<style scoped>
|
||||
.page {
|
||||
display: grid;
|
||||
gap: 1rem;
|
||||
max-width: 1040px;
|
||||
gap: 0.95rem;
|
||||
max-width: 1080px;
|
||||
}
|
||||
|
||||
.head {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
gap: 1rem;
|
||||
gap: 0.85rem;
|
||||
flex-wrap: wrap;
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
.head h1 {
|
||||
margin: 0 0 0.3rem;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.lead,
|
||||
.head p,
|
||||
.muted {
|
||||
margin: 0;
|
||||
color: var(--muted);
|
||||
font-size: 0.88rem;
|
||||
}
|
||||
|
||||
.error {
|
||||
@@ -270,10 +265,11 @@ onMounted(() => {
|
||||
.reset-panel {
|
||||
background: #fff;
|
||||
border: 1px solid #eef2f7;
|
||||
border-radius: 14px;
|
||||
border-radius: 18px;
|
||||
padding: 1rem;
|
||||
display: grid;
|
||||
gap: 0.85rem;
|
||||
box-shadow: 0 10px 28px rgba(15, 23, 42, 0.04);
|
||||
}
|
||||
|
||||
.panel h2 {
|
||||
@@ -319,11 +315,12 @@ input {
|
||||
.row {
|
||||
background: #fff;
|
||||
border: 1px solid #eef2f7;
|
||||
border-radius: 14px;
|
||||
padding: 0.85rem 1rem;
|
||||
border-radius: 18px;
|
||||
padding: 0.95rem 1rem;
|
||||
display: grid;
|
||||
grid-template-columns: minmax(0, 1fr) auto;
|
||||
gap: 0.7rem 1rem;
|
||||
box-shadow: 0 8px 22px rgba(15, 23, 42, 0.035);
|
||||
}
|
||||
|
||||
.row-main {
|
||||
|
||||
@@ -19,10 +19,8 @@ async function load() {
|
||||
try {
|
||||
const { data } = await platformApi.get<PlatformStatsDto>('/platform/stats');
|
||||
stats.value = data;
|
||||
} catch (e) {
|
||||
error.value = axios.isAxiosError(e)
|
||||
? 'بارگذاری آمار ناموفق بود'
|
||||
: 'بارگذاری آمار ناموفق بود';
|
||||
} catch {
|
||||
error.value = 'بارگذاری آمار ناموفق بود';
|
||||
} finally {
|
||||
loading.value = false;
|
||||
}
|
||||
@@ -35,99 +33,146 @@ onMounted(() => {
|
||||
|
||||
<template>
|
||||
<div class="page">
|
||||
<header class="head">
|
||||
<div>
|
||||
<section class="hero">
|
||||
<div class="hero-copy">
|
||||
<p class="eyebrow">سوپرادمین</p>
|
||||
<h1>سلام {{ platform.admin?.fullName || '' }}</h1>
|
||||
<p class="lead">نمای کلی حسابها و محیطهای ثبتشده روی پلتفرم.</p>
|
||||
<h2>سلام {{ platform.admin?.fullName || '' }}</h2>
|
||||
<p class="lead">امروز وضعیت حسابها، اشتراکها و ماژولها را از اینجا کنترل کنید.</p>
|
||||
</div>
|
||||
</header>
|
||||
<div class="hero-orb" aria-hidden="true" />
|
||||
</section>
|
||||
|
||||
<p v-if="error" class="error">{{ error }}</p>
|
||||
<p v-else-if="loading" class="muted">در حال بارگذاری…</p>
|
||||
|
||||
<div v-else-if="stats" class="kpis">
|
||||
<article class="kpi">
|
||||
<span class="ico"><UiIcon name="building" :size="20" /></span>
|
||||
<p>محیطها</p>
|
||||
<strong>{{ toFaDigits(stats.organizationCount) }}</strong>
|
||||
<small>{{ toFaDigits(stats.activeOrganizationCount) }} فعال</small>
|
||||
<span class="ico"><UiIcon name="building" :size="18" /></span>
|
||||
<div>
|
||||
<p>محیطها</p>
|
||||
<strong>{{ toFaDigits(stats.organizationCount) }}</strong>
|
||||
<small>{{ toFaDigits(stats.activeOrganizationCount) }} فعال</small>
|
||||
</div>
|
||||
</article>
|
||||
<article class="kpi">
|
||||
<span class="ico"><UiIcon name="users" :size="20" /></span>
|
||||
<p>کاربران</p>
|
||||
<strong>{{ toFaDigits(stats.userCount) }}</strong>
|
||||
<small>{{ toFaDigits(stats.activeUserCount) }} فعال</small>
|
||||
<span class="ico"><UiIcon name="users" :size="18" /></span>
|
||||
<div>
|
||||
<p>کاربران</p>
|
||||
<strong>{{ toFaDigits(stats.userCount) }}</strong>
|
||||
<small>{{ toFaDigits(stats.activeUserCount) }} فعال</small>
|
||||
</div>
|
||||
</article>
|
||||
<article class="kpi">
|
||||
<span class="ico"><UiIcon name="layers" :size="20" /></span>
|
||||
<p>عضویتها</p>
|
||||
<strong>{{ toFaDigits(stats.membershipCount) }}</strong>
|
||||
<small>نقش در محیطها</small>
|
||||
<span class="ico"><UiIcon name="layers" :size="18" /></span>
|
||||
<div>
|
||||
<p>عضویتها</p>
|
||||
<strong>{{ toFaDigits(stats.membershipCount) }}</strong>
|
||||
<small>نقش در محیطها</small>
|
||||
</div>
|
||||
</article>
|
||||
<article class="kpi warn">
|
||||
<span class="ico"><UiIcon name="clock" :size="20" /></span>
|
||||
<p>در آستانه انقضا</p>
|
||||
<strong>{{ toFaDigits(stats.expiringSoonCount ?? 0) }}</strong>
|
||||
<small>کمتر از ۳ روز</small>
|
||||
<span class="ico"><UiIcon name="clock" :size="18" /></span>
|
||||
<div>
|
||||
<p>نزدیک انقضا</p>
|
||||
<strong>{{ toFaDigits(stats.expiringSoonCount ?? 0) }}</strong>
|
||||
<small>کمتر از ۳ روز</small>
|
||||
</div>
|
||||
</article>
|
||||
<article class="kpi danger">
|
||||
<span class="ico"><UiIcon name="warning" :size="20" /></span>
|
||||
<p>منقضی</p>
|
||||
<strong>{{ toFaDigits(stats.expiredBillingCount ?? 0) }}</strong>
|
||||
<small>نیاز به تمدید</small>
|
||||
<span class="ico"><UiIcon name="warning" :size="18" /></span>
|
||||
<div>
|
||||
<p>منقضی</p>
|
||||
<strong>{{ toFaDigits(stats.expiredBillingCount ?? 0) }}</strong>
|
||||
<small>نیاز به تمدید</small>
|
||||
</div>
|
||||
</article>
|
||||
</div>
|
||||
|
||||
<div class="shortcuts">
|
||||
<RouterLink :to="{ name: 'adm-organizations' }" class="card">
|
||||
<UiIcon name="building" :size="18" />
|
||||
<div>
|
||||
<strong>مدیریت محیطها</strong>
|
||||
<span>ساخت، ویرایش و فعال/غیرفعال کردن سازمانها</span>
|
||||
</div>
|
||||
</RouterLink>
|
||||
<RouterLink :to="{ name: 'adm-users' }" class="card">
|
||||
<UiIcon name="users" :size="18" />
|
||||
<div>
|
||||
<strong>مدیریت کاربران</strong>
|
||||
<span>نقش، دسترسی و ریست رمز عبور</span>
|
||||
</div>
|
||||
</RouterLink>
|
||||
<RouterLink :to="{ name: 'adm-admins' }" class="card">
|
||||
<UiIcon name="lock" :size="18" />
|
||||
<div>
|
||||
<strong>سوپرادمینها</strong>
|
||||
<span>افزودن ادمین با موبایل و رمز</span>
|
||||
</div>
|
||||
</RouterLink>
|
||||
</div>
|
||||
<section class="actions">
|
||||
<h3>میانبرها</h3>
|
||||
<div class="shortcuts">
|
||||
<RouterLink :to="{ name: 'adm-organizations' }" class="card">
|
||||
<span class="card-ico mint"><UiIcon name="building" :size="18" /></span>
|
||||
<div>
|
||||
<strong>محیطها</strong>
|
||||
<span>ساخت، ماژول و فعال/غیرفعال</span>
|
||||
</div>
|
||||
<UiIcon name="chevron" :size="16" class="go" />
|
||||
</RouterLink>
|
||||
<RouterLink :to="{ name: 'adm-users' }" class="card">
|
||||
<span class="card-ico violet"><UiIcon name="users" :size="18" /></span>
|
||||
<div>
|
||||
<strong>کاربران</strong>
|
||||
<span>اشتراک مالک، نقش و ریست رمز</span>
|
||||
</div>
|
||||
<UiIcon name="chevron" :size="16" class="go" />
|
||||
</RouterLink>
|
||||
<RouterLink :to="{ name: 'adm-admins' }" class="card">
|
||||
<span class="card-ico peach"><UiIcon name="lock" :size="18" /></span>
|
||||
<div>
|
||||
<strong>ادمینها</strong>
|
||||
<span>افزودن سوپرادمین با موبایل</span>
|
||||
</div>
|
||||
<UiIcon name="chevron" :size="16" class="go" />
|
||||
</RouterLink>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.page {
|
||||
display: grid;
|
||||
gap: 1.2rem;
|
||||
max-width: 980px;
|
||||
gap: 1.15rem;
|
||||
max-width: 1080px;
|
||||
}
|
||||
|
||||
.head h1 {
|
||||
margin: 0.15rem 0 0.35rem;
|
||||
font-size: 1.45rem;
|
||||
.hero {
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
border-radius: 22px;
|
||||
padding: 1.25rem 1.3rem;
|
||||
background:
|
||||
linear-gradient(135deg, rgba(20, 184, 166, 0.16), rgba(255, 255, 255, 0.92) 55%),
|
||||
#fff;
|
||||
border: 1px solid color-mix(in srgb, var(--accent) 16%, white);
|
||||
box-shadow: 0 14px 36px rgba(15, 23, 42, 0.05);
|
||||
}
|
||||
|
||||
.hero-copy {
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
max-width: 34rem;
|
||||
}
|
||||
|
||||
.eyebrow {
|
||||
margin: 0;
|
||||
color: var(--accent-deep);
|
||||
font-size: 0.78rem;
|
||||
font-weight: 800;
|
||||
font-size: 0.75rem;
|
||||
font-weight: 900;
|
||||
}
|
||||
|
||||
.hero h2 {
|
||||
margin: 0.25rem 0 0.35rem;
|
||||
font-size: clamp(1.35rem, 2.4vw, 1.7rem);
|
||||
letter-spacing: -0.02em;
|
||||
}
|
||||
|
||||
.lead,
|
||||
.muted {
|
||||
margin: 0;
|
||||
color: var(--muted);
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
.hero-orb {
|
||||
position: absolute;
|
||||
inset-inline-end: -40px;
|
||||
top: -50px;
|
||||
width: 180px;
|
||||
height: 180px;
|
||||
border-radius: 50%;
|
||||
background: radial-gradient(circle, rgba(45, 212, 191, 0.35), transparent 70%);
|
||||
}
|
||||
|
||||
.error {
|
||||
@@ -138,79 +183,134 @@ onMounted(() => {
|
||||
.kpis {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(5, minmax(0, 1fr));
|
||||
gap: 0.85rem;
|
||||
}
|
||||
|
||||
.kpi.warn .ico {
|
||||
background: color-mix(in srgb, #f59e0b 18%, white);
|
||||
color: #b45309;
|
||||
}
|
||||
|
||||
.kpi.danger .ico {
|
||||
background: color-mix(in srgb, var(--danger) 14%, white);
|
||||
color: var(--danger);
|
||||
gap: 0.75rem;
|
||||
}
|
||||
|
||||
.kpi {
|
||||
display: flex;
|
||||
gap: 0.75rem;
|
||||
align-items: flex-start;
|
||||
background: #fff;
|
||||
border: 1px solid #eef2f7;
|
||||
border-radius: 14px;
|
||||
padding: 1rem 1.05rem;
|
||||
box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
|
||||
border-radius: 18px;
|
||||
padding: 0.95rem;
|
||||
box-shadow: 0 10px 28px rgba(15, 23, 42, 0.04);
|
||||
}
|
||||
|
||||
.kpi p,
|
||||
.kpi small {
|
||||
margin: 0;
|
||||
color: var(--muted);
|
||||
font-size: 0.82rem;
|
||||
font-size: 0.78rem;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.kpi strong {
|
||||
display: block;
|
||||
margin: 0.2rem 0 0.15rem;
|
||||
font-size: 1.55rem;
|
||||
margin: 0.15rem 0;
|
||||
font-size: 1.4rem;
|
||||
letter-spacing: -0.02em;
|
||||
}
|
||||
|
||||
.ico {
|
||||
display: grid;
|
||||
place-items: center;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
margin-bottom: 0.55rem;
|
||||
border-radius: 10px;
|
||||
flex: 0 0 auto;
|
||||
width: 38px;
|
||||
height: 38px;
|
||||
border-radius: 12px;
|
||||
background: var(--accent-subtle);
|
||||
color: var(--accent-deep);
|
||||
}
|
||||
|
||||
.kpi.warn .ico {
|
||||
background: var(--warning-soft);
|
||||
color: var(--warning-deep);
|
||||
}
|
||||
|
||||
.kpi.danger .ico {
|
||||
background: var(--danger-soft);
|
||||
color: var(--danger);
|
||||
}
|
||||
|
||||
.actions h3 {
|
||||
margin: 0 0 0.65rem;
|
||||
font-size: 0.95rem;
|
||||
}
|
||||
|
||||
.shortcuts {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, minmax(0, 1fr));
|
||||
gap: 0.85rem;
|
||||
gap: 0.65rem;
|
||||
}
|
||||
|
||||
.card {
|
||||
display: flex;
|
||||
display: grid;
|
||||
grid-template-columns: auto minmax(0, 1fr) auto;
|
||||
align-items: center;
|
||||
gap: 0.8rem;
|
||||
padding: 1rem 1.05rem;
|
||||
gap: 0.85rem;
|
||||
padding: 0.95rem 1rem;
|
||||
background: #fff;
|
||||
border: 1px solid var(--line);
|
||||
border-radius: 14px;
|
||||
border: 1px solid var(--line-light);
|
||||
border-radius: 18px;
|
||||
text-decoration: none;
|
||||
color: inherit;
|
||||
box-shadow: 0 8px 22px rgba(15, 23, 42, 0.04);
|
||||
transition: transform 0.15s ease, box-shadow 0.15s ease;
|
||||
}
|
||||
|
||||
.card:hover {
|
||||
transform: translateY(-1px);
|
||||
box-shadow: 0 14px 28px rgba(15, 23, 42, 0.07);
|
||||
}
|
||||
|
||||
.card span {
|
||||
display: block;
|
||||
color: var(--muted);
|
||||
font-size: 0.82rem;
|
||||
font-size: 0.8rem;
|
||||
margin-top: 0.15rem;
|
||||
}
|
||||
|
||||
@media (max-width: 720px) {
|
||||
.kpis,
|
||||
.shortcuts {
|
||||
.card-ico {
|
||||
display: grid;
|
||||
place-items: center;
|
||||
width: 42px;
|
||||
height: 42px;
|
||||
border-radius: 14px;
|
||||
}
|
||||
|
||||
.card-ico.mint {
|
||||
background: var(--accent-subtle);
|
||||
color: var(--accent-deep);
|
||||
}
|
||||
|
||||
.card-ico.violet {
|
||||
background: #f3e8ff;
|
||||
color: #7c3aed;
|
||||
}
|
||||
|
||||
.card-ico.peach {
|
||||
background: #ffedd5;
|
||||
color: #c2410c;
|
||||
}
|
||||
|
||||
.go {
|
||||
color: var(--muted-light);
|
||||
}
|
||||
|
||||
@media (max-width: 980px) {
|
||||
.kpis {
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 560px) {
|
||||
.kpis {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.hero {
|
||||
border-radius: 18px;
|
||||
padding: 1.1rem;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -285,10 +285,7 @@ onMounted(() => {
|
||||
<template>
|
||||
<div class="page">
|
||||
<header class="head">
|
||||
<div>
|
||||
<h1>محیطها</h1>
|
||||
<p>ساخت، ویرایش و فعال/غیرفعال کردن سازمانها و نقش اعضا.</p>
|
||||
</div>
|
||||
<p class="lead">ساخت، ویرایش، ماژولها و نقش اعضا.</p>
|
||||
<div class="head-actions">
|
||||
<form class="search" @submit.prevent="load">
|
||||
<input v-model="query" type="search" placeholder="جستجوی نام یا اسلاگ" />
|
||||
@@ -488,37 +485,41 @@ onMounted(() => {
|
||||
<style scoped>
|
||||
.page {
|
||||
display: grid;
|
||||
gap: 1rem;
|
||||
max-width: 1040px;
|
||||
gap: 0.95rem;
|
||||
max-width: 1080px;
|
||||
}
|
||||
|
||||
.head {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
gap: 1rem;
|
||||
gap: 0.85rem;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.head h1 {
|
||||
margin: 0 0 0.3rem;
|
||||
}
|
||||
|
||||
.lead,
|
||||
.head p,
|
||||
.muted {
|
||||
margin: 0;
|
||||
color: var(--muted);
|
||||
font-size: 0.88rem;
|
||||
}
|
||||
|
||||
.head-actions {
|
||||
display: flex;
|
||||
gap: 0.6rem;
|
||||
gap: 0.55rem;
|
||||
flex-wrap: wrap;
|
||||
align-items: flex-start;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.search {
|
||||
display: flex;
|
||||
gap: 0.5rem;
|
||||
gap: 0.45rem;
|
||||
padding: 0.25rem;
|
||||
border-radius: 14px;
|
||||
background: #fff;
|
||||
border: 1px solid var(--line-light);
|
||||
box-shadow: 0 6px 18px rgba(15, 23, 42, 0.04);
|
||||
}
|
||||
|
||||
.search input,
|
||||
@@ -528,14 +529,16 @@ onMounted(() => {
|
||||
.edit-panel select,
|
||||
.member-actions select {
|
||||
border: 1px solid var(--line);
|
||||
border-radius: var(--radius);
|
||||
padding: 0.65rem 0.8rem;
|
||||
border-radius: 12px;
|
||||
padding: 0.6rem 0.75rem;
|
||||
font: inherit;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.search input {
|
||||
min-width: 220px;
|
||||
min-width: 180px;
|
||||
border: 0;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.error {
|
||||
@@ -552,10 +555,11 @@ onMounted(() => {
|
||||
.edit-panel {
|
||||
background: #fff;
|
||||
border: 1px solid #eef2f7;
|
||||
border-radius: 14px;
|
||||
border-radius: 18px;
|
||||
padding: 1rem;
|
||||
display: grid;
|
||||
gap: 0.85rem;
|
||||
box-shadow: 0 10px 28px rgba(15, 23, 42, 0.04);
|
||||
}
|
||||
|
||||
.panel h2 {
|
||||
@@ -593,11 +597,12 @@ label span {
|
||||
.row {
|
||||
background: #fff;
|
||||
border: 1px solid #eef2f7;
|
||||
border-radius: 14px;
|
||||
padding: 0.85rem 1rem;
|
||||
border-radius: 18px;
|
||||
padding: 0.95rem 1rem;
|
||||
display: grid;
|
||||
grid-template-columns: minmax(0, 1fr) auto;
|
||||
gap: 0.7rem 1rem;
|
||||
box-shadow: 0 8px 22px rgba(15, 23, 42, 0.035);
|
||||
}
|
||||
|
||||
.row-main {
|
||||
@@ -726,5 +731,18 @@ label span {
|
||||
.edit-panel {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.search {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.search input {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.row {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -158,10 +158,7 @@ onMounted(() => {
|
||||
<template>
|
||||
<div class="page">
|
||||
<header class="head">
|
||||
<div>
|
||||
<h1>کاربران</h1>
|
||||
<p>فعال/غیرفعال حساب، نقش عضویت و ریست رمز عبور.</p>
|
||||
</div>
|
||||
<p class="lead">اشتراک مالک، نقش عضویت و ریست رمز.</p>
|
||||
<form class="search" @submit.prevent="load">
|
||||
<input v-model="query" type="search" placeholder="نام، ایمیل یا موبایل" />
|
||||
<button class="btn" type="submit" :disabled="loading">جستجو</button>
|
||||
@@ -230,15 +227,15 @@ onMounted(() => {
|
||||
</form>
|
||||
|
||||
<div v-if="openId === user.id" class="detail">
|
||||
<div class="billing">
|
||||
<strong>اشتراک</strong>
|
||||
<div v-if="user.isBillingOwner" class="billing">
|
||||
<strong>اشتراک مالک</strong>
|
||||
<p v-if="user.billing" class="muted">
|
||||
{{ BILLING_PLAN_LABELS[user.billing.planCode] }}
|
||||
· {{ user.billing.status }}
|
||||
· {{ toFaDigits(user.billing.daysRemaining) }} روز
|
||||
· سقف محیط {{ toFaDigits(user.billing.maxOrganizations) }}
|
||||
</p>
|
||||
<p v-else class="muted">هنوز اشتراک ثبت نشده — با اعمال پلن ساخته میشود.</p>
|
||||
<p v-else class="muted">هنوز پلن ندارد — یکی از پلنها را اعمال کنید.</p>
|
||||
<div class="plan-row">
|
||||
<button
|
||||
v-for="code in BILLING_PLAN_CODES.filter((c) => c !== 'custom')"
|
||||
@@ -252,6 +249,9 @@ onMounted(() => {
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<p v-else class="muted billing-skip">
|
||||
این کاربر عضو زیرمجموعه است و اشتراک جدا ندارد؛ اشتراک روی مالک محیط است.
|
||||
</p>
|
||||
|
||||
<p v-if="!user.memberships.length" class="muted">عضو هیچ محیطی نیست.</p>
|
||||
<ul v-else>
|
||||
@@ -298,44 +298,50 @@ onMounted(() => {
|
||||
<style scoped>
|
||||
.page {
|
||||
display: grid;
|
||||
gap: 1rem;
|
||||
max-width: 1040px;
|
||||
gap: 0.95rem;
|
||||
max-width: 1080px;
|
||||
}
|
||||
|
||||
.head {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
gap: 1rem;
|
||||
gap: 0.85rem;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.head h1 {
|
||||
margin: 0 0 0.3rem;
|
||||
}
|
||||
|
||||
.lead,
|
||||
.head p,
|
||||
.muted {
|
||||
margin: 0;
|
||||
color: var(--muted);
|
||||
font-size: 0.88rem;
|
||||
}
|
||||
|
||||
.search {
|
||||
display: flex;
|
||||
gap: 0.5rem;
|
||||
gap: 0.45rem;
|
||||
padding: 0.25rem;
|
||||
border-radius: 14px;
|
||||
background: #fff;
|
||||
border: 1px solid var(--line-light);
|
||||
box-shadow: 0 6px 18px rgba(15, 23, 42, 0.04);
|
||||
}
|
||||
|
||||
.search input,
|
||||
.reset-panel input,
|
||||
.member-actions select {
|
||||
border: 1px solid var(--line);
|
||||
border-radius: var(--radius);
|
||||
padding: 0.65rem 0.8rem;
|
||||
border-radius: 12px;
|
||||
padding: 0.6rem 0.75rem;
|
||||
font: inherit;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.search input {
|
||||
min-width: 220px;
|
||||
min-width: 180px;
|
||||
border: 0;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.error {
|
||||
@@ -356,11 +362,12 @@ onMounted(() => {
|
||||
.row {
|
||||
background: #fff;
|
||||
border: 1px solid #eef2f7;
|
||||
border-radius: 14px;
|
||||
padding: 0.85rem 1rem;
|
||||
border-radius: 18px;
|
||||
padding: 0.95rem 1rem;
|
||||
display: grid;
|
||||
grid-template-columns: minmax(0, 1fr) auto;
|
||||
gap: 0.7rem 1rem;
|
||||
box-shadow: 0 8px 22px rgba(15, 23, 42, 0.035);
|
||||
}
|
||||
|
||||
.row-main {
|
||||
@@ -480,6 +487,10 @@ onMounted(() => {
|
||||
gap: 0.4rem;
|
||||
}
|
||||
|
||||
.billing-skip {
|
||||
margin: 0 0 0.75rem;
|
||||
}
|
||||
|
||||
.member-actions {
|
||||
display: flex;
|
||||
gap: 0.45rem;
|
||||
|
||||
@@ -37,7 +37,10 @@ export interface AuthUserDto {
|
||||
organizationId: string;
|
||||
organizationName?: string;
|
||||
hasAvatar?: boolean;
|
||||
/** مالک محیط فعلی — اشتراک متعلق به مالک است نه عضو زیرمجموعه */
|
||||
isOrgOwner?: boolean;
|
||||
enabledModules?: OrgModuleKey[];
|
||||
/** خلاصه اشتراک مالک محیط (برای اعضا فقط جهت نمایش/گیت ورود) */
|
||||
subscription?: SubscriptionSummaryDto | null;
|
||||
}
|
||||
|
||||
@@ -2814,6 +2817,8 @@ export interface PlatformUserDto {
|
||||
lastLoginAt?: string | null;
|
||||
createdAt: string;
|
||||
memberships: PlatformUserMembershipDto[];
|
||||
/** فقط اگر حداقل یک عضویت مالک فعال دارد */
|
||||
isBillingOwner?: boolean;
|
||||
billing?: BillingAccountDto | null;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user