Added routes
This commit is contained in:
48
apps/web/src/features/groups/detail/WaitlistTable.tsx
Normal file
48
apps/web/src/features/groups/detail/WaitlistTable.tsx
Normal file
@@ -0,0 +1,48 @@
|
||||
import type { GroupWaitlistEntryDto } from '@gruperly/shared'
|
||||
import { ChevronRight } from 'lucide-react'
|
||||
import { useGroupDetail } from './GroupDetailProvider'
|
||||
|
||||
export function WaitlistTable({ entries }: { entries: GroupWaitlistEntryDto[] }) {
|
||||
const { setSelectedWaitlistEntry } = useGroupDetail()
|
||||
|
||||
return (
|
||||
<div className="overflow-x-auto">
|
||||
<table className="w-full text-left text-sm">
|
||||
<thead className="border-b border-border text-xs font-semibold uppercase text-foreground/60">
|
||||
<tr>
|
||||
<th className="px-3 pb-3">Nombre</th>
|
||||
<th className="px-3 pb-3">Teléfono</th>
|
||||
<th className="w-8 px-3 pb-3" />
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody className="divide-y divide-border">
|
||||
{entries.map((entry) => (
|
||||
<tr
|
||||
key={entry.id}
|
||||
className="cursor-pointer transition-colors hover:bg-primary-soft/50"
|
||||
onClick={() => setSelectedWaitlistEntry(entry)}
|
||||
>
|
||||
<td className="px-3 py-3">
|
||||
<div className="flex items-center gap-2.5">
|
||||
<div className="flex size-8 items-center justify-center rounded-full bg-accent/10 text-xs font-semibold text-accent">
|
||||
{entry.fullName.charAt(0).toUpperCase()}
|
||||
</div>
|
||||
<div className="min-w-0">
|
||||
<p className="truncate font-medium text-primary">{entry.fullName}</p>
|
||||
{entry.notes ? (
|
||||
<p className="truncate text-xs text-foreground/50">{entry.notes}</p>
|
||||
) : null}
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td className="px-3 py-3 text-foreground/70">{entry.phone}</td>
|
||||
<td className="px-1 py-3 text-foreground/30">
|
||||
<ChevronRight className="size-4" />
|
||||
</td>
|
||||
</tr>
|
||||
))}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user