6 Commits

Author SHA1 Message Date
91698a2f3b refactor: TypeScript 类型体系重构 + 状态管理 + 环境配置
All checks were successful
Deploy Admin Frontend / build-and-deploy (push) Successful in 13s
## 类型安全
- tsconfig: 开启 strict: true(豁免 noImplicitAny + strictNullChecks,待后续收紧)
- 新建 15 个领域类型文件 (src/types/),共 ~80 个类型定义
- 统一 barrel export (src/types/index.ts)
- 消除 9 个 [key: string]: any 接口
- 消除 22 个 API data: any 参数 → 替换为具体 DTO
- 消除 36 个 Promise<any> → 使用具体泛型
- 消除重复 PaginatedResponse,统一使用 PaginatedResult
- API 内联类型全部迁至 types/

## 状态管理
- 引入 Zustand (zustand + persist)
- 新建 src/stores/ui-store.ts — 侧边栏折叠状态持久化
- AdminLayout 接入 useUIStore

## 环境配置
- 新建 .env.example — 环境变量模板
- 新建 .env.production — 生产架构文档
- 新建 src/vite-env.d.ts — IDE 类型声明

## 通用 UI 类型
- 新建 src/types/ui.ts — TypedColumn<T>, SortState, FilterState 等

Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-04 11:02:52 +08:00
e69930f7f4 feat: Admin 管理后台学习功能 - 路由、菜单、类型定义
All checks were successful
Deploy Admin Frontend / build-and-deploy (push) Successful in 12s
- App.tsx: 主应用更新
- menu.tsx: 菜单配置新增学习模块
- routes/index.tsx: 路由注册
- types/learning.ts: 学习相关类型定义

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-18 11:23:01 +08:00
7e5ec80456 fix: M4 audit — add DELETE decisions, PATCH user-agreements, regular user list endpoint
Some checks failed
Deploy Admin Frontend / build-and-deploy (push) Failing after 8s
- ReleaseController: add DELETE decisions/:id
- ComplianceController: add PATCH user-agreements/:id
- AdminUsersMgmtController: add GET /admin-api/users (regular user listing with search)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-24 18:44:11 +08:00
eb2764518d feat: M4-01 — add cost, import, task, expiration metric cards to dashboard
Some checks failed
Deploy Admin Frontend / build-and-deploy (push) Failing after 7s
- Update DashboardStats type with new fields
- Add 4 new metric cards: today's AI cost, import tasks, failed tasks, upcoming expirations

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-24 17:36:26 +08:00
cf1ea873e0 refactor: replace any with proper types in admin page api calls
Some checks failed
Deploy Admin Frontend / build-and-deploy (push) Failing after 7s
- Add CacheStats, NotificationTemplate, NotificationLog, ReviewCardItem to types/api.ts
- Use PaginatedResult<T> for ReviewAdmin pagination
- All queryFn now declare explicit Promise<T> return type

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-24 16:22:47 +08:00
4dad572731 feat: add admin layout, auth, user management, and routing
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-21 17:19:58 +08:00