admin: Superforms + Zod validation, three-address-defaults schema, profiles toast fix
- Add Superforms + Zod 4 for all admin form validation - Replace address isDefault with three separate boolean defaults (Mailing, Billing, Shipping) - Update profiles page with three-checkbox address form and toast improvements - Convert all admin page server actions to pass request directly to crud - Export superFormErrorsToFieldErrors helper for profiles server actions - Regenerate Prisma client for new schema fields
This commit is contained in:
+12
-10
@@ -47,16 +47,18 @@ model Profile {
|
||||
}
|
||||
|
||||
model Address {
|
||||
id String @id @default(uuid())
|
||||
profileId String
|
||||
profile Profile @relation(fields: [profileId], references: [id], onDelete: Cascade)
|
||||
street String
|
||||
city String
|
||||
state String
|
||||
postalCode String
|
||||
country String
|
||||
type String @default("Mailing")
|
||||
isDefault Boolean @default(false)
|
||||
id String @id @default(uuid())
|
||||
profileId String
|
||||
profile Profile @relation(fields: [profileId], references: [id], onDelete: Cascade)
|
||||
street String
|
||||
city String
|
||||
state String
|
||||
postalCode String
|
||||
country String
|
||||
type String @default("Mailing")
|
||||
isDefaultMailing Boolean @default(false)
|
||||
isDefaultBilling Boolean @default(false)
|
||||
isDefaultShipping Boolean @default(false)
|
||||
}
|
||||
|
||||
model Session {
|
||||
|
||||
Reference in New Issue
Block a user