|
|
b75448e711
|
[CLAUDE] FE-User+FE-Admin: 3-panel layout cho danh sách HĐ
Deploy SOLUTION_ERP / build-deploy (push) Successful in 2m50s
Redesign trang Danh sách HĐ (Ct_*_List menu fe-user + /contracts admin)
thành 3-panel: List | Detail content | Workflow + lịch sử duyệt. Selected
HĐ giữ qua URL ?id= (bookmarkable + back/forward navigation work).
## Components mới (reuse cho cả 3-panel embedded + fullpage detail)
### fe-user/src/components/contracts/
- ContractDetailContent.tsx — Panel 2 body: header sticky (title + phase
+ actions Yêu cầu sửa/Duyệt) + Info section + Comments thread + form
thêm góp ý + Attachments. Transition Dialog inline. Prop optional
onBack — render arrow back button (fullpage) hoặc skip (embedded).
- WorkflowHistoryPanel.tsx — Panel 3: WorkflowSummaryCard (timeline
policy current+next) + Lịch sử duyệt (approvals: phase from→to + actor
+ timestamp + comment).
### fe-admin/src/components/contracts/
- ContractDetailContent.tsx — variant admin có thêm Phòng ban + Bypass
CCM trong Info section. Invalidate ['contracts'] khi transition.
- WorkflowHistoryPanel.tsx — identical fe-user.
## Trang refactored
### fe-user
- MyContractsPage.tsx — bỏ DataTable, dùng 3-panel grid
lg:grid-cols-[320px_1fr_360px] h-[calc(100vh-4rem)]:
Panel 1: search box + list compact (mã/tên/NCC/phase/SLA/giá), click
update ?id= active highlight ring-brand
Panel 2: detail content embedded
Panel 3: workflow + history
Mobile (<lg): chỉ Panel 1 visible, click row navigate fullpage
/contracts/:id (UX khả dụng, không nhồi 3 panel màn hình hẹp).
URL state: ?type=X (filter loại) + ?id= (selected) + ?q= (search).
- ContractDetailPage.tsx — slim version dùng ContractDetailContent +
WorkflowHistoryPanel, giữ deep link /contracts/:id work.
### fe-admin
- ContractsListPage.tsx — 3-panel + filter phase + pagination compact
trong Panel 1 footer. URL state: ?type, ?pendingMe, ?id, ?q, ?phase,
?page (full bookmarkable). Title hiển thị loại HĐ + count badge.
- ContractDetailPage.tsx — slim version giống fe-user.
## Build verified
- fe-user: tsc -b + vite build pass (1888 modules, 1.08MB JS)
- fe-admin: tsc -b + vite build pass (1903 modules, 1.15MB JS)
Note: npm install resolved @microsoft/signalr 8.0.7 → 8.0.17 (within
^8.0.7 caret), reverted package.json + lock changes do bump không phải
scope task này. Dev tiếp theo run npm install sẽ tự re-resolve.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
2026-04-23 09:04:46 +07:00 |
|