[CLAUDE] Docs: tai cau truc cleanup — archive raw, compact migration-todos, update CLAUDE+flows
All checks were successful
Deploy SOLUTION_ERP / build-deploy (push) Successful in 2m53s
All checks were successful
Deploy SOLUTION_ERP / build-deploy (push) Successful in 2m53s
User request: 'review cap nhat va tai cau truc lai MD sao cho phu hop voi hien tai, cac phan thua va da dieu chinh co the bo ra luon hoac cap nhat lai'. Cleanup highlights: 1. Archive 2 file Phase 0 raw dump → docs/_archive/ (forms-spec-raw 657 line + workflow-raw 62 line). Update link reference 2 file goc. 2. Compact migration-todos.md 386 → 114 line (-71%). Collapse Phase 0-5 + Tier 3 + Sessions detailed thanh 1 bang summary. Detail xem session logs. Phase 6 iter 1+2 + Phase 7 active checklist. 3. Compact STATUS.md In Progress: bo ~17 row ✅ done (giu chỉ 5+ task pending: 3 PE feature gap + 4 optional polish + 2 Ops). Recently Done table giu day du history. 4. Update flows/README — tat ca 6 flow ✅ Implemented + them PE row reference architecture.md §9. 5. Update docs/CLAUDE.md — project layout co PurchaseEvaluations, _archive, skills 6 (3 dom + 3 ops). Roadmap them Phase 6 ✅ + Phase 7 WIP. Lien he them prod URL solutions.com.vn + SSH config + login admin. 6. Skill ef-core-migration: 13 migration label. Net delta: -800 line docs (chu yeu archive + collapse migration-todos).
This commit is contained in:
@ -14,53 +14,28 @@
|
||||
- https://git.baocaogiaoduc.vn/vietreport-admin/solution-erp — Gitea repo + Actions
|
||||
- Default admin: `admin@solutionerp.local` / `Admin@123456` ⚠️ **RE-ROTATE sau login đầu**
|
||||
|
||||
## 🔥 In Progress — PE module chưa xong (session tiếp xử lý)
|
||||
## 🔥 In Progress — Còn lại cho session 4
|
||||
|
||||
> **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. PE feature gap (3 task chưa làm)
|
||||
|
||||
### A. Chức năng MISSING trong MVP (còn lại)
|
||||
- [ ] **PE Workflow admin designer UI** `/system/pe-workflows/:typeCode` — framework BE đã sẵn (3 bảng + `FromDefinition` builder + menu leaves). Chỉ thiếu:
|
||||
- BE `PeWorkflowAdminFeatures.cs` + `PeWorkflowsController.cs` (mirror Contract version)
|
||||
- FE `PeWorkflowsPage.tsx` + `PeWorkflowDesigner.tsx` (copy `WorkflowsPage.tsx` + `WorkflowDesigner.tsx`)
|
||||
- [ ] **Section "Ý kiến 4 phòng ban"** (Phê duyệt/P.CCM/P.MuaHàng/SM-PM) ở tab Thông tin — Excel form có, entity chưa map. Design: 4 text field + signoff date, hoặc dùng Approvals với role-kind.
|
||||
- [ ] **Export phiếu PDF/Excel** — tái dùng `IDocumentConverter` + template `PE-TrinhDuyet.docx`.
|
||||
|
||||
- [ ] **PE Workflow admin designer UI** `/system/pe-workflows/:typeCode` — framework versioned WF đã có (3 bảng + policy `FromDefinition`). Chỉ thiếu:
|
||||
- BE `PeWorkflowAdminFeatures.cs` (mirror `WorkflowAdminFeatures.cs` — GetOverview + CreateNewVersion)
|
||||
- `PeWorkflowsController.cs` — GET overview + POST create-version
|
||||
- FE `PeWorkflowsPage.tsx` + `PeWorkflowDesigner.tsx` (mirror `WorkflowsPage.tsx` + `WorkflowDesigner.tsx`)
|
||||
- Menu leaf `PeWf_*` đã seed rồi, resolver Layout.tsx đã map `/system/pe-workflows/:code`
|
||||
- [x] ✅ **PE Attachments upload** (2026-04-24) — `PurchaseEvaluationAttachmentFeatures.cs` (Upload/Download/Delete) + 3 endpoint REST + `IFileStorage` reuse. FE column "File đính kèm" per-NCC (SupplierAttachmentsCell) + section "Bảng so sánh (file tổng)" (GeneralAttachmentsSection, `supplierRowId=null`). Enum purpose: QuoteDocument=1/RequirementSpec=2/DecisionExport=3/**ComparisonTable=4**/Other=99. 20MB MIME whitelist.
|
||||
- [ ] **Auto-map PE Details → Contract 7 per-type Details khi gen HĐ** — hiện `CreateContractFromEvaluationCommand` chỉ copy header + GiaTri, KHÔNG copy Details. Cần mapping per ContractType (PE Detail schema flat ≠ 7 Contract Details schemas).
|
||||
- [x] ✅ **Demo PE data seed** (2026-04-24) — 4 phiếu `[DEMO]` cover full state-space.
|
||||
- [x] ✅ **MaPhieu atomic sequence** (2026-04-24) — Migration 13. Format `PE/{YYYY}/{A|B}/{Seq:D3}`.
|
||||
- [ ] **Section "Ý kiến các phòng ban" (Phê duyệt/P.CCM/P.MuaHàng/SM-PM) ở tab Thông tin** — Excel form mẫu có, entity hiện chưa map. Cần thêm 4-8 text field + signoff date (hoặc dùng Approvals row như ContractApprovals).
|
||||
### B. Optional polish
|
||||
|
||||
### B. UX / Polish cần chỉnh
|
||||
- [ ] **Auto-map PE Details → Contract 7 per-type Details** khi gen HĐ — hiện copy header + GiaTri only.
|
||||
- [ ] **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.
|
||||
- [ ] **Matrix Quotes bulk paste** từ Excel column giá.
|
||||
- [ ] **fe-user Inbox** thêm section "Phiếu Duyệt NCC chờ tôi" (hoặc `/pe-inbox` riêng).
|
||||
- [ ] Edge case: reject E2E, xóa phiếu khi có Contract kế thừa, admin tạo WF v02 sau khi có phiếu pin v01.
|
||||
|
||||
- [ ] **Payment terms chi tiết** — hiện JSON blob. UX tách 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.
|
||||
- [ ] **Matrix Quotes bulk paste** — click cell → popup: OK. Nhưng bulk paste column giá từ Excel chưa có (power user feature).
|
||||
- [ ] **Export phiếu PDF/Excel** — user cần bản in ký. Tái dùng `IDocumentConverter` + template `PE-TrinhDuyet.docx`.
|
||||
- [x] ✅ **Permission grant Pe_* cho non-admin role** (2026-04-24).
|
||||
- [x] ✅ **Menu tree inheritance Pe_*/PeWf_*** (2026-04-24) — `GetMyMenuTreeQuery` extend 2 inherit root mới (PurchaseEvaluations + PeWorkflows). Fix bug: admin có perm nhưng menu children không hiện.
|
||||
- [x] ✅ **Sidebar accordion mutex Pe_*** (2026-04-24) — extend `AccordionContextValue` + `expandedPeCode` + URL sync pathname. 2 PE group không expand cùng lúc; Ct_ + Pe_ độc lập gia đình.
|
||||
- [x] ✅ **NavLink query active check** (2026-04-24) — `queryMatches` helper. 2 leaf cùng pathname `/purchase-evaluations` (Danh sách `?type=2` vs Duyệt `?type=2&pendingMe=1`) không còn cùng highlight. Áp dụng Ct_* + Pe_*.
|
||||
- [x] ✅ **Sidebar width + label nowrap** (2026-04-24) — w-64 → w-72 (288px). Top-level group: `text-xs tracking-wider` → `text-[11px] tracking-wide whitespace-nowrap`. "QUY TRÌNH CHỌN THẦU PHỤ - NCC" fit single-line.
|
||||
- [x] ✅ **PE detail flat layout** (2026-04-24) — Panel 2 bỏ 5 tabs, render flat 4 section (Thông tin / NCC tham gia / Hạng mục + Báo giá / **Bảng so sánh**). Panel 3 add Duyệt + Lịch sử sections dưới workflow timeline.
|
||||
- [x] ✅ **PE readOnly mode menu Duyệt** (2026-04-24) — pendingMe=1 → hide toàn bộ action (Sửa/Xóa/Thêm/Edit inline/Upload/Delete attachment). Giữ download + comment khi transition. Chip "chế độ duyệt" ở header.
|
||||
- [x] ✅ **Contract: move Lịch sử điều chỉnh Panel 2 → Panel 3** (2026-04-24) — Chi tiết HĐ full-width. Panel 3 bổ sung ContractChangelogsTab dưới Lịch sử duyệt.
|
||||
- [x] ✅ **Menu rename "Phương Án" → "Giải pháp"** (2026-04-24) — DbInitializer labels + backfill UPDATE existing rows. Giữ nguyên enum value + menu key + typeCode + policy name (zero breaking change).
|
||||
- [x] ✅ **Demo email @solutionerp.local → @solutions.com.vn** (2026-04-24) — AdminEmail const + 17 demo users rename trong source + BackfillUserEmailDomainAsync idempotent rename existing users (Email/NormalizedEmail/UserName/NormalizedUserName). Chạy trước SeedAdmin tránh duplicate. Password + role + refresh token giữ nguyên.
|
||||
- [ ] **fe-user Inbox** — hiện chỉ HĐ. Cần thêm section "Phiếu Duyệt NCC chờ tôi" (hoặc route `/pe-inbox` riêng).
|
||||
### C. Deploy / Ops chưa xong
|
||||
|
||||
### C. Edge case chưa test
|
||||
|
||||
- [ ] Reject path E2E: DangSoanThao → ChoPurchasing → (CCM reject) → DangSoanThao — verify approval row vẫn log
|
||||
- [ ] Xóa phiếu khi đã có Contract kế thừa (PE.ContractId set) — cascade delete child OK, Contract standalone không break, nhưng nên warning dialog
|
||||
- [ ] Admin tạo PE workflow v02 sau khi có phiếu pin v01 — invariant "phiếu cũ giữ cũ" chưa test (pattern giống HĐ, nên pass)
|
||||
- [ ] Change EvaluationType (A ↔ B) sau create — form hiện disable, đúng. User có đổi nhầm → phải xóa + tạo lại.
|
||||
|
||||
### D. Deploy / Ops
|
||||
|
||||
- [x] ✅ **Domain migration** *.huypham.vn → *.solutions.com.vn (2026-04-24) — SSH Claude vào VPS run `migrate-domains.ps1`: 3 HTTP binding + 3 cert Let's Encrypt + HTTPS binding. CORS BE + FE bundle VITE_API_BASE_URL đã rebuild. E2E verified 3 domain live + preflight OK. URL cũ vẫn active (fallback) — sẽ remove sau 1-2 ngày via `-RemoveOld`.
|
||||
- [x] ✅ **CI/CD auto-deploy commit 3990066+ lên prod** — runner Running, PE endpoint 401 OK, CORS allow admin.solutions.com.vn.
|
||||
- [ ] **win-acme scheduled task "unhealthy"** — auto-renew có thể fail. Fix: `wacs.exe` interactive → Manage Renewals → recreate task (hoặc ignore tới cert gần hết hạn 2026-06-18).
|
||||
- [ ] **Remove binding cũ huypham.vn** sau 1-2 ngày verify stable: `ssh vietreport-vps ; cd C:\solution-erp\scripts ; .\migrate-domains.ps1 -RemoveOld -SkipCert`
|
||||
- [ ] **Remove binding cũ `.huypham.vn`** sau 1-2 ngày verify stable: `ssh vietreport-vps ; cd C:\solution-erp\scripts ; .\migrate-domains.ps1 -RemoveOld -SkipCert`
|
||||
- [ ] **win-acme scheduled task "unhealthy"** — auto-renew có thể fail trước cert expire 2026-06-18. Fix: `wacs.exe` interactive → Manage Renewals → recreate task.
|
||||
|
||||
## ✅ Recently Done (newest on top)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user