refactor(patient): restructure patient data handling to use nested properties
Move address, contact and relative data into nested properties of Person model Update preview component to access data through person object Remove separate props for addresses, contacts and relatives
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
import { type Base, genBase } from './_base'
|
||||
import type { PersonAddress } from './person-address'
|
||||
import type { PersonContact } from './person-contact'
|
||||
import type { PersonRelative } from './person-relative'
|
||||
|
||||
export interface Person extends Base {
|
||||
// todo: awaiting approve from stake holder: buat field sapaan
|
||||
// todo: adjust field ketika person Balita
|
||||
name: string
|
||||
// alias?: string
|
||||
frontTitle?: string
|
||||
@@ -26,6 +27,11 @@ export interface Person extends Base {
|
||||
passportFileUrl?: string
|
||||
drivingLicenseFileUrl?: string
|
||||
familyIdentityFileUrl?: string
|
||||
|
||||
// preload data for detail patient
|
||||
addresses?: PersonAddress[] | null
|
||||
contacts?: PersonContact[] | null
|
||||
relatives?: PersonRelative[] | null
|
||||
}
|
||||
|
||||
export function genPerson(): Person {
|
||||
|
||||
Reference in New Issue
Block a user