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
This commit is contained in:
2026-07-05 19:49:53 +08:00
parent b6e308ae2a
commit 41f381e941
7 changed files with 763 additions and 0 deletions

View File

@@ -36,6 +36,10 @@ export class AttendanceRecordItem {
@IsOptional()
@IsString()
remark?: string;
@IsOptional()
@IsString()
source?: string;
}
export class BatchCreateAttendanceDto {
@@ -78,6 +82,44 @@ export class QueryDingRawDto {
matchStatus?: string;
}
export class QueryAttendanceRecordsDto {
@IsOptional()
@IsInt()
@Type(() => Number)
classId?: number;
@IsOptional()
@IsDateString()
dateFrom?: string;
@IsOptional()
@IsDateString()
dateTo?: string;
@IsOptional()
@IsString()
session?: string;
@IsOptional()
@IsString()
@IsIn(['present', 'late', 'absent', 'leave'])
status?: string;
@IsOptional()
@IsString()
source?: string;
@IsOptional()
@IsInt()
@Type(() => Number)
page?: number;
@IsOptional()
@IsInt()
@Type(() => Number)
pageSize?: number;
}
export class MatchDingRecordDto {
@IsInt()
@IsNotEmpty()