feat(admin): add birthdate & postcode
This commit is contained in:
@@ -30,6 +30,8 @@ type Guest = {
|
|||||||
lastName: string;
|
lastName: string;
|
||||||
email?: string;
|
email?: string;
|
||||||
phone?: string;
|
phone?: string;
|
||||||
|
birthdate?: string;
|
||||||
|
postcode?: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
function parseGuests(raw: unknown): Guest[] {
|
function parseGuests(raw: unknown): Guest[] {
|
||||||
@@ -664,6 +666,10 @@ function AdminPage() {
|
|||||||
Email <SortIcon col="email" />
|
Email <SortIcon col="email" />
|
||||||
</th>
|
</th>
|
||||||
<th className={`${thCls} hidden xl:table-cell`}>Telefoon</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")}>
|
<th className={thCls} onClick={() => handleSort("type")}>
|
||||||
Type <SortIcon col="type" />
|
Type <SortIcon col="type" />
|
||||||
</th>
|
</th>
|
||||||
@@ -690,7 +696,7 @@ function AdminPage() {
|
|||||||
{registrationsQuery.isLoading ? (
|
{registrationsQuery.isLoading ? (
|
||||||
<tr>
|
<tr>
|
||||||
<td
|
<td
|
||||||
colSpan={12}
|
colSpan={14}
|
||||||
className="px-4 py-12 text-center font-mono text-sm text-white/30"
|
className="px-4 py-12 text-center font-mono text-sm text-white/30"
|
||||||
>
|
>
|
||||||
laden...
|
laden...
|
||||||
@@ -699,7 +705,7 @@ function AdminPage() {
|
|||||||
) : sortedRegistrations.length === 0 ? (
|
) : sortedRegistrations.length === 0 ? (
|
||||||
<tr>
|
<tr>
|
||||||
<td
|
<td
|
||||||
colSpan={12}
|
colSpan={14}
|
||||||
className="px-4 py-12 text-center font-mono text-sm text-white/30"
|
className="px-4 py-12 text-center font-mono text-sm text-white/30"
|
||||||
>
|
>
|
||||||
Geen registraties gevonden
|
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">
|
<td className="hidden px-3 py-3 font-mono text-white/45 text-xs xl:table-cell">
|
||||||
{reg.phone || "—"}
|
{reg.phone || "—"}
|
||||||
</td>
|
</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">
|
<td className="px-3 py-3">
|
||||||
<span
|
<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"}`}
|
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`}
|
key={`${reg.id}-detail`}
|
||||||
className="border-white/5 border-b bg-white/5"
|
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">
|
<div className="grid gap-4 sm:grid-cols-2">
|
||||||
{/* Guests */}
|
{/* Guests */}
|
||||||
{guestCount > 0 && (
|
{guestCount > 0 && (
|
||||||
@@ -864,6 +876,16 @@ function AdminPage() {
|
|||||||
{g.phone}
|
{g.phone}
|
||||||
</span>
|
</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 && (
|
{!g.email && !g.phone && (
|
||||||
<span className="font-mono text-white/25 text-xs italic">
|
<span className="font-mono text-white/25 text-xs italic">
|
||||||
geen contactgegevens
|
geen contactgegevens
|
||||||
@@ -875,7 +897,7 @@ function AdminPage() {
|
|||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{/* Notes */}
|
{/* Registrant birthdate + postcode */}
|
||||||
{hasNotes && (
|
{hasNotes && (
|
||||||
<div>
|
<div>
|
||||||
<p className="mb-2 font-mono text-[10px] text-white/40 uppercase tracking-widest">
|
<p className="mb-2 font-mono text-[10px] text-white/40 uppercase tracking-widest">
|
||||||
@@ -980,6 +1002,12 @@ function AdminPage() {
|
|||||||
{reg.phone}
|
{reg.phone}
|
||||||
</p>
|
</p>
|
||||||
)}
|
)}
|
||||||
|
{reg.birthdate && (
|
||||||
|
<p className="font-mono text-white/30 text-xs">
|
||||||
|
{reg.birthdate}
|
||||||
|
{reg.postcode && ` · ${reg.postcode}`}
|
||||||
|
</p>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
<div className="flex shrink-0 flex-col items-end gap-1.5">
|
<div className="flex shrink-0 flex-col items-end gap-1.5">
|
||||||
<span
|
<span
|
||||||
@@ -1067,6 +1095,12 @@ function AdminPage() {
|
|||||||
{reg.phone}
|
{reg.phone}
|
||||||
</p>
|
</p>
|
||||||
)}
|
)}
|
||||||
|
{reg.birthdate && (
|
||||||
|
<p className="font-mono text-white/30 text-xs">
|
||||||
|
{reg.birthdate}
|
||||||
|
{reg.postcode && ` · ${reg.postcode}`}
|
||||||
|
</p>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
<div className="flex shrink-0 flex-col items-end gap-1.5">
|
<div className="flex shrink-0 flex-col items-end gap-1.5">
|
||||||
<span
|
<span
|
||||||
@@ -1157,6 +1191,13 @@ function AdminPage() {
|
|||||||
{g.phone}
|
{g.phone}
|
||||||
</p>
|
</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>
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user