a32c0a0731
fix(admin): 前端功能与安全修复(角色勾选/月视图新建/附件预览/考勤 late 等)
...
由 OCR(open-codereview.ai,deepseek-v4-flash)审查驱动修复:
- Roles 多组勾选、Schedules 月视图新建、useDirtyGuard 稳定引用
- JinshujuMatchModal success:false、Attendance store 订阅、EditableCell Enter、DynamicChart 空数据、渲染期 ref
- AttachmentsTab 附件预览不再 window.open(防存储型 XSS)+ 请求乱序防护
- 考勤 late 计入出勤率与主状态
Reviewed-by: OCR (open-codereview.ai)
2026-08-09 21:29:54 +08:00
c10476d203
feat(admin): 弹窗未保存内容保护与空状态引导扩展
...
- 新增 useDirtyGuard hook:关闭弹窗时若表单被修改,先确认再关闭
- 接入 17 个弹窗:账号/密码/档案、角色、教室、宿舍/床位/柜子、
考勤机、机构、班级、教师、考试、排课、入住/退宿/换房、费用
(子组件弹窗用 useEffect 在回填后快照,时序正确)
- 学生列表空状态带「添加学生」引导动作
- 排课创建成功提示「同步钉钉」,考试创建成功提示「去详情录成绩」
aislop scan: 5 引擎 0 issues
2026-08-07 17:56:13 +08:00
67435e46ca
feat(admin): 用户体验体系化提升与高危缺陷修复
...
UX 缺陷修复:
- 校验失败不再卡死弹窗按钮(Users/Roles/Bills)
- 押金收取/批量收取/添加分期防重复提交;切换房型重置勾选
- AI 表单/批量确认不再出现"假成功"
- Dashboard 各数据模块独立加载,单接口失败不再整页清零
- 房间可视化加载失败显示错误态而非永久转圈
- 学生编辑表单回填前重置,避免字段残留污染
- 覆盖式导入增加二次确认;恢复默认考勤时段确认并同步表单
- 金数据匹配关闭前确认,同步中禁止误关
体验提升:
- 新增统一 QueryErrorState/QueryEmpty,20+ 页面加载失败显示错误态与重试
- 全局 ErrorBoundary + RouteKeeper 逐页兜底
- 新增 usePageVisible/useVisibleRefetch,保活页面切回自动刷新数据
- 新增首次登录角色引导 RoleTour 与业务闭环 NextStepHint 引导卡
- 重构 A2UI:useSubmissionState/useXCardSurface 收敛状态与命令生命周期,
ArtifactErrorBoundary 渲染降级,图表空数据占位
- AI 助手欢迎语与建议话术按角色定制,会话列表空态引导
- 更新 a2ui-contract.md 契约文档说明实现现状
2026-08-07 17:23:23 +08:00
fd39e1686a
feat: 重构各业务模块管理页面与服务
2026-08-05 17:12:00 +08:00
375c7ec60b
feat: refine admin forms, attendance and finance workflows
...
Squash merge PR #23 .
Included changes:
- complete occupancy check-in required fields/default payload
- improve responsive admin management pages
- fix attendance edge cases and attendance period config
- refine wallet/finance-related workflow handling
Checks:
- npm run typecheck -w apps/admin
- npm run typecheck -w apps/server
2026-07-18 12:54:10 +00:00
f7328d670d
fix: 归档删除改为软删除
2026-07-17 14:13:17 +08:00
e45da7f998
feat: improve attendance scheduling and API validation
2026-07-14 23:12:14 +08:00
6396d3e934
fix(schedules): support editable schedule notes
2026-07-13 16:12:21 +08:00
cc4f4dae4e
fix: audit remediation — SSE user scoping, FK transactional safety, UI error handling
...
- H4: scoped SSE import progress to exact userId match; non-HTTP events excluded from all subscribers
- H2: moved PRAGMA foreign_key_check inside SQLite transaction before COMMIT; violations rollback preserving old tables
- M1: removed dead axios-style error branch from extractErrorMessage (interceptor already unwraps)
- M2: split handleSave try/catch — save errors vs reload errors shown distinctly
- M3: added provider field validation before AI config test request
- Added SSE scoping regression tests (import service + controller)
- Added FK check failure rollback test (database-migrations.spec)
- Updated controller spec expectations for userId parameter
Co-authored-by: Code Review <branch-review>
2026-07-12 22:59:03 +08:00
b6fca99390
fix: align permission navigation and page access
2026-07-11 14:55:49 +08:00
8ed1682b90
fix permissions and teacher attendance workflows
2026-07-10 20:40:52 +08:00
55881863c1
feat(sync): sync class schedules to DingTalk students
...
Group active schedules by class, resolve enrolled students through DingTalk mappings, reuse shifts and attendance groups, and expose class-based sync status in the admin UI.
2026-07-10 14:11:39 +08:00
d1d5b4681b
feat(schedules): replace teacher ID input with searchable user select, show teacher name, add schedule button
2026-07-09 16:31:53 +08:00
454a0d24c6
fix: release beds/lockers in batchCheckOut
...
The batchCheckOut method was not releasing assigned beds and lockers
after checkout, leaving them orphaned as 'occupied'. Added the same
release pattern used in checkOut() — using runner.manager.update()
since batchCheckOut operates inside a QueryRunner transaction.
2026-07-09 12:05:36 +08:00
42d3f0e27f
feat: DingTalk attendance import + integration config + expense types + UI polish
...
Server:
- Add DingTalk attendance import service with SSE progress streaming
- Add IntegrationConfig entity & module for multi-tenant DingTalk setup
- Add ExpenseType entity & ExpenseTypesModule
- Add SeedModule for DB initialization
- Add UserDingMapping entity for DingTalk user linkage
- Attendance service: import flow with dedup & student auto-mapping
- Rooms service: time-range overlap queries
- Sync controller/service: DingTalk integration wiring
- Permission guard: refactor to pure re-export
- Campus scope middleware: tenant-aware filtering
Admin UI:
- Attendance page: import UI with progress & result summary
- All pages: tableStyle/tablePagination standardization
- Login page: responsive styling
- Sensitive data: useViewSensitive hook for masked viewing
- Vite config: path aliases, build optimization
- Test infra: vitest config, test utilities
Docs: PRD DingTalk batch 1 & 2 design docs
2026-07-09 09:11:56 +08:00
693ba5d3b8
feat: complete remaining PRD tasks — RBAC nodes and staff split, schedule month view, auto-generate attendance from schedules, plus fix TypeORM name
2026-07-06 18:10:14 +08:00
6b0a21d266
fix: resolve all admin typecheck errors (typed api wrapper, unused imports, missing hooks, PermissionButton children)
2026-07-06 01:02:26 +08:00
ab5898e2cf
fix: replace deprecated antd APIs (Drawer width→size, Modal destroyOnClose→destroyOnHidden)
2026-07-05 21:47:32 +08:00
92e6ba0e34
feat(schedules): implement frontend schedule week view page
...
- Create SchedulesPage with week selector, classroom/class filters
- Matrix: rows=classrooms, cols=Mon-Sun, cells show subject/teacher/time
- Click empty cell -> create modal with schedule form
- Click occupied cell -> detail modal with delete button
- Conflict: backend 409/400 -> message.error with conflict info
- Route /schedules with PermissionRoute (schedule:view)
- Menu item '排课管理' with CalendarOutlined icon
2026-07-05 19:28:18 +08:00