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
This commit is contained in:
@@ -2,19 +2,23 @@
|
||||
|
||||
import type { ReactElement } from "react";
|
||||
|
||||
import { isAgentOperator, isSiteAdminOperator } from "@/lib/admin-session-variants";
|
||||
import { AgentDashboardConsole } from "@/modules/dashboard/agent-dashboard-console";
|
||||
import { DashboardConsole } from "@/modules/dashboard/dashboard-console";
|
||||
import { SiteDashboardConsole } from "@/modules/dashboard/site-dashboard-console";
|
||||
import { useAdminProfile } from "@/stores/admin-session";
|
||||
|
||||
/** 平台账号走全站仪表盘;绑定代理节点的经营账号走代理仪表盘。 */
|
||||
/** 超管/平台账号走全站仪表盘;站点管理员走站点仪表盘;代理经营账号走代理仪表盘。 */
|
||||
export function DashboardPageClient(): ReactElement {
|
||||
const profile = useAdminProfile();
|
||||
const isAgentOperator =
|
||||
profile?.agent != null && profile.is_super_admin !== true;
|
||||
|
||||
if (isAgentOperator) {
|
||||
if (isAgentOperator(profile)) {
|
||||
return <AgentDashboardConsole />;
|
||||
}
|
||||
|
||||
if (isSiteAdminOperator(profile)) {
|
||||
return <SiteDashboardConsole />;
|
||||
}
|
||||
|
||||
return <DashboardConsole />;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user