文件
hyb-oa/.trellis/tasks/05-31-unify-business-detail-ant-design/implement.md
T

1.6 KiB

Implementation Notes

Slice

This task implements the first reusable PC business detail slice:

  • Add BusinessDetailTemplate as a thin layout component family.
  • Apply it to AssetRegistryPage.tsx detail mode.
  • Apply it to WorkflowTaskDetailPage.tsx action/summary area.
  • Keep business fields, permission checks, state rules and API calls in the owning page components.

Design Rules

  • Follow mature Ant Design Pro style coordinates: main facts and evidence on the left, status/actions/compact summary on the right.
  • Do not introduce a configuration-driven page generator.
  • Do not duplicate page-local 操作 and 摘要 cards in the same right column.
  • Approval details keep one horizontal action bar: 通过, 退回, 驳回, 更多 -> 转审.
  • Asset details keep save/create as the primary action; transfer actions stay in the same right-side operation panel as a grouped section.

Verification Notes

  • cd client && npm run typecheck passed.
  • cd client && npm run build passed.
  • workflow-action-confirm-ui.spec.ts passed.
  • pc-detail-mobile-visual-wave3.spec.ts -g "Wave3 PC" passed and screenshot review confirmed the approval action area no longer renders an empty divider.
  • assets-flow.spec.ts initially passed login and asset creation, then local auth refresh returned 401 after a full page.goto(/assets?id=...). Investigation showed Vite's local proxy rewrote Host to 127.0.0.1:3000 while the browser Referer stayed on 127.0.0.1:5173, so backend origin verification rejected refresh. Preserving the original Host in Vite proxy fixed the local flow; the focused asset E2E then passed.