Add member address, state normalization, account inheritance, fix member form
- Address field on member table (jsonb, same format as account) - Members inherit email, phone, address from account when not provided - State normalization: "Texas" → "TX", "california" → "CA" via shared util - Member form drops zodResolver to fix optional field validation flashing - Account name auto-format: "First Last - Account" - US state lookup with full name + code support
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
-- Add address to member table
|
||||
ALTER TABLE "member" ADD COLUMN "address" jsonb;
|
||||
@@ -78,6 +78,13 @@
|
||||
"when": 1774704000000,
|
||||
"tag": "0010_member_identifiers",
|
||||
"breakpoints": true
|
||||
},
|
||||
{
|
||||
"idx": 11,
|
||||
"version": "7",
|
||||
"when": 1774710000000,
|
||||
"tag": "0011_member_address",
|
||||
"breakpoints": true
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -56,6 +56,12 @@ export const members = pgTable('member', {
|
||||
isMinor: boolean('is_minor').notNull().default(false),
|
||||
email: varchar('email', { length: 255 }),
|
||||
phone: varchar('phone', { length: 50 }),
|
||||
address: jsonb('address').$type<{
|
||||
street?: string
|
||||
city?: string
|
||||
state?: string
|
||||
zip?: string
|
||||
}>(),
|
||||
notes: text('notes'),
|
||||
legacyId: varchar('legacy_id', { length: 255 }),
|
||||
createdAt: timestamp('created_at', { withTimezone: true }).notNull().defaultNow(),
|
||||
|
||||
Reference in New Issue
Block a user