7c0772accaba38b0664958f0f9c45a1eecb67fc2
All checks were successful
Deploy SOLUTION_ERP / build-deploy (push) Successful in 3m1s
ContractNStageApprovalTests.cs (NEW, 6 test) cover N-stage logic Mig 20 mirror PeNStageApprovalTests pattern: 1. NStage_FirstInner_NV_Approve_Blocks_Phase_Transition NV cấp 1 → 1 row InnerStepId set, phase chưa đổi. 2. NStage_All_3_Levels_Sequential_Pass_Allow_Phase_Transition NV → PP → TP duyệt lần lượt → 3 rows + phase chuyển. 3. NStage_TP_Bypass_Skips_Lower_Levels_Same_Dept TP có CanBypassReview → 1 transition tạo 3 rows (NV+PP IsBypassed, TP exact match). 4. NStage_Wrong_Department_Throws_Forbidden Actor dept khác inner step's dept → ForbiddenException. 5. NStage_Reject_Clears_InnerStep_Rows_At_Phase NV approve → 1 row. Admin reject → DangSoanThao + RejectedFromPhase set + N-stage rows cleared. 6. LegacyFallback_NoInnerSteps_Uses_2Stage_Logic Contract không pin WorkflowDefinitionId → fallback hardcoded Standard policy → no inner steps → legacy 2-stage Stage=Review row. Phase pair DangKiemTraCCM → DangTrinhKy + role CostControl khớp Standard.Transitions (DangGopY → DangDamPhan trong test ban đầu fail vì policy chỉ cho [Drafter, DeptManager]; switched to phase pair work). Helper SeedWorkflowDefinitionAsync 2 step adjacent (DangGopY + DangDamPhan) + SeedContractAsync với Project + Supplier seed cho FK. FakeChangelogService + FakeContractCodeGenerator stubs (no-op cho tests không cần verify changelog/codegen path). Verify: 89 → **95 test pass** (54 Domain + 41 Infra: 17 codegen + 6 PE WF versioning + 6 PE 2-stage + 6 PE N-stage + 6 Contract N-stage). Pending Chunk E: API check (Workflows controller likely auto-bind via DTO, skip nếu OK). 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%