Commit Graph

98 Commits

Author SHA1 Message Date
ff6cb03419 feat: add org-tree-with-users and import-users endpoints 2026-07-09 11:08:33 +08:00
8ba3327074 fix: handle duplicate usernames and failed role lookups in importDingTalkUsers 2026-07-09 11:07:25 +08:00
cd7f9c90b3 feat: add importDingTalkUsers and org-tree-with-users to SyncService 2026-07-09 11:05:17 +08:00
2b60a10927 feat: add fetchOrgTreeWithUsers to DingTalkService 2026-07-09 10:58:26 +08:00
731f74e51a refactor: remove scheduled cron sync, manual trigger only 2026-07-09 10:24:12 +08:00
17ef1adcaa feat: Students list excludes staff by default 2026-07-09 10:07:04 +08:00
14eec2852a feat: add mark-staff/mark-student endpoints with studentStatus in user list 2026-07-09 10:06:31 +08:00
6e0ad8759f feat: syncOneUser skips Students with non-active status 2026-07-09 10:05:41 +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
f1959f0d2a fix: switch DingTalk attendance API from getcolumnval to listRecord 2026-07-08 14:49:22 +08:00
166d0b2694 feat: auto-create Student for DingTalk users on sync; add DingTalk env to ecosystem config 2026-07-08 14:34:49 +08:00
edaf3670ee fix: add onDelete cascade for User FK in class_teacher and students entities 2026-07-08 14:32:19 +08:00
8c791ec4f3 fix: add build script for server, fix duplicate index in user_ding_mapping entity 2026-07-08 14:18:41 +08:00
d3437311dc refactor: remove Puppeteer, delete old PDF download endpoint 2026-07-07 09:56:52 +08:00
36978813cf feat: add GET /archive/:studentId/report-html endpoint 2026-07-07 09:50:05 +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
67952af52e feat(archive): log PDF report generation in operation logs 2026-07-06 18:00:46 +08:00
bdd2f53b1a feat(occupancies): inherit rentalType and tenantId on room transfer 2026-07-06 18:00:35 +08:00
38f6e18cca Task 3: sync RENTAL class_schedule on rental create/update/delete
- ClassroomRentalsService.create/update now upsert a ClassSchedule row with schedule_type='RENTAL' and rental_id set.
- ClassroomRentalsService.remove deletes the synced schedule row; update to 'cancelled' also removes it.
- SchedulesService.getClassroomOccupancy explicitly returns INTERNAL and RENTAL schedules.
- Make classId/teacherId/rentalId nullable in ClassSchedule entity to support rental schedules.
- Add unit tests for rental schedule sync and mixed-type occupancy.
2026-07-06 17:55:08 +08:00
5ea49d0a9e feat(classes): add schedule and attendance-summary endpoints + frontend tabs
- Add GET /classes/:id/schedule returning ClassSchedule list with classroom name
- Add GET /classes/:id/attendance-summary returning attendance/absence/late rates
- Add 课表 and 出勤汇总 tabs to Classes detail page
- Register ClassSchedule and AttendanceRecord in ClassesModule
2026-07-06 17:48:19 +08:00
b837e9b145 feat(task2): 排课与租赁双向冲突检测
- SchedulesService.checkConflict 增加对 classroom_rentals 的冲突检测
- ClassroomRentalsService.findConflicts 增加对 class_schedules 的冲突检测
- 创建排课时若教室已被租赁,给出明确冲突提示
- 创建租赁时若教室已有排课,给出明确冲突提示
2026-07-06 17:44:45 +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
ba34c09be4 feat(attendance): add single-record edit and delete APIs
- Add PUT /attendance-records/:id to update status and remark
- Add DELETE /attendance-records/:id to remove a record
- Enforce campus scope on both operations
- Log edit/delete actions via OperationLogsService
2026-07-06 17:39:16 +08:00
72f9a58838 feat: rewrite PDF report to puppeteer HTML→PDF with professional 6-page gongxue design 2026-07-06 16:19:50 +08:00
c81b0a0b5c chore: commit remaining integration files, PM2 single instance, PRD doc 2026-07-06 16:04:53 +08:00
8bd59b8ac6 feat: complete student archive subsystem — 7 entities, PDF report, frontend profile page 2026-07-06 15:58:36 +08:00
b6990dd11b feat: add student archive module with full CRUD APIs 2026-07-06 15:46:57 +08:00
9e0d9ff39c feat: add teacher list and profile API 2026-07-06 15:33:12 +08:00
1c097dc230 feat: new classrooms default to 'reserved' status instead of 'available' 2026-07-06 15:26:35 +08:00
72b0eed36e fix: resolve TS strict type errors in sync services (null→undefined) 2026-07-06 15:18:47 +08:00
8d810374f0 feat: add source tracking fields to Department for sync idempotency 2026-07-06 15:10:11 +08:00
20f3b79179 feat: bills expense type filter (backend join + frontend Select), sync stub docs 2026-07-06 14:48:47 +08:00
da69545f74 fix: null cast for refundStatus in TypeORM 2026-07-06 10:50:24 +08:00
94251b66ce fix: TypeORM rejects string|null union type for mysql 2026-07-06 10:49:59 +08:00
2ce73b8fc3 feat: PM2 + Docker deployment config (MySQL container, PM2 for backend+frontend proxy) 2026-07-06 10:12:42 +08:00
a568da160c feat(sync): implement sync stubs with env-var gating and status endpoint 2026-07-06 10:00:35 +08:00
2c0ca583a3 feat(students): add multi-enrollment comparison view in student list expand row 2026-07-06 10:00:35 +08:00
6ba7213cc4 feat(deposits): add refund rejection path with reason 2026-07-06 09:48:20 +08:00
3717531bb3 feat(dashboard): add classroom utilization stats endpoint and UI 2026-07-06 09:38:17 +08:00
7b298a615c feat: complete PRD verification fixes and deployment readiness
- Add CommonModule to provide/export CampusScope across business modules
- Replace DepartmentsModule imports with CommonModule in 11 modules
- Add missing Class/Tenant repository imports to StudentsModule and SchedulesModule
- Fix service specs with CampusScope, ClassRepository, StudentRepository mocks
- Move better-sqlite3 to optionalDependencies for production Docker builds
- Rewrite Dockerfiles for monorepo root build context
- Update docker-compose.yml service build contexts
2026-07-06 01:55:35 +08:00
8453e62088 feat: integrate classroom real-time occupancy with schedule and rental data 2026-07-06 01:14:58 +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
4a48a65a48 feat: enhance dashboard with attendance count + Gantt chart 2026-07-06 00:49:20 +08:00
b3655da012 fix: resolve 9 P0+P1 review findings (bills decorators, campus isolation bypass, ding raw crash, batch import counter, SSE multi-tab, interval leak, dept permissions, cycle prevention, tree depth) 2026-07-06 00:38:51 +08:00
df61ebbc5b feat: auto-populate department_id on create + seed default campus with backfill 2026-07-06 00:05:00 +08:00
cd6364268d feat: integrate CampusScope.filter() into all business services (12 services + 12 modules) 2026-07-05 23:58:51 +08:00
eeae06fe30 feat: add isSuperAdmin to JWT payload for campus scope bypass 2026-07-05 23:51:10 +08:00
abcfbc6121 feat: add CampusScope request-level provider for data isolation 2026-07-05 23:50:22 +08:00
ca53f9471b feat: implement full DepartmentsController with 9 endpoints 2026-07-05 23:48:43 +08:00
0e08770cf4 feat: add DepartmentsModule with DTO, Service, and stub controller 2026-07-05 23:47:41 +08:00