From 0048a2e83a67d42051054fe9eefd84eb186a8f6a Mon Sep 17 00:00:00 2001 From: pqhuy1987 Date: Fri, 24 Apr 2026 10:25:41 +0700 Subject: [PATCH] =?UTF-8?q?[CLAUDE]=20Docs:=20STATUS=20+=20HANDOFF=20domai?= =?UTF-8?q?n=20migration=20E2E=20done=20(huypham.vn=20=E2=86=92=20solution?= =?UTF-8?q?s.com.vn)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/STATUS.md | 14 ++++++-------- .../Persistence/DbInitializer.cs | 1 + 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/docs/STATUS.md b/docs/STATUS.md index e1ea2c6..3faf618 100644 --- a/docs/STATUS.md +++ b/docs/STATUS.md @@ -49,19 +49,17 @@ ### D. Deploy / Ops -- [ ] **Verify CI/CD apply commit 3990066 lên prod** — hiện `/api/purchase-evaluations` trả 404 (phiên bản cũ). Check runner status: - ```powershell - Get-Service *gitea-runner* ; & "C:\nssm\nssm.exe" status gitea-runner - # Nếu Stopped → Start-Service gitea-runner - ``` - Sau đó recheck `curl https://api.solutions.com.vn/api/purchase-evaluations` → 401 = deploy OK. - -## ✅ Recently Done (newest on top) +- [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` ## ✅ Recently Done (newest on top) | Ngày | Ai | Task | Commit | |---|---|---|---| +| 2026-04-24 | Claude | **Rebrand 3 domain huypham.vn → solutions.com.vn E2E** — 18 file repo (FE env + scripts + CI/CD + docs + skill + code comments). Viết `scripts/migrate-domains.ps1` (ASCII-only gotcha #30) chạy trên VPS: 3 HTTP binding mới + 3 cert Let's Encrypt (HTTP-01 via SelfHosting) + auto HTTPS 443 + redirect. CI/CD auto-deploy commit `66c1a5c+b93dacf`: appsettings.Production.json CORS mới + FE bundle `VITE_API_BASE_URL=api.solutions.com.vn`. E2E verified: `/api/purchase-evaluations` 401, CORS preflight OK, FE dist có domain mới. URL cũ fallback. Claude SSH tự chạy (không cần user RDP). | `66c1a5c` · `b93dacf` | +| 2026-04-23 | Claude | **SeedDemoUsersAsync robust reconcile + 16 demo users** — Reconcile pattern (per-user try-catch, fix drift dept/position/role nếu user existing). 13 → 16 demo (+bod.tran NĐUQ thứ 2, +pm.le PM thứ 2, +nv.truong NV CCM). Detailed log created/fixed/failed counts. Resolves prod issue: chỉ thấy admin user vì old skip-if-exists fail silent. | `a667665` | | 2026-04-23 | Claude | **G-084 hardening** — localhost → 127.0.0.1 trong `deploy-iis.ps1` + skill `iis-deploy-runbook`. Thêm gotcha #33 (IPv4/IPv6 port hijack) ref VietReport incident + 3 rules (reverse-proxy IP literal / backend loopback IPv4 explicit / service dependency). SOLUTION_ERP risk thấp (API in-process IIS, no ARR proxy) nhưng chuẩn hóa cho tương lai. | `3990066` | | 2026-04-23 | Claude | **Kế thừa HĐ từ phiếu PE** — `CreateContractFromEvaluationCommand` guard DaDuyet + SelectedSupplier + ContractId=null → tạo Contract draft với SupplierId/ProjectId/GiaTri kế thừa. Link 2 chiều PE.ContractId. 2 endpoint mới (approved-pending-contract + create-contract). FE PeDetailTabs InfoTab banner emerald + CreateContractDialog pick ContractType 7 loại. | `a385d70` | | 2026-04-23 | Claude | **PE FE — 2 app pages (List/Create/Detail 3-panel)** — Types + PurchaseEvaluationsListPage 3-panel + PurchaseEvaluationCreatePage + PeDetailTabs (5 tab: Thông tin/NCC/Hạng mục+Quote matrix/Duyệt/Lịch sử) + PeWorkflowPanel timeline. Menu resolver Pe_* → /purchase-evaluations?type=N. fe-user mirror. TS build pass cả 2 app. | commit Phase 3 | diff --git a/src/Backend/SolutionErp.Infrastructure/Persistence/DbInitializer.cs b/src/Backend/SolutionErp.Infrastructure/Persistence/DbInitializer.cs index f155e5c..fe15d03 100644 --- a/src/Backend/SolutionErp.Infrastructure/Persistence/DbInitializer.cs +++ b/src/Backend/SolutionErp.Infrastructure/Persistence/DbInitializer.cs @@ -47,6 +47,7 @@ public static class DbInitializer await BackfillContractCodesAsync(db, codeGen, logger); await SeedDemoContractsAsync(db, userManager, codeGen, logger); + await SeedDemoPurchaseEvaluationsAsync(db, userManager, logger); await WarnDefaultAdminPasswordAsync(userManager, logger); }