feat: add attendee detail and stats features
- Implemented API endpoints to fetch attendee details and statistics. - Created new route for fetching attendee by ID and their attendance stats. - Added schemas for attendee statistics. - Developed frontend components to display attendee details and attendance statistics. - Integrated attendee detail provider to manage state and data fetching. - Added tests for attendee retrieval and statistics calculation.
This commit is contained in:
@@ -22,6 +22,18 @@ export const AttendeeDtoSchema = z.object({
|
||||
});
|
||||
export type AttendeeDto = z.output<typeof AttendeeDtoSchema>;
|
||||
|
||||
export const AttendeeStatsSchema = z.object({
|
||||
attendeeId: z.string(),
|
||||
groupId: z.string(),
|
||||
presentCount: z.number().int().min(0),
|
||||
absentCount: z.number().int().min(0),
|
||||
excusedCount: z.number().int().min(0),
|
||||
totalMarked: z.number().int().min(0),
|
||||
attendanceRate: z.number().min(0).max(100),
|
||||
});
|
||||
export type AttendeeStats = z.output<typeof AttendeeStatsSchema>;
|
||||
export type AttendeeStatsDto = AttendeeStats;
|
||||
|
||||
export const AttendeeQuerySchema = z.object({
|
||||
page: pageSchema,
|
||||
pageSize: pageSizeSchema,
|
||||
|
||||
Reference in New Issue
Block a user