收敛企微主办 HR 考勤页面(05-30-wecom-hr-boundary-pages)

这个提交包含在:
2026-05-30 11:41:35 +08:00
父节点 98749c9d48
当前提交 83c8e8be4f
共修改 12 个文件,包含 507 行新增和 288 行删除
@@ -239,6 +239,14 @@ point and prevents each route from inventing a different title/action layout.
`审批待办` in the sidebar by default.
- PC leave navigation uses `请假记录` unless the current task explicitly opens OA
emergency leave submission.
- HR/attendance pages must encode WeCom ownership in the UI surface: employee
leave and mobile leave are record-first/read-only, and OA emergency forms are
hidden unless `leave.manage`; attendance correction forms are hidden unless
`attendance.manage`. Labels must say `OA 应急` / `提交应急审批` /
`提交应急修正` instead of generic `提交`.
- When a page repeats the same title in the page header and a content section,
Playwright assertions should target the page header (`h1` or the header test
id) rather than `getByRole("heading", { name })`, which becomes ambiguous.
- `个人设置` stays in the topbar account menu. Notifications stay in the topbar
bell and notification center.
- Finance labels should use work names such as `付款`, `应付账款` and `票据`;
+27
查看文件
@@ -17,3 +17,30 @@ operating audit.
manual backend/real-device gates where specified.
- Messages to Enterprise WeChat must be dehydrated and link back to OA; do not
send sensitive attachments or business documents into native WeCom approvals.
## HR / Attendance UI Contracts
- `请假记录` is the PC leave entry label and page title. Ordinary employees must
see records, balances and a WeCom-owned explanation, not an OA leave creation
form.
- OA leave creation, edit, submit and withdraw controls are emergency-only UI.
They require `leave.manage` and must be labeled with `OA 应急` / `应急草稿` /
`提交应急审批`; do not expose them based only on `leave.create`.
- Mobile leave defaults to records for ordinary employees. Hide the form tab and
row actions unless the user has `leave.manage`; keep the first card explicit:
`企业微信主办` and `只读`.
- Attendance correction forms are emergency-only UI. They require
`attendance.manage` and use `OA 应急修正` / `提交应急修正`. Ordinary employees
see a WeCom handling explanation for missed punch, outing and overtime.
- WeCom approval archive pages are read-only history and reconciliation. They
may show status/action history labels from WeCom data, but must not offer OA
approve/reject/return/transfer actions.
## Tests Required
- Mocked frontend Playwright coverage should assert that ordinary employees do
not see OA leave/correction create actions, while admin/HR roles retain
explicitly labeled emergency entry points.
- Full-stack Playwright coverage that writes local data still requires a running
local backend/API environment; a Vite-only run is not a valid failure signal
for those real-chain tests.