refactor(web): 侧栏「用户与组织」更名为「用户管理」
背景: - 管理中心侧栏菜单名为「用户与组织」,与「角色管理」「部门管理」的命名方式不一致; - 页面标题、面包屑仍沿用旧名,三处展示不统一; - A1 文档与代码注释中该功能域本来即称「用户管理」。 改动: - nav-config:菜单 label 改为「用户管理」,description 改为「成员账号、部门归属与登录状态」; - breadcrumbs:用户新建 / 详情子路由的面包屑 2 处同步; - UsersPage:页面 h1 同步; - nav-config.spec / breadcrumbs.spec / e2e a1-identity 的标签与 heading 断言同步; - 11-前端路由与目录规范、AppLayout 注释同步;PRD P-01 功能名保持「用户与组织管理」不变。 影响面: - 仅前端文案与对应断言;路由、权限点、接口、数据均不变。 回滚方式: - 回滚本提交即恢复原「用户与组织」文案与断言。 验证证据: - pnpm format:check / lint / typecheck 通过; - pnpm test:web 120/120 通过; - Chrome 1440×900 实机:侧栏、面包屑、页面标题均显示「用户管理」。
This commit is contained in:
1 parent
3e384febf3
commit
f849e443d7
8 files changed
+14
-14
No files matched your search
@@ -32,7 +32,7 @@ describe('面包屑子路由补全', () => {
|
||||
expect(getUserSectionTrail('/system/users/new')?.map((entry) => entry.label)).toEqual([
|
||||
'工作台',
|
||||
'管理中心',
|
||||
'用户与组织',
|
||||
'用户管理',
|
||||
'新建用户',
|
||||
]);
|
||||
expect(getUserSectionTrail('/system/users/01HZZZZZZZZZZZZZZZZZZZZZZZ')).not.toBeNull();
|
||||
|
||||
@@ -25,14 +25,14 @@ export function getRoleSectionTrail(pathname: string): BreadcrumbEntry[] | null
|
||||
|
||||
/**
|
||||
* 用户模块下的子路由(新建 / 详情)不在 nav-config 的菜单项里,
|
||||
* 这里补齐面包屑:工作台 / 管理中心 / 用户与组织 / 当前页。
|
||||
* 这里补齐面包屑:工作台 / 管理中心 / 用户管理 / 当前页。
|
||||
*/
|
||||
export function getUserSectionTrail(pathname: string): BreadcrumbEntry[] | null {
|
||||
if (pathname === ROUTES.system.userNew) {
|
||||
return [
|
||||
{ key: 'home', label: '工作台', path: ROUTES.home },
|
||||
{ key: 'system', label: '管理中心' },
|
||||
{ key: 'users', label: '用户与组织', path: ROUTES.system.users },
|
||||
{ key: 'users', label: '用户管理', path: ROUTES.system.users },
|
||||
{ key: 'user-new', label: '新建用户' },
|
||||
];
|
||||
}
|
||||
@@ -40,7 +40,7 @@ export function getUserSectionTrail(pathname: string): BreadcrumbEntry[] | null
|
||||
return [
|
||||
{ key: 'home', label: '工作台', path: ROUTES.home },
|
||||
{ key: 'system', label: '管理中心' },
|
||||
{ key: 'users', label: '用户与组织', path: ROUTES.system.users },
|
||||
{ key: 'users', label: '用户管理', path: ROUTES.system.users },
|
||||
{ key: 'user-detail', label: '成员详情' },
|
||||
];
|
||||
}
|
||||
|
||||
@@ -26,8 +26,8 @@ describe('导航配置', () => {
|
||||
expect(modules.map((module) => module.key)).toEqual(['dashboard']);
|
||||
});
|
||||
|
||||
it('子路由(/system/users/new、/system/users/:id)也归属用户与组织', () => {
|
||||
expect(findActiveNav(NAV_MODULES, '/system/users/new')?.item?.label).toBe('用户与组织');
|
||||
it('子路由(/system/users/new、/system/users/:id)也归属用户管理', () => {
|
||||
expect(findActiveNav(NAV_MODULES, '/system/users/new')?.item?.label).toBe('用户管理');
|
||||
expect(findActiveNav(NAV_MODULES, '/system/users/01HZZZZZZZZZZZZZZZZZZZZZZZ')?.module.key).toBe(
|
||||
'system',
|
||||
);
|
||||
@@ -63,7 +63,7 @@ describe('导航配置', () => {
|
||||
it('面包屑从导航配置派生', () => {
|
||||
expect(getBreadcrumbs(NAV_MODULES, '/')).toEqual([{ key: 'home', label: '工作台', path: '/' }]);
|
||||
const breadcrumbs = getBreadcrumbs(NAV_MODULES, '/system/users');
|
||||
expect(breadcrumbs.map((entry) => entry.label)).toEqual(['工作台', '管理中心', '用户与组织']);
|
||||
expect(breadcrumbs.map((entry) => entry.label)).toEqual(['工作台', '管理中心', '用户管理']);
|
||||
const deptBreadcrumbs = getBreadcrumbs(NAV_MODULES, '/system/departments');
|
||||
expect(deptBreadcrumbs.map((entry) => entry.label)).toEqual(['工作台', '管理中心', '部门管理']);
|
||||
});
|
||||
|
||||
@@ -249,11 +249,11 @@ export const NAV_MODULES: readonly NavModule[] = [
|
||||
items: [
|
||||
{
|
||||
key: 'users',
|
||||
label: '用户与组织',
|
||||
label: '用户管理',
|
||||
path: '/system/users',
|
||||
icon: IconUser,
|
||||
permission: Permission.USER_VIEW,
|
||||
description: '账号、组织与登录状态',
|
||||
description: '成员账号、部门归属与登录状态',
|
||||
},
|
||||
{
|
||||
key: 'departments',
|
||||
|
||||
Reference in new issue
Block a user