Files
simrsx-fe/app/pages/_dev/data-table/index.data.ts
Munawwirul Jamal a4fb33dc3e dev: hotfix, data table
+ deepFetch for nested field
+ sampel
2025-10-16 16:06:02 +07:00

68 lines
1.1 KiB
TypeScript

export interface Regency {
id: number
code: string
name: string
}
export interface Person {
id: number
name: string
residentIdentityNumber?: string
birthDate?: string
birthPlace_regency_code: string
birthPlace_regency: Regency
}
export interface Patient {
id: number
number: string
person: Person
}
export const regencies: Regency[] = [
{
id: 1,
code: '3522',
name: 'Bojonegoro',
},
{
id: 2,
code: '3579',
name: 'Batu',
},
]
export const people: Person[] = [
{
id: 1,
name: 'Abdul Manap',
residentIdentityNumber: '1234567890',
birthDate: '1990-01-01',
birthPlace_regency_code: '3522',
birthPlace_regency: regencies[0],
},
{
id: 2,
name: 'Abdul Gofur',
residentIdentityNumber: '1234567890',
birthDate: '1990-01-01',
birthPlace_regency_code: '3522',
birthPlace_regency: regencies[1],
},
]
export const data: Patient[] = [
{
id: 1,
number: 'RM-0000001',
person_id: 1,
person: people[0],
},
{
id: 2,
number: 'RM-0000002',
person_id: 2,
person: people[1],
}
]