refine Semi UI account workspace
This commit is contained in:
@@ -44,6 +44,9 @@ test('deduplicates vehicle candidates by VIN and renders granted vehicles plate
|
||||
const view = render(<QueryClientProvider client={client}><UsersPage /></QueryClientProvider>);
|
||||
|
||||
const customer = await screen.findByRole('button', { name: /选择客户 华东客户/ });
|
||||
expect(screen.getByLabelText('账号管理操作')).toHaveTextContent('客户访问治理');
|
||||
expect(screen.getByLabelText('账号管理操作')).toHaveTextContent('变更最多 30 秒生效');
|
||||
expect(view.container.querySelector('.v2-page-heading')).not.toBeInTheDocument();
|
||||
expect(screen.getByRole('heading', { name: '账号范围', level: 5 })).toBeInTheDocument();
|
||||
expect(screen.getByText('按客户名称、登录账号、客户标识与启停状态查找')).toBeInTheDocument();
|
||||
expect(screen.getAllByText('1 / 1 个账号')).toHaveLength(2);
|
||||
|
||||
@@ -6,7 +6,6 @@ import { api } from '../../api/client';
|
||||
import type { AdminUser, CustomerUserInput, CustomerVehicleGrantInput } from '../../api/types';
|
||||
import { useMobileLayout } from '../hooks/useMobileLayout';
|
||||
import { useSideSheetA11y } from '../hooks/useSideSheetA11y';
|
||||
import { PageHeader } from '../shared/PageHeader';
|
||||
import { TablePagination } from '../shared/TablePagination';
|
||||
import { VehicleCandidateList } from '../shared/VehicleCandidateList';
|
||||
import { WorkspaceFilterPanel } from '../shared/WorkspaceFilterPanel';
|
||||
@@ -245,13 +244,17 @@ export default function UsersPage() {
|
||||
};
|
||||
|
||||
return <div className="v2-user-admin">
|
||||
<PageHeader
|
||||
title="客户账号与数据权限"
|
||||
description="客户只会看到已分配的菜单和车辆,权限变更最多在 30 秒内对现有会话生效。"
|
||||
status={`${customers.length} 个客户账号`}
|
||||
meta={<Typography.Text type="tertiary">最小权限原则</Typography.Text>}
|
||||
actions={<Button theme="solid" icon={<IconPlus />} aria-label="新建客户账号" onClick={startCreate}>新建客户账号</Button>}
|
||||
/>
|
||||
<div className="v2-user-command-bar" aria-label="账号管理操作">
|
||||
<div className="v2-user-command-copy">
|
||||
<strong>客户访问治理</strong>
|
||||
<span>菜单与车辆按最小权限开放,变更最多 30 秒生效</span>
|
||||
</div>
|
||||
<div className="v2-user-command-meta">
|
||||
<Tag color="blue" type="light" size="small">{customers.length} 个客户账号</Tag>
|
||||
<Typography.Text type="tertiary">本地账号 · 可扩展外部身份源</Typography.Text>
|
||||
<Button theme="solid" icon={<IconPlus />} aria-label="新建客户账号" onClick={startCreate}>新建客户账号</Button>
|
||||
</div>
|
||||
</div>
|
||||
<WorkspaceFilterPanel
|
||||
className="v2-user-filter-panel"
|
||||
title="账号范围"
|
||||
|
||||
Reference in New Issue
Block a user