fix(admin,server): 修复 Dashboard 甘特图时间线与数据校验
Some checks failed
CI / check (pull_request) Failing after 1m54s

This commit is contained in:
2026-08-07 16:38:16 +08:00
parent 5f9566e26d
commit 8d4ebcf9c0
9 changed files with 160 additions and 19 deletions

View File

@@ -59,8 +59,19 @@ export const classAttendanceRankingSchema = z
export const ganttRoomsSchema = z.array(
z
.object({ roomNumber: z.string(), occupancies: z.array(z.record(z.string(), z.unknown())) })
.passthrough(),
.object({
roomNumber: z.string(),
occupancies: z.array(
z.object({
studentName: z.string(),
studentId: z.union([z.string(), z.number()]).optional(),
checkInDate: z.string(),
checkOutDate: z.string().nullable(),
billingStartDate: z.string().optional(),
billingEndDate: z.string().nullable().optional(),
}),
),
}),
);
export const classroomOccupanciesSchema = z.array(