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
ad24c9ef23
feat: add department_id to all business entities
2026-07-05 23:45:05 +08:00
7d945029eb
feat: add Department and UserDepartment entities
2026-07-05 23:43:57 +08:00
9d9d4719b5
feat: add Student-User association and activate all notification TODOs
2026-07-05 23:42:22 +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
7020e86809
feat: integrate notification creation into business modules (classes, schedules done; bills/occupancies/deposits need student→userId mapping)
2026-07-05 23:25:34 +08:00
adb875976a
feat: support JWT from query string for SSE endpoints
2026-07-05 23:15:34 +08:00
14a24a14b3
feat: add NotificationsController with SSE stream endpoint
2026-07-05 23:09:30 +08:00
ce36a92482
fix: revert untracked ExpenseType refs, fix findByUser falsy cursor check
2026-07-05 23:05:25 +08:00
5f14b9ff15
feat: add NotificationsService with SSE subject pool
2026-07-05 23:01:26 +08:00
bb11ca1880
feat: add Notification entity
2026-07-05 22:56:54 +08:00
4520737196
fix: add Class import to AttendanceService
2026-07-05 21:57:20 +08:00
23ef73acb9
fix: add Class repo to AttendanceService, fix getClasses API
2026-07-05 21:56:29 +08:00
2be8b55c93
feat: enhance dashboard with comprehensive stats and charts
2026-07-05 21:52:50 +08:00
6737c00d96
fix: make JwtAuthGuard global to run before PermissionGuard, skip @Public routes
2026-07-05 21:23:42 +08:00
898738b775
fix: remove null assignments incompatible with non-null entity types
2026-07-05 20:59:20 +08:00
6d589f6faa
fix: remove null union types causing TypeORM Object inference on Deposit columns
2026-07-05 20:58:49 +08:00
f7cb7a9599
fix: add explicit datetime type to Deposit refund columns
2026-07-05 20:57:45 +08:00
2357db31dd
fix: remove broken Department relation from Class entity
2026-07-05 20:56:23 +08:00
eb82b269c1
fix: add missing Class/ClassStudent/ClassTeacher/DepositInstallment to TypeORM entities list
2026-07-05 20:55:36 +08:00
a7a1969d79
test: add unit tests for Schedules, Bills, and Attendance services
2026-07-05 20:51:24 +08:00
09580e4a4e
feat: P2-15 cron-based DingTalk/WeCom sync with logging and incremental sync
...
- Add @nestjs/schedule dependency
- Create SyncLog entity (platform, syncType, status, recordsCount, errorMessage, timestamps)
- Create SyncState entity for tracking lastSyncAt per platform
- SyncService with @Cron('0 2 * * *') daily scheduled sync
- Incremental sync: tracks last_sync_at per platform, passes to integration APIs
- Full/incremental mode determined by existence of prior sync
- SyncController: POST /sync/trigger (manual), GET /sync/logs (history)
- Register SyncModule in AppModule with ScheduleModule
2026-07-05 20:48:43 +08:00
ab4adf1174
P2-14: Deposit installment tracking + refund approval flow
...
- Add DepositInstallment entity (id, depositId, amount, dueDate, paidDate, status, createdAt)
- Add installments OneToMany relation to Deposit entity with cascade+eager
- Add refund approval fields: refundStatus, refundRequestedAt, refundApprovedBy, refundApprovedAt
- Add installment DTOs (CreateInstallmentDto, UpdateInstallmentDto)
- Add refund approval DTOs (ApproveRefundDto, CreateDepositWithInstallmentsDto)
- Service: add/create/update/delete installments, requestRefund, approveRefund, findPendingRefunds
- Controller: GET deposits/:id, GET pending-refunds, POST :id/installments, PUT installments/:id, DELETE installments/:id, POST :id/request-refund, PUT :id/approve-refund
- Frontend: detail modal with installment list, refund request button, pending refunds tab with approve actions
2026-07-05 20:46:05 +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
80ce911b88
fix: add studentNo field to Student entity
2026-07-05 20:35:47 +08:00
194f25c3ad
feat: add class roster export and attendance stats export
...
- GET /classes/:id/roster/export — Excel export with 姓名/学号/加入日期/状态
- GET /attendance-records/export — Excel export with 姓名/班级/日期/时段/状态/来源/备注/打卡时间
- Add findAllForExport to AttendanceService (no pagination)
- Both use ExcelJS following classrooms controller downloadTemplate pattern
2026-07-05 20:35:11 +08:00
66aadfe3ff
fix: I2 add studentNo to class listing, I4 replace attendance edit placeholder with working edit modal
2026-07-05 20:31:53 +08:00
b7117ddf2d
fix: review blockers — entity registration, session enum, conflict date-range, @Type decorators
2026-07-05 20:20:43 +08:00
d317cb4fc1
feat(dashboard): add classroom/attendance/income stats to dashboard API
...
- Add classroomCount, classroomOccupancyRate from Classroom + ClassSchedule
- Add todayAttendanceRate, attendanceTrend from AttendanceRecord
- Add monthlyIncome, incomeTrend from Bill
- Register Classroom, ClassSchedule, AttendanceRecord in dashboard module
2026-07-05 19:51:16 +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
b6e308ae2a
feat: add Attendance module with batch, summary, calendar, and dingtalk endpoints
2026-07-05 19:44:10 +08:00
4ededb0338
feat: add CLASS/SCHEDULE/ATTENDANCE permission nodes
2026-07-05 19:39:03 +08:00
f962633f67
fix: normalize operation log module names across controllers
2026-07-05 19:38:18 +08:00
efe13fe664
feat: add long-term rental independent billing in generate logic
2026-07-05 19:33:45 +08:00
881e9c6175
feat: add rental_category/rate to Room, rental_type/tenant_id to Occupancy, tenant_id to Student
2026-07-05 19:31:03 +08:00