[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
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:
@ -310,7 +310,61 @@
|
||||
- [ ] **PE Attachments upload** (pattern reuse ContractAttachmentFeatures) — optional
|
||||
- [ ] **Auto-map PE Details → Contract Details per-type** khi gen HĐ — phức tạp vì 7 ContractType schema khác nhau, user điền lại manual — optional
|
||||
|
||||
## Post-launch (Phase 6+ — future)
|
||||
## Phase 7 — PE refinement (session tiếp)
|
||||
|
||||
**User feedback (2026-04-23 tối session 2):** "phần Duyệt NCC chưa xong đâu đấy nhé, còn chỉnh nhiều"
|
||||
|
||||
### A. Chức năng MISSING trong MVP
|
||||
|
||||
- [ ] **PE Workflow admin designer UI** `/system/pe-workflows/:typeCode`
|
||||
- BE `Application/PurchaseEvaluations/PeWorkflowAdminFeatures.cs` — mirror `WorkflowAdminFeatures.cs` (GetOverview + CreateNewVersion)
|
||||
- `Api/Controllers/PeWorkflowsController.cs` — GET overview + POST create-version (`[Authorize(Policy = "PeWorkflows.Create")]`)
|
||||
- FE `fe-admin/src/pages/system/PeWorkflowsPage.tsx` — URL-driven, landing + per-type
|
||||
- FE `fe-admin/src/components/workflow/PeWorkflowDesigner.tsx` — Steps + Approvers modal
|
||||
- Route `/system/pe-workflows/:typeCode` trong App.tsx (menu `PeWf_*` + resolver đã sẵn)
|
||||
- [ ] **PE Attachments upload** — pattern copy từ `ContractAttachmentFeatures.cs`
|
||||
- BE `Application/PurchaseEvaluations/PurchaseEvaluationAttachmentFeatures.cs` (Upload/Download/Delete)
|
||||
- 3 endpoint POST/GET/DELETE `/api/purchase-evaluations/{id}/attachments`
|
||||
- FE `components/pe/PeAttachmentsSection.tsx` — drag-drop với purpose selector
|
||||
- [ ] **Ý kiến 4 phòng ban** (Phê duyệt / P.CCM / P.MuaHàng / SM-PM từ Excel form)
|
||||
- Option A: Thêm 4 text field (NhậnXétPheDuyet/CCM/MuaHang/SmPm) + 4 date field + 4 UserId vào `PurchaseEvaluations` header
|
||||
- Option B: Dùng existing `PurchaseEvaluationApprovals` với roleKind extra field
|
||||
- UX: tab Thông tin hiển thị 4 box sign-off như Excel
|
||||
- [ ] **Payment terms tách field** từ JSON → 6 columns hoặc subtable
|
||||
- Migration `AddPurchaseEvaluationPaymentTerms` — cột/bảng: TamUng%, ThanhToanTam%, QuyetToan%, BaoHanh%, HanMucCongNo, DanhGia
|
||||
- FE form field-based (loại bỏ JSON textarea)
|
||||
- [ ] **Auto-map PE Details → Contract Details khi gen HĐ** (optional — nâng cấp)
|
||||
- 7 mapping function per ContractType (khó vì schema khác biệt)
|
||||
- MVP: skip, user nhập manual
|
||||
- [ ] **Demo PE data seed** — `SeedDemoPurchaseEvaluationsAsync`
|
||||
- 1 NccOnly DaDuyet chưa tạo HĐ (showcase kế thừa button)
|
||||
- 1 NccWithPlan phase ChoCCM (showcase workflow middle)
|
||||
- 1 TuChoi (showcase reject path)
|
||||
- [ ] **MaPhieu format chính thức** — hiện `PE-YYYYMM-XXXX` random. User confirm format + atomic sequence:
|
||||
- Option A: `{ProjectCode}/PE/{yyyy}/{seq:D3}` — atomic via `PurchaseEvaluationCodeSequences` bảng mới
|
||||
- Option B: Tái dùng `ContractCodeSequences` với Prefix = `PE-{yyyy}-{ProjectCode}`
|
||||
|
||||
### B. UX / Polish
|
||||
|
||||
- [ ] Matrix Quotes **bulk paste** từ Excel column giá → paste matrix row
|
||||
- [ ] **Export phiếu PDF/Excel** — tái dùng `IDocumentConverter` + template `PE-TrinhDuyet.docx` upload qua FormsPage
|
||||
- [ ] **Permission grant Pe_* cho non-admin role** — 1 click trong PermissionsPage matrix (Pe_* inherit từ `PurchaseEvaluations.Read` tương tự Contracts inheritance)
|
||||
- [ ] **fe-user Inbox** thêm section "Phiếu Duyệt NCC chờ tôi" (hoặc route `/pe-inbox`)
|
||||
- [ ] **Sidebar accordion fe-user** extend cover `Pe_<code>` (hiện chỉ track `Ct_<code>`)
|
||||
- [ ] **Dashboard** — thêm KPI "PE phiếu chờ tôi", "PE đã duyệt tháng này", "PE cần tạo HĐ"
|
||||
|
||||
### C. Edge case + E2E test
|
||||
|
||||
- [ ] Reject path E2E: DangSoanThao → ChoPurchasing → (CCM reject) → DangSoanThao
|
||||
- [ ] Admin tạo PE workflow v02 sau khi có phiếu pin v01 — invariant test
|
||||
- [ ] Xóa phiếu khi PE.ContractId set — warning dialog
|
||||
- [ ] 2 admin đồng thời tạo v02 cho cùng type — race condition (atomic dealsactivate old)
|
||||
|
||||
### D. Deploy
|
||||
|
||||
- [ ] Verify commit `3990066` apply prod (runner status + `/api/purchase-evaluations` → 401 expected)
|
||||
|
||||
## Post-launch (Phase 8+ — future)
|
||||
|
||||
- [ ] **Email outbox** (MailKit + SMTP) — blocked chờ SMTP config
|
||||
- [x] **Roles CRUD** — admin tạo custom role ngoài 12 hardcoded (commit 072ad6d)
|
||||
|
||||
Reference in New Issue
Block a user