f3db9e6cc044ab3a4121f00bda31b19276cd8a04
Bro UAT S23 t2 catch: Plan K K2 implement F2 SAI semantic — set Phase=DaDuyet terminal auto-approve. Bro intent: "Duyệt thẳng đến CEO, bỏ qua các bước khác chứ ko phải chuyển sang đã duyệt." Refactor Service.cs ApproveV2Async F2 branch: - Resolve lastStepIdx = steps.Count - 1, lastLevelMaxOrder = max(LevelOrder) trong Step cuối - Advance pointer: CurrentWorkflowStepIndex = lastStepIdx + CurrentApprovalLevelOrder = lastLevelMaxOrder - Phase GIỮ NGUYÊN ChoDuyet — NV cuối (CEO/last approver) vẫn cần ký thật để tiến DaDuyet - Audit log "Approver skip thẳng tới Bước X Cấp Y (NV cuối) — bỏ qua các Bước/Cấp trung gian" - Guard no-op: actor đã ở slot cuối → fall through advance logic (normal → DaDuyet) (KHÔNG double-advance khi skipToFinal=true ngay slot cuối) - Reset SLA 7d cho NV cuối nhận lại FE × 2 app PeWorkflowPanel.tsx (mirror rule §3.9): - Description text update: "Phiếu sẽ skip tới NV cuối (CEO/cấp ký cuối) — NV cuối vẫn cần duyệt thật để hoàn tất." - Amber warning update: "Bỏ qua mọi Cấp/Bước trung gian, phiếu chuyển thẳng tới NV cuối. NV cuối vẫn phải ký duyệt thật để phiếu thành 'Đã duyệt'." Verify: - dotnet build production projects clean (0 err, 2 pre-existing warn) - npm run build × 2 app pass Pattern lesson saved memory: Service skipToFinal semantic = advance pointer NOT terminate. K7 tests TODO update: 3 Approver F2 tests assert pointer moved to last slot, NOT Phase=DaDuyet. Defer test fix sau UAT confirm UX. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
SOLUTION_ERP
Hệ thống quản lý Hợp đồng Nhà cung cấp / Thầu phụ / Tổ đội cho Công ty TNHH Xây dựng Solutions.
📘 AI context:
CLAUDE.md(pointer) →docs/CLAUDE.md(full)
Quick start (dev)
Yêu cầu: .NET 10 SDK, Node 20+, SQL Server (local hoặc qua Docker).
# 1. DB — chạy SQL Server qua Docker (nếu chưa có local)
docker compose up -d
# 2. Backend — migration + run Api (port 5443)
dotnet ef database update --project src/Backend/SolutionErp.Infrastructure --startup-project src/Backend/SolutionErp.Api
dotnet run --project src/Backend/SolutionErp.Api
# 3. Frontend admin (port 8082) — terminal mới
cd fe-admin
npm install
npm run dev
# 4. Frontend user (port 8080) — terminal mới
cd fe-user
npm install
npm run dev
Admin mặc định (sẽ seed sau Phase 1): admin@solutionerp.local / Admin@123456
Architecture
fe-admin (:8082) fe-user (:8080)
│ │
└────── /api proxy ──────┘
▼
SolutionErp.Api (:5443)
│
┌──────────────┼──────────────┐
▼ ▼ ▼
Application Domain Infrastructure ── SQL Server
Tech stack
- Backend: .NET 10 + Clean Architecture + CQRS (MediatR) + FluentValidation + AutoMapper + EF Core + ASP.NET Identity + JWT
- Frontend: React 18 + Vite + TypeScript + Tailwind + shadcn/ui + TanStack Query
- DB: SQL Server 2022
- Deploy: Windows Server + IIS
Roadmap
| Phase | Tuần | Focus |
|---|---|---|
| 0 Draft | T1 | Scaffold, parse FORM + QUY_TRINH |
| 1 Alpha Core | T2-4 | Auth, Permission, CRUD master |
| 2 Form Engine | T5-6 | Render template docx/xlsx |
| 3 Workflow | T7-9 | State machine 9 phase |
| 4 Report + Polish | T10-11 | Dashboard + Excel export |
| 5 Production | T12-13 | CI/CD IIS, UAT, go-live |
Chi tiết ở docs/changelog/migration-todos.md.
License
Proprietary — Công ty TNHH Xây dựng Solutions.
Description
Languages
C#
55%
TypeScript
42.7%
PowerShell
1.3%
JavaScript
0.3%
CSS
0.3%
Other
0.3%