feat(attendee-detail): enhance attendee detail view with payment and notes sections

- Added payment presentation logic to display payment status and due dates.
- Introduced AttendeeNotesSection and AttendeePaymentsSection components for managing notes and payments.
- Implemented forms for editing contact information and notes with validation.
- Updated API to support attendee updates and added corresponding tests.
- Improved attendance summary logic to reflect all visible sessions.
- Enhanced UI with loading states and error handling for better user experience.
This commit is contained in:
Jose Selesan
2026-10-01 18:41:55 -03:00
parent 6d120f4b1f
commit faf949fc9b
31 changed files with 1129 additions and 225 deletions

View File

@@ -1,6 +1,7 @@
import type {
AbsenceDetails,
ApproveGroupPreRegistrationResult,
AttendeeDetailDto,
AttendeeDto,
AttendeeHistory,
AttendeeList,
@@ -43,6 +44,7 @@ import type {
RemoveGroupWaitlistEntryResult,
SessionStudents,
StudentsAtRisk,
UpdateAttendee,
UpdateStudentStatusResult,
} from '@gruperly/shared'
@@ -178,7 +180,17 @@ 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}`)
apiFetch<AttendeeDetailDto>(`/api/v1/groups/${groupId}/attendees/${attendeeId}`)
export const updateGroupAttendee = (
groupId: string,
attendeeId: string,
payload: UpdateAttendee,
) =>
apiFetch<AttendeeDto>(`/api/v1/groups/${groupId}/attendees/${attendeeId}`, {
method: 'PATCH',
body: JSON.stringify(payload),
})
export const getGroupWaitlist = (groupId: string, page = 1, pageSize = 100) =>
apiFetch<GroupWaitlistList>(`/api/v1/groups/${groupId}/waitlist?page=${page}&pageSize=${pageSize}`)
@@ -271,4 +283,4 @@ export const updateAttendeeStatus = (attendeeId: string, status: AttendeeStatus)
apiFetch<UpdateStudentStatusResult>(`/api/v1/students/${attendeeId}/status`, {
method: 'POST',
body: JSON.stringify({ status }),
})
})