[CLAUDE] Docs: chot session 3 — PE polish iter 2 + domain rebrand + 5 gotcha moi
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 request: 'Chot lai toan bo MD de sang session moi'. Session 3 (2026-04-24) — ~15 commit feat/fix PE module + domain migration: - Domain 3 subdomain huypham.vn → solutions.com.vn E2E live - PE rename 'Phuong An' → 'Giai phap' + backfill DB - Menu tree inheritance extend Pe_*/PeWf_* - Accordion mutex Pe_* + sidebar w-72 + label nowrap - NavLink queryMatches (fix 2 leaf cung highlight) - PE detail flat layout: Panel 2 = 4 section, Panel 3 + approvals/history - Upload file dinh kem per-NCC (SupplierAttachmentsCell) + Bang so sanh tong - readOnly mode menu 'Duyet' (pendingMe=1) - HD move Lich su dieu chinh → Panel 3 - Demo email rebrand @solutionerp.local → @solutions.com.vn + BackfillUserEmailDomain Docs updated (6 file): - STATUS.md: +9 row Recently Done session 3. In Progress tick 10+ done. Phase hien tai = 'UX polish hoan thien, UAT-ready'. - HANDOFF.md: TL;DR session 3 summary. Priority 0 = 3 task MISSING cuoi (Designer UI, Y kien 4 phong ban, Export PDF). Login email moi. - gotchas.md: +5 entry (#34 NavLink query, #35 menu inheritance extend, #36 Vite env rebuild, #37 PS 5.1 ASCII, #38 Identity rename 4 field) + checklist debug +5 entry. - ef-core-migration SKILL: migration 13 AddPurchaseEvaluationCodeSequences + Phase 6 update section (ComparisonTable enum + BackfillUserEmail). - skills/README: ef-core-migration 13 migration label updated. - docs/changelog/sessions/2026-04-24-chot-session-3-pe-polish.md: session log 15 commit + bugs + stats + next priorities session 4. Memory project_solution_erp.md: Phase 6 iter 2 DONE. Domain rebrand DONE. Session 4 priority 3 PE gap remaining. Stats: 47 DB tables (+1 MaPhieu seq), ~113 endpoint (+3 PE attachments), 13 migrations, 38 gotchas, ~85 commits total.
This commit is contained in:
@ -1,30 +1,42 @@
|
||||
# HANDOFF — Brief 5 phút cho session tiếp theo
|
||||
|
||||
**Last updated:** 2026-04-24 sáng (Phase 6 — PE polish: demo seed + MaPhieu atomic + Pe_* perm defaults)
|
||||
**Last updated:** 2026-04-24 chiều (Phase 6 — **PE polish iter 2 + domain rebrand hoàn tất, UAT-ready**)
|
||||
|
||||
## TL;DR
|
||||
|
||||
**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). **Polish session 2026-04-24:**
|
||||
demo seed 4 phiếu (`[DEMO] PE/.../A-001..A-003 + B-001`) + MaPhieu atomic
|
||||
sequence (mirror ContractCodeSequences) + Pe_* permission defaults cho 7
|
||||
role business → admin login thấy data ngay. Còn polish nhỏ (designer UI,
|
||||
attachments, details mapping, export PDF) — xem STATUS.md §🔥 In Progress.
|
||||
**PE module UX polish gần complete.** Session 3 (24/04) apply 10 commit
|
||||
fix tất cả UX friction user báo:
|
||||
- Rename menu "Phương Án" → "Giải pháp"
|
||||
- Menu tree inheritance Pe_*/PeWf_* (fix bug children không hiện)
|
||||
- Accordion mutex 2 PE group + sidebar w-72 nowrap label
|
||||
- NavLink active check query string (fix 2 leaf cùng highlight)
|
||||
- PE detail flat layout: Panel 2 = 4 section (Thông tin/NCC/Hạng mục/**Bảng so sánh**), Panel 3 thêm Duyệt + Lịch sử thay đổi
|
||||
- Upload file đính kèm per-NCC (SupplierAttachmentsCell) + Bảng so sánh tổng
|
||||
- readOnly mode cho menu "Duyệt" (pendingMe=1)
|
||||
- HĐ: move Lịch sử điều chỉnh Panel 2 → Panel 3
|
||||
- Demo email rebrand `@solutionerp.local → @solutions.com.vn` với backfill
|
||||
|
||||
**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).
|
||||
**Domain migration (session 2):** 3 subdomain `.huypham.vn` → `.solutions.com.vn`
|
||||
live E2E — `api/admin/eoffice.solutions.com.vn`. Cert Let's Encrypt + CORS +
|
||||
FE bundle VITE_API_BASE_URL đều đã apply.
|
||||
|
||||
**Tổng:** 47 DB tables (+1 `PurchaseEvaluationCodeSequences`), ~110 endpoints,
|
||||
13 migrations (+13 `AddPurchaseEvaluationCodeSequences`), 33 gotchas.
|
||||
**Tổng:** 47 DB tables, ~113 endpoints, 13 migrations, 33 gotchas, 20+ commit
|
||||
session 3 push lên Gitea.
|
||||
|
||||
## ⚠️ CẢNH BÁO session tiếp
|
||||
## ⚠️ CẢNH BÁO session tiếp (Session 4)
|
||||
|
||||
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
|
||||
1. **Chưa xóa binding cũ `.huypham.vn`** — vẫn active fallback. Sau 1-2 ngày
|
||||
verify stable → `.\migrate-domains.ps1 -RemoveOld -SkipCert` trên VPS.
|
||||
2. **win-acme scheduled task "unhealthy"** — cert auto-renew có thể fail
|
||||
khi gần 2026-06-18. Fix: mở `wacs.exe` interactive → Manage Renewals →
|
||||
recreate task.
|
||||
3. **PE còn 3 task MISSING** cho feature-complete (xem STATUS §A):
|
||||
- PE Workflow admin designer UI `/system/pe-workflows/:typeCode`
|
||||
- Auto-map PE Details → Contract 7 per-type Details khi gen HĐ
|
||||
- Section "Ý kiến 4 phòng ban" (Phê duyệt/CCM/MuaHàng/SM-PM)
|
||||
4. **Login email mới** `admin@solutions.com.vn` / `Admin@123456` — old
|
||||
`@solutionerp.local` đã bị rename 401.
|
||||
5. **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
|
||||
@ -105,24 +117,25 @@ Login: `admin@solutionerp.local` / `Admin@123456`
|
||||
|
||||
## Cần làm kế tiếp
|
||||
|
||||
### 🔥 Priority 0 — PE module refinement (session tiếp)
|
||||
### 🔥 Priority 0 — PE feature gap (session 4)
|
||||
|
||||
Xem **STATUS.md §🔥 In Progress** đầy đủ (nhóm A/B/C/D). Tóm tắt nhanh:
|
||||
Xem **STATUS.md §🔥 In Progress** đầy đủ (nhóm A/B/C/D). 3 task MISSING cuối:
|
||||
|
||||
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~~ ✅ DONE (2026-04-24, 4 phiếu varied A/B × phase).
|
||||
6. ~~Permission grant Pe_* defaults~~ ✅ DONE (2026-04-24, 7 role × 9 menu key).
|
||||
7. ~~MaPhieu format chính thức~~ ✅ DONE (2026-04-24, atomic `PE/{YYYY}/{A\|B}/{Seq:D3}`).
|
||||
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).
|
||||
1. **PE Workflow admin designer UI** `/system/pe-workflows/:typeCode` — mirror pattern `WorkflowsPage.tsx` + `WorkflowDesigner.tsx`. BE cần `PeWorkflowAdminFeatures.cs` (GetOverview + CreateNewVersion) + `PeWorkflowsController.cs`. Framework backend đã sẵn (3 bảng `PurchaseEvaluationWorkflow*` + `FromDefinition` builder), chỉ thiếu wire UI.
|
||||
2. **Ý 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.
|
||||
3. **Export phiếu PDF/Excel** — tái dùng `IDocumentConverter` + template `PE-TrinhDuyet.docx`.
|
||||
4. **Payment terms tách field** từ JSON blob → 6 field riêng (optional UX polish).
|
||||
5. **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
|
||||
```
|
||||
**Đã xong trong session 3 (check STATUS Recently Done):**
|
||||
- ~~PE Attachments upload~~ ✅ (per-NCC + Bảng so sánh tổng)
|
||||
- ~~Menu tree inheritance Pe_*/PeWf_*~~ ✅
|
||||
- ~~Accordion mutex + sidebar width + label nowrap~~ ✅
|
||||
- ~~NavLink query active check~~ ✅
|
||||
- ~~PE detail flat layout + readOnly mode~~ ✅
|
||||
- ~~HĐ move Lịch sử điều chỉnh → Panel 3~~ ✅
|
||||
- ~~Menu rename Phương Án → Giải pháp~~ ✅
|
||||
- ~~Demo email rebrand solutionerp.local → solutions.com.vn~~ ✅
|
||||
|
||||
### A. Hard blockers (chờ user / ops)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user