[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

@ -241,7 +241,33 @@ Claude auto-invoke theo description matching.
| Observability | Serilog console | + file rolling daily + Seq/ELK |
| Security | JWT + HTTPS dev | + rate limit + audit log + CSP |
## 9. Liên quan
## 9. PurchaseEvaluation (Phase 6 — tiền-HĐ)
Module mới song song Contract phiếu trình duyệt so sánh giá N NCC × M hạng mục, duyệt xong kế thừa làm .
```
PurchaseEvaluation (Header) ─< PurchaseEvaluationSupplier (N:M × Supplier)
─< PurchaseEvaluationDetail (hạng mục) ─< PurchaseEvaluationQuote (báo giá N×M)
─< PurchaseEvaluationApproval (workflow history)
─< PurchaseEvaluationChangelog (audit)
─< PurchaseEvaluationAttachment (file)
─> PurchaseEvaluationWorkflowDefinition (PINNED at create)
─> Contract? (nullable FK — set khi gen HĐ từ phiếu DaDuyet)
```
**Workflow** (tách riêng Phase enum khác ContractPhase):
- A `DuyetNcc` 3 step: Drafter Procurement CostControl Director DaDuyet
- B `DuyetNccPhuongAn` 5 step: + ProjectManager sau Procurement, + Director duyệt PA trước duyệt NCC
**Kế thừa HĐ** (`CreateContractFromEvaluationCommand`):
- Guard: phase = DaDuyet, SelectedSupplierId != null, ContractId = null
- User pick ContractType (1-7) gen Contract draft với SupplierId/ProjectId/GiaTri kế thừa
- Pin `Contract.WorkflowDefinitionId` theo ContractType chọn
- Link 2 chiều: `PurchaseEvaluation.ContractId = contract.Id`
Chi tiết: [`database/schema-diagram.md §11`](database/schema-diagram.md).
## 10. Liên quan
- [`rules.md`](rules.md) coding conventions
- [`database/database-guide.md`](database/database-guide.md) DB schema chi tiết