feat:add birthdate and postcode
This commit is contained in:
@@ -225,6 +225,8 @@ const coreRegistrationFields = {
|
||||
lastName: z.string().min(1),
|
||||
email: z.string().email(),
|
||||
phone: z.string().optional(),
|
||||
postcode: z.string().min(1),
|
||||
birthdate: z.string().min(1),
|
||||
registrationType: registrationTypeSchema.default("watcher"),
|
||||
artForm: z.string().optional(),
|
||||
experience: z.string().optional(),
|
||||
@@ -277,6 +279,8 @@ export const appRouter = {
|
||||
lastName: input.lastName,
|
||||
email: input.email,
|
||||
phone: input.phone || null,
|
||||
postcode: input.postcode,
|
||||
birthdate: input.birthdate,
|
||||
registrationType: input.registrationType,
|
||||
artForm: isPerformer ? input.artForm || null : null,
|
||||
experience: isPerformer ? input.experience || null : null,
|
||||
@@ -364,6 +368,8 @@ export const appRouter = {
|
||||
lastName: input.lastName,
|
||||
email: input.email,
|
||||
phone: input.phone || null,
|
||||
postcode: input.postcode,
|
||||
birthdate: input.birthdate,
|
||||
registrationType: input.registrationType,
|
||||
artForm: isPerformer ? input.artForm || null : null,
|
||||
experience: isPerformer ? input.experience || null : null,
|
||||
@@ -515,6 +521,8 @@ export const appRouter = {
|
||||
"Last Name",
|
||||
"Email",
|
||||
"Phone",
|
||||
"Postcode",
|
||||
"Birthdate",
|
||||
"Type",
|
||||
"Art Form",
|
||||
"Experience",
|
||||
@@ -543,6 +551,8 @@ export const appRouter = {
|
||||
r.lastName,
|
||||
r.email,
|
||||
r.phone || "",
|
||||
r.postcode || "",
|
||||
r.birthdate || "",
|
||||
r.registrationType,
|
||||
r.artForm || "",
|
||||
r.experience || "",
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
ALTER TABLE registration ADD COLUMN postcode TEXT;
|
||||
ALTER TABLE registration ADD COLUMN birthdate TEXT;
|
||||
@@ -29,6 +29,13 @@
|
||||
"when": 1772530000000,
|
||||
"tag": "0003_add_guests",
|
||||
"breakpoints": true
|
||||
},
|
||||
{
|
||||
"idx": 8,
|
||||
"version": "6",
|
||||
"when": 1741388400000,
|
||||
"tag": "0008_add_postcode_birthdate",
|
||||
"breakpoints": true
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -21,6 +21,9 @@ export const registration = sqliteTable(
|
||||
drinkCardValue: integer("drink_card_value").default(0),
|
||||
// Guests: JSON array of {firstName, lastName, email?, phone?} objects
|
||||
guests: text("guests"),
|
||||
// Contact / demographic
|
||||
postcode: text("postcode"),
|
||||
birthdate: text("birthdate"),
|
||||
// Shared
|
||||
extraQuestions: text("extra_questions"),
|
||||
managementToken: text("management_token").unique(),
|
||||
|
||||
Reference in New Issue
Block a user