refactor: 简化工作台上手入口和个人设置(portal-onboarding-profile-simplification)
这个提交包含在:
@@ -18,34 +18,22 @@ type WelcomeLinkItem = {
|
||||
|
||||
const WELCOME_LINKS: WelcomeLinkItem[] = [
|
||||
{
|
||||
icon: "event_available",
|
||||
label: "请假申请",
|
||||
description: "提交和查看请假流程",
|
||||
to: "/leave-requests",
|
||||
icon: "fact_check",
|
||||
label: "处理待办",
|
||||
description: "先看今天需要审批或跟进的事项",
|
||||
to: "/workflow/tasks",
|
||||
},
|
||||
{
|
||||
icon: "request_quote",
|
||||
label: "报销提交",
|
||||
description: "进入报销工作台创建单据",
|
||||
label: "提交报销",
|
||||
description: "录入票据和报销说明,查看处理进度",
|
||||
to: "/reimbursements",
|
||||
},
|
||||
{
|
||||
icon: "schedule",
|
||||
label: "考勤汇总",
|
||||
description: "查看企微打卡摘要并提交 OA 修正",
|
||||
to: "/attendance",
|
||||
},
|
||||
{
|
||||
icon: "manage_accounts",
|
||||
label: "个人设置",
|
||||
description: "补充资料并维护通知偏好",
|
||||
to: "/settings/profile",
|
||||
},
|
||||
{
|
||||
icon: "notifications",
|
||||
label: "通知中心",
|
||||
description: "查看审批和业务消息",
|
||||
to: "/notifications",
|
||||
icon: "event_available",
|
||||
label: "请假",
|
||||
description: "提交请假申请或查看自己的请假记录",
|
||||
to: "/leave-requests?action=create",
|
||||
},
|
||||
];
|
||||
|
||||
@@ -60,22 +48,22 @@ export function WelcomeDialog({
|
||||
<Dialog open={open} onOpenChange={(nextOpen) => !nextOpen && onClose()}>
|
||||
<DialogContent className="max-w-2xl" data-testid="onboarding-welcome-dialog">
|
||||
<DialogHeader>
|
||||
<DialogTitle>欢迎加入海音达工作台!</DialogTitle>
|
||||
<DialogTitle>常用入口</DialogTitle>
|
||||
<DialogDescription>
|
||||
你的账号已就绪。以下是常用功能入口,点击即可开始使用:
|
||||
你的账号已就绪。先从工作台处理待办,也可以直接进入常用业务。
|
||||
</DialogDescription>
|
||||
</DialogHeader>
|
||||
|
||||
<div className="grid gap-3 sm:grid-cols-2">
|
||||
<div className="grid gap-3 sm:grid-cols-3">
|
||||
{WELCOME_LINKS.map((item) => (
|
||||
<Link
|
||||
key={item.label}
|
||||
to={item.to}
|
||||
onClick={onClose}
|
||||
className="rounded-2xl border border-zinc-200 bg-white px-4 py-4 shadow-sm transition-colors hover:bg-zinc-50"
|
||||
className="rounded-lg border border-zinc-200 bg-white px-4 py-4 shadow-sm transition-colors hover:bg-zinc-50"
|
||||
>
|
||||
<div className="flex items-start gap-3">
|
||||
<div className="flex size-10 items-center justify-center rounded-2xl bg-primary/10 text-primary">
|
||||
<div className="flex h-full flex-col gap-3">
|
||||
<div className="flex size-10 items-center justify-center rounded-md bg-primary/10 text-primary">
|
||||
<span className="material-symbols-outlined text-[20px]">{item.icon}</span>
|
||||
</div>
|
||||
<div className="min-w-0">
|
||||
@@ -87,8 +75,8 @@ export function WelcomeDialog({
|
||||
))}
|
||||
</div>
|
||||
|
||||
<div className="rounded-2xl border border-zinc-200 bg-zinc-50 px-4 py-3 text-sm text-zinc-600">
|
||||
你可以随时在左侧菜单找到所有功能模块。
|
||||
<div className="rounded-lg border border-zinc-200 bg-zinc-50 px-4 py-3 text-sm text-zinc-600">
|
||||
关闭后不再显示这个提示;所有功能都可以从左侧菜单进入。
|
||||
</div>
|
||||
|
||||
<DialogFooter>
|
||||
|
||||
在新工单中引用
屏蔽一个用户