Improved group detail look and feel

This commit is contained in:
Jose Selesan
2026-09-29 09:19:29 -03:00
parent df510cfe45
commit 0f02331dfc
11 changed files with 310 additions and 249 deletions

View File

@@ -6,43 +6,55 @@ 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>
<table className="w-full table-fixed text-left text-sm">
<thead>
<tr className="border-b border-border/70 text-xs font-semibold text-foreground/80">
<th scope="col" className="w-[54%] px-3 pb-2">Nombre</th>
<th scope="col" className="px-3 pb-2">Teléfono</th>
<th scope="col" className="w-9 px-1 pb-2">
<span className="sr-only">Detalle</span>
</th>
</tr>
</thead>
<tbody>
{entries.map((entry) => (
<tr
key={entry.id}
className="group cursor-pointer border-b border-border/70 transition-colors last:border-b-0 hover:bg-primary-soft/60"
onClick={() => setSelectedWaitlistEntry(entry)}
>
<td className="px-3 py-2.5">
<div className="flex min-w-0 items-center gap-2.5">
<div className="flex size-9 shrink-0 items-center justify-center rounded-full bg-accent/10 text-xs font-semibold text-accent">
{entry.fullName.charAt(0).toUpperCase()}
</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>
<div className="min-w-0">
<p className="truncate font-medium text-primary" title={entry.fullName}>
{entry.fullName}
</p>
{entry.notes ? (
<p className="truncate text-xs text-foreground/70" title={entry.notes}>
{entry.notes}
</p>
) : null}
</div>
</div>
</td>
<td className="min-w-0 px-3 py-2.5 text-foreground/80">
{entry.phone ? (
<span className="block truncate tabular-nums" title={entry.phone}>
{entry.phone}
</span>
) : (
<span className="text-foreground/60">—</span>
)}
</td>
<td className="w-9 px-1 py-2.5 text-foreground/50">
<ChevronRight className="ml-auto size-4 transition-colors group-hover:text-accent" />
</td>
</tr>
))}
</tbody>
</table>
)
}
}