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:
@@ -3,6 +3,7 @@ import type {
|
||||
AttendeeDto,
|
||||
AttendeeHistory,
|
||||
AttendeeList,
|
||||
AttendeeStats,
|
||||
AttendeeStatus,
|
||||
BulkCreateAttendees,
|
||||
BulkCreateAttendeesResult,
|
||||
@@ -163,6 +164,9 @@ export const bulkCreateAttendees = (groupId: string, payload: BulkCreateAttendee
|
||||
export const getGroupAttendees = (groupId: string, page = 1, pageSize = 20) =>
|
||||
apiFetch<AttendeeList>(`/api/v1/groups/${groupId}/attendees?page=${page}&pageSize=${pageSize}`)
|
||||
|
||||
export const getGroupAttendee = (groupId: string, attendeeId: string) =>
|
||||
apiFetch<AttendeeDto>(`/api/v1/groups/${groupId}/attendees/${attendeeId}`)
|
||||
|
||||
export const getGroupWaitlist = (groupId: string, page = 1, pageSize = 100) =>
|
||||
apiFetch<GroupWaitlistList>(`/api/v1/groups/${groupId}/waitlist?page=${page}&pageSize=${pageSize}`)
|
||||
|
||||
@@ -230,6 +234,9 @@ export const getGroupsRiskOverview = () => apiFetch<GroupsRiskOverview>('/api/v1
|
||||
export const getAttendeeHistory = (groupId: string, attendeeId: string) =>
|
||||
apiFetch<AttendeeHistory>(`/api/v1/groups/${groupId}/attendees/${attendeeId}/history`)
|
||||
|
||||
export const getAttendeeStats = (groupId: string, attendeeId: string) =>
|
||||
apiFetch<AttendeeStats>(`/api/v1/groups/${groupId}/attendees/${attendeeId}/stats`)
|
||||
|
||||
export const updateAttendeeStatus = (attendeeId: string, status: AttendeeStatus) =>
|
||||
apiFetch<UpdateStudentStatusResult>(`/api/v1/students/${attendeeId}/status`, {
|
||||
method: 'POST',
|
||||
|
||||
Reference in New Issue
Block a user