Commit Graph

39 Commits

Author SHA1 Message Date
f07ffdc64c refactor: 前端登录/权限/界面状态迁移至 zustand 2026-08-04 14:41:27 +08:00
b8d5927a16 Merge branch 'review-pr44' 2026-07-23 15:21:51 +08:00
fb787c3e0d Merge pull request '集成 AI 对话与只读查询工具' (#44) from xiongyuxing/gongxue-base:main into main 2026-07-23 07:15:07 +00:00
c401766bc5 fix: replace lucide-react Sparkles with RobotOutlined to avoid extra dependency 2026-07-23 15:02:36 +08:00
a7a7af1667 fix: close permission review gaps
fix: harden permission-gated UI — minimum-org endpoint, modal/Popconfirm fail-closed on revocation
2026-07-23 14:28:58 +08:00
f3b59935d6 feat: 集成 AI 对话与只读查询工具 2026-07-23 14:24:40 +08:00
c98d37307e fix: align permission-gated UI actions 2026-07-23 12:34:37 +08:00
cbc04fea4f feat: add exam score management
Some checks failed
CI 检查 / lint (pull_request) Has been cancelled
CI 检查 / typecheck (pull_request) Has been cancelled
CI 检查 / test (pull_request) Has been cancelled
2026-07-21 16:04:17 +08:00
a9961d1a99 feat: 更新系统名称为学生管理系统,修改相关页面标题和生成的账单信息
Some checks failed
CI 检查 / lint (pull_request) Has been cancelled
CI 检查 / typecheck (pull_request) Has been cancelled
CI 检查 / test (pull_request) Has been cancelled
2026-07-21 10:32:21 +08:00
29c55ebff1 feat: 添加可拖拽的路由停靠组件,支持动态标签管理
Some checks failed
CI 检查 / lint (pull_request) Has been cancelled
CI 检查 / typecheck (pull_request) Has been cancelled
CI 检查 / test (pull_request) Has been cancelled
2026-07-21 10:13:47 +08:00
5e1ba70e59 功能:支持侧边栏多项同时展开 2026-07-21 09:59:17 +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
d582d641c0 feat: improve admin responsive pages and teacher candidates 2026-07-15 13:56:58 +08:00
c75a08affe feat: add student wallet utility billing 2026-07-14 20:42: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
1e1c476bc3 feat: add CASL authorization and AI configuration 2026-07-11 14:25:34 +08:00
8f0991a51f feat: replace tenants with organization management 2026-07-10 21:27:26 +08:00
8ed1682b90 fix permissions and teacher attendance workflows 2026-07-10 20:40:52 +08:00
bc6b8b0095 fix: 修复入住管理白屏、重构首页工作台、拍平教务菜单
- Occupancies: 补齐缺失的 Alert import(渲染时 ReferenceError 导致白屏),
  并为两处 api.get 补泛型消除既有类型错误
- Dashboard: 改为待办优先的工作台(待办异常区 + 核心 KPI + 更多指标折叠 +
  图表按重要性重排),修复 fetchData 无限请求循环(loadedRef),
  重活图表用 IntersectionObserver(callback ref)懒加载
- MainLayout: 将三层嵌套的"教室管理"提升为一级菜单,全站菜单统一为两层
2026-07-10 11:16:30 +08:00
b0f7883f33 feat(admin): remove all department/campus scoping from frontend
- Delete CampusSwitcher component and useCampus hook
- Delete Departments page and its route
- Remove campus header interceptor from API client
- Remove departmentId from Class interfaces
- Remove campusLocation from student profile
- Remove department permissions from test fixtures
- Remove currentCampusId from test cleanup

TypeScript compiles clean.
2026-07-09 17:40:57 +08:00
5145c3e4b4 fix(layout): use controlled sidebar openKeys to preserve manual expand/collapse across navigation 2026-07-09 16:31:56 +08:00
e8dec3b171 feat: add DingTalk integration config page 2026-07-09 10:14:51 +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
4b02012634 feat: classroom status filter + export button + menu (departments/notifications) 2026-07-06 14:43:13 +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
80839607a4 feat: integrate CampusSwitcher into header and API interceptor 2026-07-06 00:06:35 +08:00
168308347f feat: integrate NotificationBell into MainLayout header 2026-07-05 23:19:27 +08:00
ab5898e2cf fix: replace deprecated antd APIs (Drawer width→size, Modal destroyOnClose→destroyOnHidden) 2026-07-05 21:47:32 +08:00
c77246d3e7 fix: restore transformToMenuItems function 2026-07-05 21:42:30 +08:00
f3af403714 feat: add selectedKeys/openKeys helpers for nested menu 2026-07-05 21:40:47 +08:00
9408642b22 refactor: reorganize sidebar into nested two-level menu groups 2026-07-05 21:40:09 +08:00
5df70a8af0 feat: P2-12 Teacher profile/workspace + P2-13 Multi-class comparison
P2-12 Teacher Management:
- Add profile JSON field (subjects, joinedAt, qualifications) to User entity
- Add GET/PUT /rbac/users/:id/profile endpoints with UpdateProfileDto
- Add GET /rbac/teacher-workspace endpoint returning assignedClasses,
  todaySchedules, and myStudents
- Create /teacher-workspace page with tabs (My Classes, Today's Schedule,
  My Students)
- Add route with PermissionRoute and menu item in MainLayout

P2-13 Student Archive Multi-class:
- Add GET /students/:id/compare-classes endpoint returning side-by-side
  enrollment data with per-class attendance statistics
- Students module now includes ClassStudent and AttendanceRecord entities
- No 2-enrollment cap existed in the codebase; student enrollments
  already return all records via class-student table
2026-07-05 20:42:27 +08:00
41f381e941 feat: attendance frontend page + backend list/classes endpoints
- Create AttendancePage with filter bar, table, calendar view toggle, batch add modal
- Register /attendance route with PermissionRoute (attendance:view)
- Add menu item in MainLayout with CheckCircleOutlined icon
- Add GET /attendance-records with pagination and filters
- Add GET /attendance-records/classes for class dropdown
- Add source column to AttendanceRecord entity (default: manual)
- Frontend tsc --noEmit: clean; backend: only pre-existing test errors
2026-07-05 19:49:53 +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
0053fed505 feat: add Classes list page with CRUD modal 2026-07-05 19:10:48 +08:00
7465f51d4f feat: MainLayout 三端布局重构,使用 antd Grid.useBreakpoint() 2026-07-03 10:04:42 +08:00
4f4cee157a chore: commit oxfmt formatting changes and verify artifacts 2026-07-02 15:55:09 +08:00
46a817503e feat(task1): restructure directories for turborepo monorepo
- Move backend/ to apps/server/ via git mv
- Move frontend/ to apps/admin/ via git mv
- Create packages/typescript-config/ with base, nestjs, and react-vite presets
2026-07-02 15:05:12 +08:00