refactor(patient-contact): improve contact form components and validation

- Remove hardcoded contact limit and use prop instead
- Add ButtonAction component to form exports
- Enhance contact schema validation with better error messages
- Refactor contact type select component to use doc-entry components
- Improve form layout and consistency between contact and relative forms
This commit is contained in:
Khafid Prayoga
2025-11-24 14:08:01 +07:00
parent 96a7ada059
commit f3474eb0b5
6 changed files with 87 additions and 92 deletions

No files matched your search

+2 -2
View File
@@ -1,8 +1,8 @@
import { z } from 'zod'
const PersonContactBaseSchema = z.object({
contactType: z.string().min(1, 'Mohon pilih tipe kontak'),
contactNumber: z.string().min(8, 'Nomor minimal 8 digit'),
contactType: z.string({ required_error: 'Mohon pilih tipe kontak' }).min(1, 'Mohon pilih tipe kontak'),
contactNumber: z.string({ required_error: 'Nomor kontak harus diisi' }).min(8, 'Nomor minimal 8 digit'),
})
const PersonContactListSchema = z.object({