6 Commits

Author SHA1 Message Date
Khafid Prayoga 51725d7f73 feat(patient): doc preview, integration to select ethnic and lang (#229)
* impl: opts for ethnic and lang

* fix: doc related for preview

fix: upload dokumen kk dan ktp

fix dokumen preview

fix: add preview doc on edit form
2025-12-12 16:12:24 +07:00
Khafid Prayoga 97d2b76ee3 refactor(person-relative): update schema and form components for family data
- Change value format in radio-parents-input from '1'/'0' to 'yes'/'no'
- Remove default labels from select-education and select-job components
- Update schema to make fields optional and add new fields
- Modify family-parents-form to use new schema and improve UI
- Update patient form and models to align with schema changes
2025-12-10 20:30:34 +07:00
Khafid Prayoga 3cac23ce8a fix edit form state
fix: id list for contacts and address list

fix warning

fix duplicate contacts responsible: true

fix edit family

fix nik required
2025-12-10 14:36:32 +07:00
Khafid Prayoga 910b641750 form cleanup
feat(patient): add edit functionality to patient form

- Modify genPatientEntity to accept existing patient data for updates
- Add handleActionEdit handler for edit mode
- Update form to handle both create and edit modes
- Rename patient ref to patientDetail for clarity

refactor(patient): update marital status codes and job options mapping

- Change marital status enum values to standardized codes (S, M, D, W)
- Simplify job options and marital status options mapping using mapToComboboxOptList
- Add error handling in patient data loading

ajust styling text based on combobox

wip: edit patient redirect

refactor(models): update type definitions and form field handling

- Add field-name prop to SelectDob component for better form handling
- Update Person and Patient interfaces to use null for optional fields
- Add maritalStatus_code field to Person interface
- Improve type safety by replacing undefined with null for optional fields

fix casting radio str to boolean and parsing date error
2025-12-09 20:49:25 +07:00
Khafid Prayoga 05e2f32197 edit-mode: unwrap detail data and use strict type
refactor(patient-form): simplify address synchronization logic

- Extract address sync logic into helper functions
- Remove unused schema imports
- Streamline mounted hook with new loadInitData function
- Consolidate watchers into single efficient watcher

feat(forms): add readonly support across all form components

Implement readonly state handling for patient, relative, contact, and address forms
Add isDisabled prop to all form fields to support readonly mode
Update form components to respect isReadonly prop from parent

refactor(patient-form): reorganize imports and improve type usage

- Group related imports and move type imports to the top
- Replace genPatient with genPatientEntity for better type safety
- Remove console.log statement
- Fix formatting and indentation issues
2025-12-06 10:52:35 +07:00
Khafid Prayoga 1f6ca8a7f9 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
2025-12-06 08:54:37 +07:00