Skip to content

Commit

Permalink
(fix)O3-2662: Unable to attach images when registering/editing a patient
Browse files Browse the repository at this point in the history
  • Loading branch information
jwamalwa committed Jan 16, 2024
1 parent c6654d4 commit f838052
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { Button } from '@carbon/react';
import { showModal, toOmrsIsoString } from '@openmrs/esm-framework';
import placeholder from '../assets/placeholder.svg';
import styles from './capture-photo.scss';
import { type UploadedFile } from '../attachments-types';

export interface CapturePhotoProps {
onCapturePhoto(dataUri: string, photoDateTime: string): void;
Expand All @@ -16,9 +17,9 @@ const CapturePhoto: React.FC<CapturePhotoProps> = ({ initialState, onCapturePhot

const showCam = useCallback(() => {
const close = showModal('capture-photo-modal', {
saveFile(dataUri: string) {
setDataUri(dataUri);
onCapturePhoto(dataUri, toOmrsIsoString(new Date()));
saveFile(file: UploadedFile) {
setDataUri(file.base64Content);
onCapturePhoto(file.base64Content, toOmrsIsoString(new Date()));
close();
},
collectDescription: false,
Expand Down

0 comments on commit f838052

Please sign in to comment.