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:
Jose Selesan
2026-09-28 16:16:21 -03:00
parent e736ed3547
commit 02af5e3c11
22 changed files with 997 additions and 232 deletions

View File

@@ -1,9 +1,15 @@
import type { AttendeeDto } from '@gruperly/shared'
import { useNavigate } from '@tanstack/react-router'
import { ChevronRight } from 'lucide-react'
import { useGroupDetail } from './GroupDetailProvider'
export function MembersTable({ attendees }: { attendees: AttendeeDto[] }) {
const { setSelectedAttendee } = useGroupDetail()
const { groupId } = useGroupDetail()
const navigate = useNavigate()
const openAttendee = (attendeeId: string) => {
void navigate({ to: '/groups/$groupId/attendees/$attendeeId', params: { groupId, attendeeId } })
}
return (
<div className="overflow-x-auto">
@@ -20,7 +26,7 @@ export function MembersTable({ attendees }: { attendees: AttendeeDto[] }) {
<tr
key={attendee.id}
className="cursor-pointer transition-colors hover:bg-primary-soft/50"
onClick={() => setSelectedAttendee(attendee)}
onClick={() => openAttendee(attendee.id)}
>
<td className="px-3 py-3">
<div className="flex items-center gap-2.5">