[CLAUDE] Docs: Chunk E7 — chốt session 9 Chunk E-bis complete
All checks were successful
Deploy SOLUTION_ERP / build-deploy (push) Successful in 3m7s
All checks were successful
Deploy SOLUTION_ERP / build-deploy (push) Successful in 3m7s
- STATUS: Recently Done +1 row session 9 (5 commit per-chunk + 83 test). Phase 9 header update count 77→83. Section E (Chunk E-bis) tick toàn bộ done. - HANDOFF: TL;DR session 9 + Cảnh báo session 10. Giữ session 8 narrative cũ. - migration-todos: Phase 9 +1 section "Session 9 done" với 5 task tick. Pending Chunk E-bis tick chuyển done. - CLAUDE.md (root + docs): test count 77 → 83 (54 Domain + 29 Infra: 17 codegen + 6 PE WF Application + 6 PE 2-stage approval). - Session log mới: 2026-05-04-1700-chot-session-9-chunk-e-bis-complete.md (full narrative + lessons + stats theo §6.5 KEEP rule). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@ -157,6 +157,25 @@ Session log: `2026-04-28-chot-session-4-budget.md`.
|
||||
|
||||
## 📝 Phase 9 — UAT + Ops + carry over (Session 6+ active)
|
||||
|
||||
### ✅ Session 9 done (2026-05-04) — Chunk E-bis complete (FE 2-stage + HĐ/Budget mirror + 6 test)
|
||||
|
||||
User chỉ thị "làm hết cho xong tính năng luôn" sau Session 8 close bug fix anh Kiệt phía BE PE. Session 9 đóng toàn bộ pending Chunk E-bis (defer từ session 8).
|
||||
|
||||
- [x] **Chunk E2 — FE Workflow Panel PE** hiển thị progress 2-stage timeline per phase × dept (commit `f8eebd5`). Component `DeptApprovalsSection` group by phase × dept, highlight amber khi current phase có Review nhưng chưa Confirm, badge fuchsia "bypass" khi NV.CanBypassReview. Cả fe-admin + fe-user (rule §3.9).
|
||||
- [x] **Chunk E3 — FE UserManager toggle CanBypassReview** (commit `4380bdc`). UserDto BE thêm field `CanBypassReview`. UsersPage column "Bypass" + button ShieldCheck (icon highlight fuchsia khi enabled). Endpoint backend đã có sẵn từ Session 8 Chunk E1. fe-user KHÔNG có UsersPage (admin-only).
|
||||
- [x] **Chunk E4 — HĐ 2-stage logic mở rộng** (commit `b6f5a16`). ContractWorkflowService thêm `UserManager<User>` DI + mirror toàn bộ logic 2-stage từ PE service (sau policy guard, trước gen mã HĐ). ContractDepartmentApprovalFeatures.cs (List query mirror PE pattern). Endpoint `GET /contracts/{id}/department-approvals`. FE WorkflowHistoryPanel section "Tiến trình duyệt 2-cấp phòng ban" insert giữa WorkflowSummaryCard và Lịch sử duyệt.
|
||||
- [x] **Chunk E5 — Budget 2-stage logic mở rộng** (commit `1fc439b`). TransitionBudgetCommandHandler thêm `INotificationService` + `IDateTime` DI + mirror 2-stage logic. BudgetDepartmentApprovalFeatures.cs + endpoint. FE BudgetWorkflowPanel section "Tiến trình duyệt 2-cấp phòng ban". Note: low-priority cho Budget (ít user duyệt budget per dept) nhưng giữ consistent UX 3 module.
|
||||
- [x] **Chunk E6 — 6 test 2-stage + IdentityFixture helper** (commit `8353fe8`). IdentityFixture (Common/) setup ServiceProvider với Identity stack đầy đủ — DbContext SQLite shared connection + AddIdentityCore<User> + AddRoles<Role> + AddEntityFrameworkStores. Single shared scope cho fixture lifetime đảm bảo DbContext + UserManager đồng instance. Helper `CreateUserAsync(email, name, deptId, roles, canBypassReview)` reusable. 6 test PeTwoStageApprovalTests: NV_Review_Blocks_Phase_Transition (đóng bug anh Kiệt — test chính xác) / TPB_Confirm_After_NV_Review_Allows_Transition / NV_With_BypassReview_Allows_Transition_With_IsBypassed_True / Admin_Skips_TwoStage_Logic_Entirely / Reject_Sets_RejectedFromPhase_And_Forces_DangSoanThao / Resume_After_Reject_Jumps_Back_To_RejectedPhase. Tests Contract + Budget 2-stage skipped — logic identical PE, ROI thấp; pattern reusable nếu UAT phát hiện regression riêng. **Total 77→83 test pass**.
|
||||
|
||||
Stats sau session 9:
|
||||
- BE LOC: ~13750 → ~14400 (+650, gồm Contract + Budget 2-stage logic + 2 List feature + Test fixture)
|
||||
- API endpoints: ~131 → ~133 (+2 List dept-approvals HĐ/Budget)
|
||||
- Tests: 77 → **83** (+6 PE 2-stage)
|
||||
- Schema không đổi (Migration 16 đã có sẵn từ session 8)
|
||||
- 5 commit per-chunk pushed → 1 CI run trigger qua HEAD = `8353fe8`
|
||||
|
||||
Pending còn lại Phase 9: chỉ Hard blockers Ops (UAT thật / SMTP / Rotate creds / SQL backup). Feature 2-stage đầy đủ.
|
||||
|
||||
### ✅ Session 8 done (2026-05-04) — Migration 16: 2-stage dept approval + smart reject + lock edit
|
||||
|
||||
**Bối cảnh:** Anh Kiệt (FDC) báo bug PE workflow: NV.PRO tạo phiếu → duyệt được hết phase. Phân quyền sai vì policy chỉ check role, không check Stage 2-cấp.
|
||||
@ -179,12 +198,12 @@ Session log: `2026-04-28-chot-session-4-budget.md`.
|
||||
|
||||
Session log: `2026-05-04-1230-chot-session-8-2-stage-dept-approval.md`.
|
||||
|
||||
**Pending Chunk E-bis (defer):**
|
||||
- [ ] FE Workflow Panel hiển thị progress 2-stage timeline
|
||||
- [ ] FE UserManager toggle `CanBypassReview` checkbox
|
||||
- [ ] HĐ 2-stage mở rộng (`ContractWorkflowService` thêm 2-stage logic + endpoint List)
|
||||
- [ ] Budget 2-stage mở rộng (low priority)
|
||||
- [ ] Tests 2-stage logic Service-layer (cần UserManager DI helper)
|
||||
**Pending Chunk E-bis** ✅ TẤT CẢ DONE ở Session 9 (xem section trên):
|
||||
- [x] FE Workflow Panel hiển thị progress 2-stage timeline (E2 — PE) + HĐ (E4) + Budget (E5)
|
||||
- [x] FE UserManager toggle `CanBypassReview` checkbox (E3)
|
||||
- [x] HĐ 2-stage mở rộng (E4)
|
||||
- [x] Budget 2-stage mở rộng (E5)
|
||||
- [x] Tests 2-stage logic Service-layer (E6 — 6 test PE + IdentityFixture)
|
||||
|
||||
### ✅ Session 6 done (2026-04-30 — pure docs work)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user