refactor: 菜单栏角色化降噪(role-based-navigation-simplification)
这个提交包含在:
@@ -11,7 +11,7 @@ import { toast } from "sonner";
|
||||
const MODULE_LABELS: Record<string, string> = {
|
||||
portal: "工作台",
|
||||
team: "团队",
|
||||
leaveRequests: "请假",
|
||||
leaveRequests: "请假记录",
|
||||
attendance: "考勤",
|
||||
reimbursements: "报销",
|
||||
assets: "资产",
|
||||
@@ -24,31 +24,31 @@ const MODULE_LABELS: Record<string, string> = {
|
||||
organization: "组织架构",
|
||||
contractsRegistry: "合同台账",
|
||||
workflowDefinitions: "流程定义",
|
||||
systemSettings: "系统设置",
|
||||
featureFlags: "功能开关",
|
||||
systemSettings: "管理",
|
||||
featureFlags: "功能管理",
|
||||
auditLogs: "审计日志",
|
||||
approvalRules: "审批规则",
|
||||
userManagement: "用户管理",
|
||||
departments: "部门管理",
|
||||
masterData: "主数据",
|
||||
notificationChannels: "通知渠道",
|
||||
workflowTasks: "审批待办",
|
||||
workflowTasks: "待我处理",
|
||||
dashboard: "仪表盘",
|
||||
purchaseRequests: "采购申请",
|
||||
travelRequests: "差旅申请",
|
||||
budgets: "预算管理",
|
||||
paymentBatches: "付款批次",
|
||||
apOperations: "AP 运营",
|
||||
invoicePool: "票据中心",
|
||||
paymentBatches: "付款",
|
||||
apOperations: "应付账款",
|
||||
invoicePool: "票据",
|
||||
inventoryChecks: "资产盘点",
|
||||
cutover: "切换控制台",
|
||||
erpIntegrations: "ERP 集成",
|
||||
erpIntegrations: "外部系统",
|
||||
profile: "个人设置",
|
||||
};
|
||||
|
||||
const VISIBILITY_OPTIONS = [
|
||||
{ value: "main", label: "主导航" },
|
||||
{ value: "admin", label: "管理区" },
|
||||
{ value: "main", label: "常用入口" },
|
||||
{ value: "admin", label: "管理与更多" },
|
||||
{ value: "hidden", label: "隐藏" },
|
||||
] as const;
|
||||
|
||||
@@ -101,7 +101,7 @@ export function WorkspaceSetupPage() {
|
||||
<WorkspaceHeader
|
||||
eyebrow="管理"
|
||||
title="工作区设置"
|
||||
subtitle="按 10 人以下小团队模式收敛主导航与默认入口。"
|
||||
subtitle="按 10 人以下小团队模式收敛常用入口与低频模块。"
|
||||
/>
|
||||
<div className="admin-command-panel text-sm text-zinc-500">加载工作区设置中...</div>
|
||||
</ListWorkspace>
|
||||
@@ -113,7 +113,7 @@ export function WorkspaceSetupPage() {
|
||||
<WorkspaceHeader
|
||||
eyebrow="管理"
|
||||
title="工作区设置"
|
||||
subtitle="按小团队运营模式收敛主导航、管理入口和备用模块。"
|
||||
subtitle="按小团队运营模式收敛常用入口、管理入口和低频模块。"
|
||||
/>
|
||||
|
||||
<div className="finance-status-strip" data-testid="workspace-settings-summary">
|
||||
@@ -122,11 +122,11 @@ export function WorkspaceSetupPage() {
|
||||
<div className="finance-metric-card__value">{workspaceStats.total}</div>
|
||||
</div>
|
||||
<div className="finance-metric-card">
|
||||
<div className="finance-metric-card__label">主导航</div>
|
||||
<div className="finance-metric-card__label">常用入口</div>
|
||||
<div className="finance-metric-card__value">{workspaceStats.main}</div>
|
||||
</div>
|
||||
<div className="finance-metric-card">
|
||||
<div className="finance-metric-card__label">管理区</div>
|
||||
<div className="finance-metric-card__label">管理与更多</div>
|
||||
<div className="finance-metric-card__value">{workspaceStats.admin}</div>
|
||||
</div>
|
||||
<div className="finance-metric-card">
|
||||
@@ -171,9 +171,9 @@ export function WorkspaceSetupPage() {
|
||||
|
||||
<section className="admin-command-panel space-y-4">
|
||||
<div>
|
||||
<h3 className="text-base font-semibold text-zinc-900">模块显隐</h3>
|
||||
<h3 className="text-base font-semibold text-zinc-900">入口显隐</h3>
|
||||
<p className="mt-1 text-sm leading-6 text-zinc-600">
|
||||
主导航只保留高频入口;备用模块保留代码与数据,低频功能默认收进管理区或隐藏。
|
||||
常用入口只保留高频任务;低频能力保留代码与数据,默认收进管理、更多或隐藏。
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
||||
在新工单中引用
屏蔽一个用户