修改文案
This commit is contained in:
parent
68ef0dfee3
commit
fb168822cc
@ -325,7 +325,7 @@ test("routes databi social page to Social BI and loads real overview rows", asyn
|
||||
// v2 Shell:主视图容器 + 侧栏五个视图 tab,默认选中“经营概览”。
|
||||
expect(screen.getByLabelText("Social BI 数据中心")).toBeTruthy();
|
||||
const viewTabs = screen.getByRole("tablist", { name: "数据视图" });
|
||||
["经营概览", "地区洞察", "人员绩效", "留存质量", "数据明细"].forEach((name) => {
|
||||
["经营概览", "地区洞察", "运营中心", "留存质量", "数据明细"].forEach((name) => {
|
||||
expect(within(viewTabs).getByRole("tab", { name })).toBeTruthy();
|
||||
});
|
||||
expect(within(viewTabs).getByRole("tab", { name: "经营概览" })).toHaveAttribute("aria-selected", "true");
|
||||
@ -352,11 +352,11 @@ test("routes databi social page to Social BI and loads real overview rows", asyn
|
||||
expect(screen.getAllByText("中东大区").length).toBeGreaterThan(0);
|
||||
expect(screen.getAllByText("$50").length).toBeGreaterThan(0);
|
||||
|
||||
// 侧栏切换:人员绩效 —— 运营人员 Omar 上榜、达成率 90.0%、kpi_manage 时有配置目标入口。
|
||||
// 侧栏切换:运营中心 —— 运营人员 Omar 上榜、达成率 90.0%、kpi_manage 时有配置目标入口。
|
||||
await act(async () => {
|
||||
within(viewTabs).getByRole("tab", { name: "人员绩效" }).click();
|
||||
within(viewTabs).getByRole("tab", { name: "运营中心" }).click();
|
||||
});
|
||||
expect(within(viewTabs).getByRole("tab", { name: "人员绩效" })).toHaveAttribute("aria-selected", "true");
|
||||
expect(within(viewTabs).getByRole("tab", { name: "运营中心" })).toHaveAttribute("aria-selected", "true");
|
||||
expect(screen.getAllByText("Omar").length).toBeGreaterThan(0);
|
||||
expect(screen.getAllByText("90.0%").length).toBeGreaterThan(0);
|
||||
expect(screen.getByRole("button", { name: "配置目标" })).toBeTruthy();
|
||||
|
||||
@ -30,7 +30,7 @@ import "../styles/social-v2.css";
|
||||
const VIEWS = [
|
||||
{ component: OverviewView, icon: InsightsOutlined, key: "overview", label: "经营概览" },
|
||||
{ component: RegionsView, icon: PublicOutlined, key: "regions", label: "地区洞察" },
|
||||
{ component: TeamKpiView, icon: GroupsOutlined, key: "team", label: "人员绩效" },
|
||||
{ component: TeamKpiView, icon: GroupsOutlined, key: "team", label: "运营中心" },
|
||||
{ component: RetentionView, icon: RepeatOutlined, key: "retention", label: "留存质量" },
|
||||
{ component: DataTableView, icon: TableChartOutlined, key: "table", label: "数据明细" }
|
||||
];
|
||||
|
||||
@ -90,7 +90,7 @@ export function useSocialBiData(filters) {
|
||||
});
|
||||
} else {
|
||||
setKpi(null);
|
||||
nextErrors.push(`KPI 数据加载失败: ${kpiResult.reason?.message || "未知错误"}`);
|
||||
nextErrors.push(`充值目标数据加载失败: ${kpiResult.reason?.message || "未知错误"}`);
|
||||
}
|
||||
setErrors(nextErrors);
|
||||
setIsLoading(false);
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// TeamKpiView:人员绩效视图。kpi_view_all 用户看团队排行,普通运营看"我的 KPI"。
|
||||
// TeamKpiView:运营中心视图。kpi_view_all 用户看团队排行,普通运营看"我的充值"。
|
||||
// 数据契约见 SocialBiApp.jsx 的 useSocialBi():金额为 USD 分、比例为 0-1 小数、缺失为 null(显示 "--")。
|
||||
|
||||
import { useMemo, useState } from "react";
|
||||
@ -161,7 +161,7 @@ export function TeamKpiView() {
|
||||
return isLoading ? <KpiSkeleton /> : (
|
||||
<section className="sbi-card">
|
||||
<div className="sbi-empty">
|
||||
<strong>暂无 KPI 数据</strong>
|
||||
<strong>暂无充值数据</strong>
|
||||
<span>先在用户管理为运营人员分配 App/区域数据范围</span>
|
||||
</div>
|
||||
</section>
|
||||
@ -186,7 +186,7 @@ export function TeamKpiView() {
|
||||
<section className="sbi-kpi-hero">
|
||||
<article className="sbi-card sbi-kpi-hero-main">
|
||||
<div className="sbi-card-header">
|
||||
<strong>{canViewAll ? "团队 KPI" : "我的 KPI"}</strong>
|
||||
<strong>{canViewAll ? "团队充值" : "我的充值"}</strong>
|
||||
<small>本月充值目标进度 · {kpi.period_month}</small>
|
||||
{!canViewAll ? <span className="sbi-badge">仅展示我负责的范围</span> : null}
|
||||
</div>
|
||||
@ -239,7 +239,7 @@ export function TeamKpiView() {
|
||||
|
||||
<section className="sbi-card sbi-kpi-board">
|
||||
<div className="sbi-card-header">
|
||||
<strong>绩效排行</strong>
|
||||
<strong>充值排行</strong>
|
||||
<small>
|
||||
{kpi.period_month} · {formatCount(summary.operator_count)} 名运营
|
||||
</small>
|
||||
@ -486,7 +486,7 @@ function PersonTable({ appCodes, remainingDays, rows }) {
|
||||
<span className="sbi-metric-hint" title="本自然月至今负责范围的充值合计(USD)">当月充值</span>
|
||||
</th>
|
||||
<th>
|
||||
<span className="sbi-metric-hint" title="本月充值目标(USD),由 KPI 管理员配置">月目标</span>
|
||||
<span className="sbi-metric-hint" title="本月充值目标(USD),由管理员配置">月目标</span>
|
||||
</th>
|
||||
<th>
|
||||
<span className="sbi-metric-hint" title="当月充值 / 月目标">达成率</span>
|
||||
@ -695,10 +695,10 @@ function KpiTargetDrawer({ appCodes, kpi, onClose, onSaved }) {
|
||||
|
||||
return (
|
||||
<div className="sbi-kpi-drawer-mask" onClick={onClose} role="presentation">
|
||||
<aside aria-label="配置 KPI 目标" className="sbi-kpi-drawer" onClick={(event) => event.stopPropagation()} role="dialog">
|
||||
<aside aria-label="配置充值目标" className="sbi-kpi-drawer" onClick={(event) => event.stopPropagation()} role="dialog">
|
||||
<header className="sbi-kpi-drawer-header">
|
||||
<div className="sbi-kpi-drawer-title">
|
||||
<strong>配置充值 KPI 目标</strong>
|
||||
<strong>配置充值目标</strong>
|
||||
<small>{kpi.period_month} · App 总目标 / 运营×App / 运营×App×区域 三级 · 月/日目标填 0 表示清除</small>
|
||||
</div>
|
||||
<button aria-label="关闭" className="sbi-kpi-drawer-close" onClick={onClose} type="button">
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user