wip: adjust strict form data
person-relative: schema bind strict typed person-contact: strict schema type person-families: strict schema type person-address-relative: strict schema type patient: strict schema type person-address: strict schema type
This commit is contained in:
@@ -26,8 +26,18 @@ const PersonFamiliesSchema = z.discriminatedUnion('shareFamilyData', [
|
||||
}),
|
||||
])
|
||||
|
||||
interface PersonFamiliesFormData {
|
||||
shareFamilyData: '0' | '1'
|
||||
families: {
|
||||
relation: 'mother' | 'father' | 'guardian' | 'emergency_contact'
|
||||
name: string
|
||||
education: string
|
||||
occupation?: string
|
||||
}[]
|
||||
}
|
||||
|
||||
type PersonFamilyFormData = z.infer<typeof PersonFamilySchema>
|
||||
type PersonFamiliesFormData = z.infer<typeof PersonFamiliesSchema>
|
||||
// type PersonFamiliesFormData = z.infer<typeof PersonFamiliesSchema>
|
||||
|
||||
export { PersonFamilySchema, PersonFamiliesSchema }
|
||||
export type { PersonFamilyFormData, PersonFamiliesFormData }
|
||||
|
||||
Reference in New Issue
Block a user