feat(registration): add birthdate & postcode

This commit is contained in:
2026-03-19 10:15:45 +01:00
parent 19d784b2e5
commit f113770348
11 changed files with 1660 additions and 5 deletions

View File

@@ -117,6 +117,8 @@ interface EditFormProps {
lastName: string;
email: string;
phone: string | null;
birthdate: string;
postcode: string;
registrationType: string;
artForm: string | null;
experience: string | null;
@@ -140,6 +142,8 @@ function EditForm({ token, initialData, onCancel, onSaved }: EditFormProps) {
lastName: initialData.lastName,
email: initialData.email,
phone: initialData.phone ?? "",
birthdate: initialData.birthdate ?? "",
postcode: initialData.postcode ?? "",
registrationType: initialType,
artForm: initialData.artForm ?? "",
experience: initialData.experience ?? "",
@@ -185,6 +189,8 @@ function EditForm({ token, initialData, onCancel, onSaved }: EditFormProps) {
? formData.experience.trim() || undefined
: undefined,
isOver16: performer ? formData.isOver16 : false,
birthdate: formData.birthdate.trim(),
postcode: formData.postcode.trim(),
guests: performer
? []
: formGuests.map((g) => ({
@@ -192,6 +198,8 @@ function EditForm({ token, initialData, onCancel, onSaved }: EditFormProps) {
lastName: g.lastName.trim(),
email: g.email.trim() || undefined,
phone: g.phone.trim() || undefined,
birthdate: g.birthdate.trim(),
postcode: g.postcode.trim(),
})),
extraQuestions: formData.extraQuestions.trim() || undefined,
giftAmount,
@@ -393,7 +401,14 @@ function EditForm({ token, initialData, onCancel, onSaved }: EditFormProps) {
if (formGuests.length >= 9) return;
setFormGuests((prev) => [
...prev,
{ firstName: "", lastName: "", email: "", phone: "" },
{
firstName: "",
lastName: "",
email: "",
phone: "",
birthdate: "",
postcode: "",
},
]);
}}
onRemove={(idx) =>