重构个人设置与管理边界(05-30-profile-settings-boundary)
这个提交包含在:
+16
-11
@@ -53,7 +53,7 @@ function roleLabel(roleCode: string) {
|
||||
hr: "人事",
|
||||
manager: "审批人",
|
||||
};
|
||||
return labels[roleCode] ?? roleCode;
|
||||
return labels[roleCode] ?? "其他角色";
|
||||
}
|
||||
|
||||
function resolveProfileError(error: unknown) {
|
||||
@@ -109,21 +109,14 @@ export function ProfilePage() {
|
||||
<PageHeader
|
||||
title="个人设置"
|
||||
eyebrow="账号与通知"
|
||||
subtitle="查看自己的账号信息,设置消息提醒和企业微信入口。员工档案由对应页面维护。"
|
||||
subtitle="只处理个人资料、安全、通知偏好和企业微信绑定。组织和权限维护统一在管理入口处理。"
|
||||
meta={<span className={accountStatusClassName(me?.status)}>{accountStatusLabel(me?.status)}</span>}
|
||||
/>
|
||||
|
||||
<div className="mx-auto max-w-5xl space-y-5">
|
||||
<SectionPanel
|
||||
title="账号信息"
|
||||
description="这些信息用于识别你的账号。需要维护更多员工档案时,进入完整档案页。"
|
||||
actions={
|
||||
me?.id ? (
|
||||
<Button asChild type="button" variant="secondary">
|
||||
<Link to={`/people/${me.id}`}>查看员工档案</Link>
|
||||
</Button>
|
||||
) : null
|
||||
}
|
||||
title="个人资料"
|
||||
description="只展示本人基础信息。如需调整组织、岗位或角色,由管理员在管理入口维护。"
|
||||
>
|
||||
<dl className="grid gap-4 text-sm text-zinc-700 md:grid-cols-2">
|
||||
<div>
|
||||
@@ -145,6 +138,18 @@ export function ProfilePage() {
|
||||
</dl>
|
||||
</SectionPanel>
|
||||
|
||||
<SectionPanel title="密码与安全" description="修改登录密码,保持账号入口可控。">
|
||||
<div className="flex flex-col gap-3 text-sm text-zinc-600 sm:flex-row sm:items-center sm:justify-between">
|
||||
<div>
|
||||
<div className="font-medium text-zinc-900">账号密码</div>
|
||||
<p className="mt-1">修改密码需要输入当前密码;忘记密码时请从登录页找回。</p>
|
||||
</div>
|
||||
<Button asChild type="button" variant="secondary">
|
||||
<Link to="/change-password">修改密码</Link>
|
||||
</Button>
|
||||
</div>
|
||||
</SectionPanel>
|
||||
|
||||
<SectionPanel title="通知设置" description="选择是否接收企业微信个人应用提醒。">
|
||||
<div className="space-y-3 text-sm text-zinc-600">
|
||||
<label className="flex items-center gap-3 text-zinc-800">
|
||||
|
||||
在新工单中引用
屏蔽一个用户