[CLAUDE] Docs: chốt session 2 — PE skeleton + G-084 + skill audit
All checks were successful
Deploy SOLUTION_ERP / build-deploy (push) Successful in 2m55s

User feedback: "phần Duyệt NCC chưa xong đâu đấy nhé, còn chỉnh nhiều"
→ mark PE module skeleton (not feature-complete), liệt kê chi tiết chức
năng/UX/edge-case còn missing cho session tiếp.

Update 7 file:
 - STATUS.md — phase = "PE skeleton + refinement WIP", In Progress liệt
   kê 4 nhóm: A Chức năng MISSING (9 item), B UX/Polish (6 item),
   C Edge case (4 item), D Deploy/Ops (1 item). +G-084 row Recently Done.
 - HANDOFF.md — TL;DR "PE skeleton, còn chỉnh nhiều" + Priority 0 section
   cho session tiếp (9 task PE refinement) + cảnh báo runner + G-084.
 - migration-todos.md — Phase 7 checklist (A/B/C/D nhóm) trước Phase 8
   post-launch. Pending migrations: PaymentTermFields + DepartmentOpinions
   + CodeSequences.
 - architecture.md — Section 9 PurchaseEvaluation module (ERD + workflow
   A/B + kế thừa HĐ flow).
 - CLAUDE.md (root) — 5 file đọc đầu (thêm HANDOFF), Modules table, 12
   migration 46 bảng, +PurchaseEvaluation commit scope.
 - .claude/skills/ — 4 skill cross-ref Phase 6:
   * README: trạng thái updated với Phase 6 note
   * contract-workflow: note PE workflow tách table riêng
   * permission-matrix: +Pe_*/PeWf_* menu keys + TODO grant non-admin
   * ef-core-migration: 12 migration history + Phase 7 pending
 - docs/changelog/sessions/2026-04-23-2359-chot-session-pe-skeleton.md —
   session log full commits + MD files updated + session tiếp priorities
   + notes (PE là skeleton, runner check, G-084 rule, MaPhieu format).
This commit is contained in:
pqhuy1987
2026-04-23 17:46:41 +07:00
parent 3990066b04
commit 7ca6c914fa
10 changed files with 303 additions and 34 deletions

View File

@ -1,18 +1,28 @@
# HANDOFF — Brief 5 phút cho session tiếp theo
**Last updated:** 2026-04-23 (Phase 6 — PurchaseEvaluation module E2E)
**Last updated:** 2026-04-23 tối (Phase 6 — PE skeleton + G-084 hardening, **PE còn chỉnh nhiều**)
## TL;DR
**Module Duyệt NCC (tiền-HĐ) E2E.** 2 quy trình A/B config được admin
(tái dùng framework versioned workflow), 10 bảng mới (7 core + 3
workflow config), 17 endpoint mới, 3 FE page × 2 app + PeDetailTabs
5-tab + PeWorkflowPanel timeline. Kế thừa HĐ 1-click từ phiếu DaDuyet:
Gen Contract draft với SupplierId/ProjectId/GiaTri kế thừa, link 2
chiều PE.ContractId.
**PE module skeleton E2E** 2 quy trình A/B config được admin, 10 bảng, 17
endpoint, 3 page × 2 app + kế thừa HĐ 1-click. BE + FE + migration đã push
lên Gitea main (`2c6f0ca..3990066`, 6 commit). **CHƯA XONG — nhiều polish
+ feature thiếu cho session tiếp** (xem STATUS.md §🔥 In Progress đầy đủ).
**Tổng:** 46 DB tables, ~110 endpoints, 12 migrations. Còn blockers
user/ops cũ: UAT thật + SMTP + rotate creds.
**G-084 hardening:** localhost → 127.0.0.1 trong scripts + skill, doc gotcha
#33 từ bài học VietReport (IPv4/IPv6 port hijack trên VPS shared).
**Tổng:** 46 DB tables, ~110 endpoints, 12 migrations, 33 gotchas. Blocker
user/ops cũ vẫn còn: UAT thật + SMTP + rotate creds + runner apply.
## ⚠️ CẢNH BÁO session tiếp
1. **Runner có thể đang stopped sau VPS restart**`/api/purchase-evaluations`
vẫn 404. Kiểm tra + start `gitea-runner` service trước khi test PE endpoint.
2. **PE chỉ là skeleton** — user nói "còn chỉnh nhiều". Nhóm A/B/C/D tasks
đầy đủ ở STATUS.md §🔥 In Progress.
3. **Chú ý G-084:** VPS shared với VietReport — mọi reverse proxy / backend
service mới phải dùng `127.0.0.1` + bind loopback IPv4 explicit.
## ⭐ Skills (.claude/skills/) — PHẢI dùng khi task khớp
@ -92,6 +102,25 @@ Login: `admin@solutionerp.local` / `Admin@123456`
## Cần làm kế tiếp
### 🔥 Priority 0 — PE module refinement (session tiếp)
Xem **STATUS.md §🔥 In Progress** đầy đủ (nhóm A/B/C/D). Tóm tắt nhanh:
1. **PE Workflow admin designer UI** `/system/pe-workflows/:typeCode` — mirror pattern từ `WorkflowsPage.tsx` + `WorkflowDesigner.tsx`. BE cần `PeWorkflowAdminFeatures.cs` + `PeWorkflowsController.cs`. Framework backend đã sẵn, chỉ thiếu wire UI.
2. **PE Attachments upload** — copy pattern `ContractAttachmentFeatures.cs` + `ContractAttachmentsSection.tsx`. Entity + enum có sẵn.
3. **Ý kiến 4 phòng ban** (Phê duyệt / P.CCM / P.MuaHàng / SM-PM) — Excel form có, entity chưa map. Cần design: 4 text field + signoff date, hoặc dùng Approvals với role-kind.
4. **Payment terms tách field** từ JSON blob → 6 field riêng (Tạm ứng / TT tạm / Quyết toán / Bảo hành / Hạn mức / Đánh giá) theo Excel section D.
5. **Seed demo PE data** — 2-3 phiếu cho UAT + screenshot.
6. **Permission grant Pe_* cho non-admin role**`/system/permissions` tick `PurchaseEvaluations.Read` + CRUD cho role Drafter/PRO/CCM/BOD.
7. **MaPhieu format chính thức** — user confirm.
8. **Export phiếu PDF/Excel** — tái dùng `IDocumentConverter` + template.
9. **Auto-map PE Details → Contract Details** khi gen HĐ (optional — nâng cấp).
**Deploy blocker hiện tại:** commit `3990066` chưa apply prod. Check runner:
```powershell
Get-Service *gitea-runner* ; Start-Service gitea-runner
```
### A. Hard blockers (chờ user / ops)
1. **UAT thật 1 tuần với 2-3 user** — hard requirement từ roadmap. Kiến nghị: