Commit Graph

24 Commits

Author SHA1 Message Date
8656394b9b Refactor AI chat: streaming, tool calls, UI polish 2026-07-24 16:27:50 +08:00
cbc04fea4f feat: add exam score management 2026-07-21 16:04: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
559b8a56e9 feat: add attendance device SN classroom bindings 2026-07-16 10:22:23 +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
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
e8dec3b171 feat: add DingTalk integration config page 2026-07-09 10:14:51 +08:00
4024d7c174 fix: remove ellipsis from student name column, give it 120px width 2026-07-06 16:42:36 +08:00
8bd59b8ac6 feat: complete student archive subsystem — 7 entities, PDF report, frontend profile page 2026-07-06 15:58:36 +08:00
9eec7c34be feat: add teacher management page with profile editing 2026-07-06 15:36:52 +08:00
90b6ce4aba feat: add Departments management page with tree + user list 2026-07-06 00:09:04 +08:00
9e6c136ef0 fix: apply code review fixes — double layout, SSE leaks, interval leak, conflict values
- App.tsx: remove double-wrapped MainLayout from /notifications route
- NotificationBell.tsx: decouple SSE from popover open state using ref
- useNotifications.ts: fix interval leak in onerror via ref in cleanup
- notifications.controller.ts: unsubscribe on req.on('close') for SSE Subject
- schedules.controller.ts: use existing schedule values in conflict catch
2026-07-05 23:31:21 +08:00
155e3b3c96 feat: add Notifications full page with sidebar filter 2026-07-05 23:21:08 +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
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