refactor: remove unused attendee detail components and provider

This commit is contained in:
Jose Selesan
2026-09-30 13:37:42 -03:00
parent 27bff32e76
commit 4e86096653
30 changed files with 1710 additions and 475 deletions

View File

@@ -3,6 +3,7 @@ import type { ReactNode } from 'react'
import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query'
import type {
AttendeeDto,
AttendeeListItem,
GroupDto,
GroupPreRegistrationDto,
GroupWaitlistEntryDto,
@@ -33,7 +34,7 @@ type GroupDetailContextValue = {
groupTitle: string
groupQueryPending: boolean
riskLevel: GroupRiskLevel
attendees: AttendeeDto[]
attendees: AttendeeListItem[]
attendeesTotal: number
attendeesPending: boolean
waitlistEntries: GroupWaitlistEntryDto[]
@@ -49,6 +50,9 @@ type GroupDetailContextValue = {
whatsappMessage: string
searchFilter: string
setSearchFilter: (value: string) => void
/** La lista de miembros se reduce a quienes tienen el cobro vencido. */
overdueOnly: boolean
setOverdueOnly: (value: boolean) => void
listSection: ListSection
setListSection: (value: ListSection) => void
isInviteModalOpen: boolean
@@ -90,12 +94,14 @@ export function GroupDetailProvider({ groupId, children }: { groupId: string; ch
const [selectedWaitlistEntry, setSelectedWaitlistEntry] = useState<GroupWaitlistEntryDto | null>(null)
const [selectedPreRegistration, setSelectedPreRegistration] = useState<GroupPreRegistrationDto | null>(null)
const [searchFilter, setSearchFilter] = useState('')
const [overdueOnly, setOverdueOnly] = useState(false)
// La búsqueda pertenece a la vista que la abrió: al cambiar de pestaña se
// limpia para no heredar un filtro sin coincidencias.
// Los controles de la lista pertenecen a la vista que los abrió: al cambiar de
// pestaña se limpian para no heredar un filtro sin coincidencias.
const setListSection = (value: ListSection) => {
setListSectionState(value)
setSearchFilter('')
setOverdueOnly(false)
}
const groupQuery = useQuery({
@@ -313,6 +319,8 @@ export function GroupDetailProvider({ groupId, children }: { groupId: string; ch
whatsappMessage,
searchFilter,
setSearchFilter,
overdueOnly,
setOverdueOnly,
listSection,
setListSection,
isInviteModalOpen,