Files
simrsx-fe/app/handlers/patient.handler.ts
Khafid Prayoga 070239270e 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
2025-10-16 14:04:00 +07:00

25 lines
478 B
TypeScript

// 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,
})