Commit Graph

125 Commits

Author SHA1 Message Date
huangping 8ee9aa51d8 feat: add ONLYOFFICE document preview for contract attachments
DocumentPreviewController provides preview config and file streaming endpoints. ContractDetailView adds 'preview' button to attachment list and opens ONLYOFFICE iframe dialog.

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-27 08:37:09 +08:00
huangping 8c788ea388 feat: add dashboard with ECharts and SN/callback statistics
Added sn-stats and callback-stats endpoints. HomeView now shows stat cards, pending todos, recent activity, and ECharts pie charts for SN status distribution and callback status. Installed echarts dependency.

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-27 08:37:09 +08:00
huangping 5d50d2819b feat: add system params persistence and delivery gate enforcement
V25 migration creates platform_system_param table. SystemParamController replaces localStorage MVP with backend persistence. LicenseSnService.create now checks deliveryGateEnabled flag and blocks SN creation when gate is on but no deliveries completed.

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-27 08:37:02 +08:00
huangping 8c167d4909 feat: add user management CRUD and platform_user table
V24 migration creates platform_user table. Backend UserAdminController provides list/create/update/toggleStatus. Frontend UserManagementView enables admin to add/edit/disable users. Replaces hardcoded auth with database-backed user lifecycle.

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-27 08:37:02 +08:00
huangping 118790486a fix: rewrite AuthController with database-driven authentication
Replaced hardcoded admin/sales/delivery/ops users with PlatformUser table lookups. Fixed changePassword to use JWT SecurityContext for current user lookup. Implemented real resetPassword and forceLogout endpoints (previously no-ops). Added BCrypt password verification.

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-27 08:37:02 +08:00
huangping 7fb3eb53c3 feat: add customer summary aggregation with real contract count
Fixed getCustomerSummary() to actually query contract count instead of returning hardcoded 0. Injected PlatformContractMapper for the query.

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-27 08:36:53 +08:00
huangping 23984a3651 feat: add failure reason persistence and batch replay endpoints to callback inbox
Added failureReason field to CallbackInboxStatusPatchRequest so Ops can categorize failure causes. Added POST /batch-replay for mass reprocess and GET /stats/backlog for backlog monitoring.

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-27 08:36:53 +08:00
huangping 25395a648b fix: remove error message leakage in LicenseController and ContractController
Replaced try-catch blocks returning e.getMessage() in HTTP 500 responses with proper ResponseStatusException propagation through global ApiExceptionHandler. Added file size (50MB) and MIME type whitelist validation to contract attachment upload.

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-27 08:36:53 +08:00
huangping 0abb60fd2d fix: resolve 500 errors from missing @RequestParam value attributes
All @RequestParam annotations without explicit value= attributes cause parameter name resolution failures when Java -parameters compiler flag is not set. Fixed AuditController, IntegrationCatalogController, CustomerController, ReportController, UserAdminController, SecurityConfig.

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-27 08:36:43 +08:00
huangping 4913d1c556 feat(cli): add migrate command, platform API, config management 2026-05-25 15:20:13 +08:00
huangping 4b79533c70 feat(cli): add craftlabs-auth-cli with status/activate/check/info/release commands 2026-05-25 15:16:39 +08:00
huangping 027ecbd375 feat(sdk): add JNA bridge to replace JNI for Rust C ABI access 2026-05-25 15:15:14 +08:00
huangping f82a2a7b24 docs: add CLI tool design and update implementation order (SDK->CLI->GUI) 2026-05-25 15:12:08 +08:00
huangping 563844e361 docs: add client authorization tool design spec (Tauri + Vue 3) 2026-05-25 15:10:00 +08:00
huangping 147142f44f feat(m10): add audit retention policy configuration 2026-05-25 15:05:54 +08:00
huangping 250c5cbfeb feat(m9): add subscription report config (localStorage MVP) 2026-05-25 15:05:18 +08:00
huangping 1cef437fb3 feat(m5): add simulated callback event delivery for testing 2026-05-25 15:04:03 +08:00
huangping ca1279162b feat(m1): add customer freeze/unfreeze 2026-05-25 15:03:23 +08:00
huangping d3d26ba9b4 feat(sdk): add JNI bridge between Java NativeBridge and Rust C ABI 2026-05-25 15:02:12 +08:00
huangping 7104976bf9 feat(m11): add password reset, owner fields, system params 2026-05-25 14:53:02 +08:00
huangping d6750f1e93 feat: add feature mapping view and notification template config 2026-05-25 14:52:45 +08:00
huangping 0ae3987fb2 feat(m5): add failure reason tagging and batch retry 2026-05-25 14:52:06 +08:00
huangping 6522f02b54 feat(m4): add batch SN ops, delivery gate, console link, SN tags 2026-05-25 14:51:41 +08:00
huangping 4dc8341e7e feat(m2): add SKU mapping between contract lines and license features 2026-05-25 14:50:31 +08:00
huangping 8d1081b2b9 feat(m2): add external/internal order ID to contracts 2026-05-25 14:49:40 +08:00
huangping 16ab474bee feat(m3): add field environment info (address, network, contact) to delivery 2026-05-25 14:49:34 +08:00
huangping 0062b20ea1 feat(m11): expand v-permission to all CRUD pages 2026-05-25 14:46:42 +08:00
huangping 85d2b85b6a fix: add userId filter to audit search and login lockout logic 2026-05-25 14:46:42 +08:00
huangping e96383433d feat(m1): add project stakeholder CRUD 2026-05-25 14:46:30 +08:00
huangping 4bbf1f552f feat(m2): add signing/effective/end date fields to contracts 2026-05-25 14:46:19 +08:00
huangping 1726f486fa fix: add amount UI to contract lines and reason code to SN activation 2026-05-25 14:45:54 +08:00
huangping 13c42d2c87 docs: add remaining gaps WBS execution plan (P0/P1/P2 + SDK JNI) 2026-05-25 11:13:56 +08:00
huangping ff534fc325 ci: add Gitea Actions deploy workflow and runner setup guide 2026-05-25 11:08:48 +08:00
huangping 769bf721f4 fix: handle ConstraintViolationException as 400 instead of 500 2026-05-25 02:38:29 +08:00
huangping 14b86df124 docs(db): add Chinese comments for all 28 platform tables and columns 2026-05-25 02:28:02 +08:00
huangping 3bb19537fe feat(m11): add v-permission directive and button-level permission codes 2026-05-25 01:41:50 +08:00
huangping 1f599e5646 feat(m11): align role model with product definition (SALES/DELIVERY/LICENSE_OPS) 2026-05-25 01:41:04 +08:00
huangping d933639518 feat(m10): add audit event search and CSV export 2026-05-25 01:38:48 +08:00
huangping c088c0ed71 feat(m9): add CSV export for contract-sn report 2026-05-25 01:37:37 +08:00
huangping 46f28d2d97 feat(m6): add JSON template CRUD with versioning 2026-05-25 01:36:40 +08:00
huangping ae880c47b2 feat(m6): add BitAnswer ID mapping CRUD 2026-05-25 01:35:25 +08:00
huangping 36b6e395c5 feat(m11): add password change with profile page 2026-05-25 01:33:54 +08:00
huangping 3ab1165e69 feat(m11): add login failure lockout after 5 failed attempts in 15 min 2026-05-25 01:33:11 +08:00
huangping c2118b16aa feat(m11): add idle timeout auto-logout with warning dialog 2026-05-25 01:32:51 +08:00
huangping 33773928c3 feat(m2): add contract change versioning with CHANGING state 2026-05-25 01:32:20 +08:00
huangping 88c4e22d36 feat(m2): add contract attachment upload and listing 2026-05-25 01:31:01 +08:00
huangping cc7fef8ae9 feat(m4): add SN batch import with text area dialog 2026-05-25 01:29:40 +08:00
huangping b5317d8f58 feat(m1): add customer detail aggregation view 2026-05-25 01:28:36 +08:00
huangping bfb8f23399 feat(m1): add planned start/end dates and project manager to projects 2026-05-25 01:27:15 +08:00
huangping b536a999f0 feat(m1): add industry/address/billing/customerCode fields to customer 2026-05-25 01:26:22 +08:00