Commit Graph

17 Commits

Author SHA1 Message Date
90cc0c10b2 feat: expand student archive import template 2026-07-21 15:11:52 +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
8bd445df5a fix student import and profile labels 2026-07-15 10:52:43 +08:00
e45da7f998 feat: improve attendance scheduling and API validation 2026-07-14 23:12:14 +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
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
6029d8e2fd refactor(server): remove Department/UserDepartment entities, CampusScope, and departmentId from all entities
- Delete department.entity.ts, user-department.entity.ts
- Remove Department/UserDepartment from entities/index.ts
- Remove departmentId column from 18 entities (AttendanceRecord, ArchiveAttachment, Bill, ClassSchedule, Classroom, ClassroomRental, Deposit, DepositInstallment, ExamScore, LearningRecord, Occupancy, PersonalExpense, ResultArchive, Room, RoomExpense, Student, StudentEnrollment, StudentProfile, StudentReport)
- Remove departments/ module entirely
- Delete campus-scope.ts, campus-scope.middleware.ts (request-utils.ts kept — it's just IP extraction)
- Simplify common.module.ts to empty module
- Remove CampusScopeMiddleware from app.module.ts
- Remove all CampusScope injections and filter calls across all services
- Remove departmentId from all DTOs and controllers
- Simplify dingtalk/wecom sync to only sync users (no dept table)
- Update seed module to remove department seeding
- Clean frontend compilation
2026-07-09 17:51:32 +08:00
3fa446f978 Task 4: 学生列表 tenantId 筛选生效
- StudentsService.findAll() 接收 tenantId 参数并按 tenantId 过滤
- StudentsController.findAll() 增加 tenantId 查询参数
- students.organization 列仍在 occupancy/room-visual/import 等场景使用,未删除列
2026-07-06 17:39:24 +08:00
3bcb7d41c0 fix: F12 P2 follow-up — batch imports set departmentId, optimize getDescendantIds, enforce campus root invariant 2026-07-06 01:06:11 +08:00
cd6364268d feat: integrate CampusScope.filter() into all business services (12 services + 12 modules) 2026-07-05 23:58:51 +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
f962633f67 fix: normalize operation log module names across controllers 2026-07-05 19:38:18 +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