Commit Graph

190 Commits

Author SHA1 Message Date
8bd445df5a fix student import and profile labels 2026-07-15 10:52:43 +08:00
fcde6caaaa fix: defer attendance settlement until lesson end 2026-07-15 09:39:21 +08:00
b1f35f9d1a test: harden business boundary conditions 2026-07-15 00:03:55 +08:00
e45da7f998 feat: improve attendance scheduling and API validation 2026-07-14 23:12:14 +08:00
c75a08affe feat: add student wallet utility billing 2026-07-14 20:42:21 +08:00
598b4e8acd feat: link deposits to bill payment 2026-07-14 16:38:38 +08:00
eac336a54a fix: include contained room expenses in bill generation 2026-07-14 14:53:07 +08:00
ce5fd1c6cb fix: 修复批量更新账单状态功能 2026-07-14 14:24:19 +08:00
d84f37e98f feat: streamline occupancy check-in and imports 2026-07-14 12:23:53 +08:00
5cf6aede1e feat: improve occupancy import template 2026-07-14 11:20:41 +08:00
811e7ce826 feat: show DingTalk punch device details 2026-07-14 11:20:41 +08:00
a93ba657a8 fix: keep room capacity and beds consistent 2026-07-14 10:57:13 +08:00
e7aa202603 fix: 修改 PDFDocument 导入方式以符合 ES6 模块规范 2026-07-14 10:45:27 +08:00
xyx
ceb0e2bf14 fix: 添加默认床位生成逻辑并优化床位添加验证 2026-07-13 16:50:47 +08:00
f98c0ccaa8 refactor(rooms): remove dorm gender restrictions 2026-07-13 16:12:57 +08:00
aa1ed7db56 refactor: resolve remaining field audit issues 2026-07-13 16:12:57 +08:00
0533c30ece refactor(classes): preserve student membership history 2026-07-13 16:12:57 +08:00
1f32d1285b refactor(deposits): remove refund approval remnants 2026-07-13 16:12:56 +08:00
04ef5c42d9 refactor(deposits): remove inline installment creation 2026-07-13 16:12:22 +08:00
0515e6ed27 fix(integration): simplify manual DingTalk sync setup 2026-07-13 16:12:22 +08:00
effa34434b refactor(students): remove obsolete class id input 2026-07-13 16:12:22 +08:00
0377acd33b refactor: remove residual campus and department fields 2026-07-13 16:12:22 +08:00
6396d3e934 fix(schedules): support editable schedule notes 2026-07-13 16:12:21 +08:00
dfd3cf6772 fix(archive): align aggregate result field 2026-07-13 16:12:21 +08:00
2874ab7bee fix(occupancies): assign room resources during transfers 2026-07-13 16:12:21 +08:00
7860703672 test: update DingTalk token cache fixtures 2026-07-13 16:04:05 +08:00
xyx
910a4263f6 fix: refactor notification display logic and add format function 2026-07-13 14:52:03 +08:00
xyx
619b3b22bd fix: use saved dingtalk config for integration calls 2026-07-13 11:43:11 +08:00
b5ef91bf2d fix: support Windows dev startup 2026-07-13 10:35:43 +08:00
1c8bd08be4 feat: settle course attendance automatically 2026-07-13 10:26:38 +08:00
b9b295c997 refactor: remove unused classroom fields 2026-07-13 09:34:15 +08:00
a266d450e1 chore: apply eslint --fix autofixes (remove unnecessary as never casts in tests) 2026-07-12 23:01:37 +08:00
b5f4b8747c fix: schedules lookups test mock missing classroomRepo constructor arg
The SchedulesService constructor expects 5 repository arguments.
The test only provided 4, passing {} as never for classroomRepo.
Added classroomRepo mock with find() returning full selected columns.

Fixes: schedules.lookups.spec.ts — 'returns scoped classes and
minimal classrooms for schedule viewers'
2026-07-12 23:01:00 +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
44105c1689 refactor: remove obsolete scaffolding and dead modules
Drop the unused root hello-world controller, empty CommonModule imports, development seeding code, legacy student report entity, stale DTOs, notification hook, and their placeholder tests.
2026-07-10 14:12:56 +08:00
b093d69f6a fix(server): correct archive filters and deposit access
Parse archived class query flags without Boolean string coercion, register the refund approval permission, and grant dorm managers the deposit permission group.
2026-07-10 14:12:44 +08:00
e26a8e816e fix(attendance): normalize DingTalk match statuses
Store and validate stable English status codes for unmatched, pending, and matched attendance records so import, filtering, and auto-match use the same values.
2026-07-10 14:11:55 +08:00
1ca4a4d185 fix(archive): serve student attachments securely
Download attachments through authenticated API requests, support configurable upload paths, validate resolved file locations, and retain compatibility with legacy stored paths.
2026-07-10 14:11:47 +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
f6a84fd6b3 fix: assign each user to single leaf dept to prevent duplicates 2026-07-10 10:09:47 +08:00
fb54a6c466 fix: assign users to leaf departments only, handle multi-branch dept chains 2026-07-10 10:08:07 +08:00
3ccb878092 fix: fetch users from all sub-departments in syncAll and fetchOrgTreeWithUsers 2026-07-10 10:06:35 +08:00
3992f6c33f feat: implement fetchOrgTree and fetchOrgTreeWithUsers via dingtalk API 2026-07-10 10:04:59 +08:00
31bcd15189 fix: use real name and phone from frontend when importing students 2026-07-10 09:50:18 +08:00
b261ec5930 feat: change dingUserIds to users array with name/mobile in DTOs 2026-07-10 09:49:41 +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