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:
Ryan Moon
2026-03-28 12:31:02 -05:00
parent ce2a61ced9
commit b9e984cfa3
10 changed files with 243 additions and 28 deletions

View File

@@ -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(),