feat(patient): add patient handler and refactor form submission
- Introduce new patient handler using genCrudHandler for CRUD operations - Refactor patient entry form to use handler for save operations - Separate form data composition from submission logic - Handle file uploads and navigation after successful submission
This commit is contained in:
No files matched your search
@@ -0,0 +1,24 @@
|
||||
// Handlers
|
||||
import { genCrudHandler } from '~/handlers/_handler'
|
||||
|
||||
// Services
|
||||
import { postPatient as create, patchPatient as update, removePatient as remove } from '~/services/patient.service'
|
||||
|
||||
export const {
|
||||
recId,
|
||||
recAction,
|
||||
recItem,
|
||||
isReadonly,
|
||||
isProcessing,
|
||||
isFormEntryDialogOpen,
|
||||
isRecordConfirmationOpen,
|
||||
onResetState,
|
||||
handleActionSave,
|
||||
handleActionEdit,
|
||||
handleActionRemove,
|
||||
handleCancelForm,
|
||||
} = genCrudHandler({
|
||||
create,
|
||||
update,
|
||||
remove,
|
||||
})
|
||||
Reference in New Issue
Block a user