Files
lotteryAdmin/src/lib/admin-session-variants.ts
kang 6ea0a6feec feat(agents, config, dashboard, i18n): add agent line provision wizard, site deletion, and site dashboard with multi-language support
Added agent line provision wizard page with permission gating, replacing redirect placeholder. Introduced site deletion API and UI with confirmation dialog in integration sites management. Added new site-scoped dashboard panel showing bet metrics, P/L trends, active players, and quick links. Enhanced chart tooltip to support custom formatters and fix indicator color
2026-06-12 20:47:53 +08:00

12 lines
514 B
TypeScript

import type { AdminProfile } from "@/types/api/admin-auth";
/** 绑定代理节点的经营账号(非超管)。 */
export function isAgentOperator(profile: AdminProfile | null | undefined): boolean {
return profile?.agent != null && profile.is_super_admin !== true;
}
/** 平台站点管理员(绑定 site_admin 角色、无代理节点)。 */
export function isSiteAdminOperator(profile: AdminProfile | null | undefined): boolean {
return profile?.site != null && profile.is_super_admin !== true;
}