feat(admin): add birthdate & postcode

This commit is contained in:
2026-03-19 10:28:07 +01:00
parent f113770348
commit ee0e9e68a9

View File

@@ -30,6 +30,8 @@ type Guest = {
lastName: string;
email?: string;
phone?: string;
birthdate?: string;
postcode?: string;
};
function parseGuests(raw: unknown): Guest[] {
@@ -664,6 +666,10 @@ function AdminPage() {
Email <SortIcon col="email" />
</th>
<th className={`${thCls} hidden xl:table-cell`}>Telefoon</th>
<th className={`${thCls} hidden xl:table-cell`}>
Geboortedatum
</th>
<th className={`${thCls} hidden xl:table-cell`}>Postcode</th>
<th className={thCls} onClick={() => handleSort("type")}>
Type <SortIcon col="type" />
</th>
@@ -690,7 +696,7 @@ function AdminPage() {
{registrationsQuery.isLoading ? (
<tr>
<td
colSpan={12}
colSpan={14}
className="px-4 py-12 text-center font-mono text-sm text-white/30"
>
laden...
@@ -699,7 +705,7 @@ function AdminPage() {
) : sortedRegistrations.length === 0 ? (
<tr>
<td
colSpan={12}
colSpan={14}
className="px-4 py-12 text-center font-mono text-sm text-white/30"
>
Geen registraties gevonden
@@ -757,6 +763,12 @@ function AdminPage() {
<td className="hidden px-3 py-3 font-mono text-white/45 text-xs xl:table-cell">
{reg.phone || "—"}
</td>
<td className="hidden px-3 py-3 font-mono text-white/45 text-xs xl:table-cell">
{reg.birthdate || "—"}
</td>
<td className="hidden px-3 py-3 font-mono text-white/45 text-xs xl:table-cell">
{reg.postcode || "—"}
</td>
<td className="px-3 py-3">
<span
className={`rounded-full px-2 py-0.5 font-mono font-semibold text-[10px] uppercase tracking-wide ${isPerformer ? "bg-amber-400/12 text-amber-300" : "bg-teal-400/12 text-teal-300"}`}
@@ -833,7 +845,7 @@ function AdminPage() {
key={`${reg.id}-detail`}
className="border-white/5 border-b bg-white/5"
>
<td colSpan={12} className="px-6 pt-3 pb-5">
<td colSpan={14} className="px-6 pt-3 pb-5">
<div className="grid gap-4 sm:grid-cols-2">
{/* Guests */}
{guestCount > 0 && (
@@ -864,6 +876,16 @@ function AdminPage() {
{g.phone}
</span>
)}
{g.birthdate && (
<span className="font-mono text-white/35 text-xs">
{g.birthdate}
</span>
)}
{g.postcode && (
<span className="font-mono text-white/35 text-xs">
{g.postcode}
</span>
)}
{!g.email && !g.phone && (
<span className="font-mono text-white/25 text-xs italic">
geen contactgegevens
@@ -875,7 +897,7 @@ function AdminPage() {
</div>
)}
{/* Notes */}
{/* Registrant birthdate + postcode */}
{hasNotes && (
<div>
<p className="mb-2 font-mono text-[10px] text-white/40 uppercase tracking-widest">
@@ -980,6 +1002,12 @@ function AdminPage() {
{reg.phone}
</p>
)}
{reg.birthdate && (
<p className="font-mono text-white/30 text-xs">
{reg.birthdate}
{reg.postcode && ` · ${reg.postcode}`}
</p>
)}
</div>
<div className="flex shrink-0 flex-col items-end gap-1.5">
<span
@@ -1067,6 +1095,12 @@ function AdminPage() {
{reg.phone}
</p>
)}
{reg.birthdate && (
<p className="font-mono text-white/30 text-xs">
{reg.birthdate}
{reg.postcode && ` · ${reg.postcode}`}
</p>
)}
</div>
<div className="flex shrink-0 flex-col items-end gap-1.5">
<span
@@ -1157,6 +1191,13 @@ function AdminPage() {
{g.phone}
</p>
)}
{(g.birthdate || g.postcode) && (
<p className="font-mono text-white/30 text-xs">
{g.birthdate}
{g.birthdate && g.postcode && " · "}
{g.postcode}
</p>
)}
</div>
))}
</div>