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:
@@ -2,7 +2,6 @@ import { useNavigate } from '@tanstack/react-router'
|
||||
import { Loader2 } from 'lucide-react'
|
||||
import { Button } from '../../../components/ui'
|
||||
import { AddAttendeeModal } from './AddAttendeeModal'
|
||||
import { AttendeeDetailModal } from './AttendeeDetailModal'
|
||||
import { BulkCapacityModal } from './BulkCapacityModal'
|
||||
import { CapacityModal } from './CapacityModal'
|
||||
import { GroupHeader } from './GroupHeader'
|
||||
@@ -14,7 +13,16 @@ import { useGroupDetail } from './GroupDetailProvider'
|
||||
import { WaitlistEntryDetailModal } from './WaitlistEntryDetailModal'
|
||||
|
||||
export function GroupDetailView() {
|
||||
const { group, groupQueryPending } = useGroupDetail()
|
||||
const {
|
||||
group,
|
||||
groupQueryPending,
|
||||
attendeeToRemove,
|
||||
cancelRemoveAttendee,
|
||||
confirmRemoveAttendee,
|
||||
firstWaitlistEntry,
|
||||
waitlistTotal,
|
||||
isSubmittingRemoval,
|
||||
} = useGroupDetail()
|
||||
const navigate = useNavigate()
|
||||
|
||||
if (groupQueryPending) {
|
||||
@@ -47,8 +55,16 @@ export function GroupDetailView() {
|
||||
<AddAttendeeModal />
|
||||
<CapacityModal />
|
||||
<BulkCapacityModal />
|
||||
<AttendeeDetailModal />
|
||||
<RemoveAttendeeModal />
|
||||
<RemoveAttendeeModal
|
||||
attendee={attendeeToRemove}
|
||||
groupName={group?.name}
|
||||
firstWaitlistEntry={firstWaitlistEntry}
|
||||
waitlistTotal={waitlistTotal}
|
||||
isResolvingWaitlist={false}
|
||||
isSubmitting={isSubmittingRemoval}
|
||||
onCancel={cancelRemoveAttendee}
|
||||
onConfirm={confirmRemoveAttendee}
|
||||
/>
|
||||
<WaitlistEntryDetailModal />
|
||||
</section>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user