diff --git a/docs/STATUS.md b/docs/STATUS.md index 7b2da38..5d52af1 100644 --- a/docs/STATUS.md +++ b/docs/STATUS.md @@ -21,6 +21,8 @@ _(không có — chờ UAT + quyết Tier 3 tiếp theo)_ | Ngày | Ai | Task | Commit | |---|---|---|---| +| 2026-04-21 | Claude | **Dynamic workflow policy per ContractType** — Domain `WorkflowPolicy` + registry (Standard 8-phase cho Thầu phụ/Giao khoán/NCC; SkipCcm 7-phase cho Dịch vụ/Mua bán/Nguyên tắc). `ContractWorkflowService` dùng `policy.ForContract(c)` thay hardcoded dict. FE xóa `NEXT_PHASES` hardcoded, dùng `contract.workflow.nextPhases` từ BE. `WorkflowSummaryCard` timeline visual. E2E verified: HĐ Thầu phụ có phase 6 CCM, HĐ Mua bán skip. Gotcha #21 resolved | `cae4d84` | +| 2026-04-21 | Claude | **PDF export + .doc/.xls auto-convert + DynamicForm** — LibreOffice 25.8.6 install VPS, `IDocumentConverter` shell soffice `--convert-to pdf/docx/xlsx` với timeout+temp isolation, admin upload .doc auto-convert .docx. `DynamicForm` component render từ FieldSpec JSON (text/textarea/number/date/currency/select). FE Form↔JSON toggle. E2E verified PDF 488KB/126 pages | `e459097` + `6bbd894` | | 2026-04-21 | Claude | **Form template builder CRUD** — Admin tự upload `.docx/.xlsx` templates qua UI (không cần dev). BE: UploadContractTemplate (multipart, 10MB, FormCode regex unique, FieldSpec JSON validation) + UpdateContractTemplate (metadata + FieldSpec + IsActive) + DeleteContractTemplate (soft via IsActive=false). File lưu vào `wwwroot/templates/{formCode}_{guid}.{ext}`. FE: FormsPage với upload dialog (file picker + FormCode + Loại HĐ + FieldSpec JSON textarea) + row actions 3 nút (render/edit/delete). E2E verified upload 200 + update 204 + delete 204 | `166d26c` | | 2026-04-21 | Claude | **Fix Gitea 500 sau Install Web-WebSockets** — Feature install khóa section `` ở applicationHost.config → tất cả IIS site fail. Fix: `appcmd unlock config -section:system.webServer/webSocket`. Gotcha #25 | `c52186b` | | 2026-04-21 | Claude | **SignalR realtime notifications E2E** — Clean-arch split (IRealtimeNotifier Application + SignalRNotifier Api + NotificationPushInterceptor Infrastructure). Hub `/hubs/notifications` JWT via `?access_token=` query (WebSocket headers limit). Interceptor SavedChangesAsync auto-push → zero caller changes. FE singleton connection với auto-reconnect + toast trên push + query invalidation. IIS WebSocket module enabled. Hub verified: negotiate 200 với JWT (WebSockets/SSE/LongPolling transports), 401 không auth | `ea9ab5e` | @@ -75,10 +77,11 @@ Session logs: [P0](changelog/sessions/2026-04-21-1045-phase0-scaffold.md) · [P1 - [x] Attachment upload BE endpoint + FE drag-drop ✓ - [x] SignalR real-time push (auto-push interceptor + client auto-reconnect) ✓ - [x] Form template builder CRUD (admin upload .docx/.xlsx + FieldSpec JSON editor) ✓ -- [ ] Form builder iteration 2: render form UI từ FieldSpec JSON (thay textarea) -- [ ] PDF export (LibreOffice headless pipeline hoặc QuestPDF re-render) -- [ ] Email outbox cho Notification (MailKit, SMTP config) -- [ ] .doc → .docx conversion UI/pipeline (3 file pending) +- [x] Form builder iteration 2: DynamicForm render UI từ FieldSpec ✓ +- [x] PDF export qua LibreOffice headless ✓ +- [x] .doc → .docx auto-conversion khi upload template ✓ +- [x] Dynamic workflow policy per ContractType (Standard/SkipCcm) ✓ +- [ ] Email outbox cho Notification (MailKit, SMTP config — cần user config) ### Phase 5.1 Security — hầu như xong