diff --git a/src/Components/Common/RichTextEditor/RichTextEditor.tsx b/src/Components/Common/RichTextEditor/RichTextEditor.tsx index ff1d3e41ea9..cb693e4e870 100644 --- a/src/Components/Common/RichTextEditor/RichTextEditor.tsx +++ b/src/Components/Common/RichTextEditor/RichTextEditor.tsx @@ -517,7 +517,7 @@ const RichTextEditor: React.FC = ({ newFile, "PUT", { "Content-Type": file.type }, - (xhr: XMLHttpRequest) => { + async (xhr: XMLHttpRequest) => { if (xhr.status >= 200 && xhr.status < 300) { Notification.Success({ msg: "File Uploaded Successfully", diff --git a/src/Components/Facility/DoctorNote.tsx b/src/Components/Facility/DoctorNote.tsx index ffcb5dcc558..fe7ccc278f0 100644 --- a/src/Components/Facility/DoctorNote.tsx +++ b/src/Components/Facility/DoctorNote.tsx @@ -27,7 +27,7 @@ const DoctorNote = (props: DoctorNoteProps) => { return (
{state.notes.length ? ( diff --git a/src/Components/Facility/PatientConsultationNotesList.tsx b/src/Components/Facility/PatientConsultationNotesList.tsx index d1681f65367..8165eacb49d 100644 --- a/src/Components/Facility/PatientConsultationNotesList.tsx +++ b/src/Components/Facility/PatientConsultationNotesList.tsx @@ -80,6 +80,10 @@ const PatientConsultationNotesList = (props: PatientNotesProps) => { fetchNotes(); }, [thread]); + useEffect(() => { + setThreadViewNote?.(""); + }, [thread, mode]); + useEffect(() => { setReload?.(true); }, []); diff --git a/src/Components/Facility/PatientNoteCard.tsx b/src/Components/Facility/PatientNoteCard.tsx index 34bb7b70f3e..70b251208df 100644 --- a/src/Components/Facility/PatientNoteCard.tsx +++ b/src/Components/Facility/PatientNoteCard.tsx @@ -304,7 +304,10 @@ const PatientNoteCard = ({ >
loadFile(file.external_id, note.id)} + onClick={(e) => { + e.stopPropagation(); + loadFile(file.external_id, note.id); + }} > Note

-

{edit.note}

+
+ +
); diff --git a/src/Components/Facility/PatientNotesDetailedView.tsx b/src/Components/Facility/PatientNotesDetailedView.tsx index 7eccceb1624..f566eb4c625 100644 --- a/src/Components/Facility/PatientNotesDetailedView.tsx +++ b/src/Components/Facility/PatientNotesDetailedView.tsx @@ -100,7 +100,7 @@ const PatientNotesDetailedView = (props: Props) => { } return ( -
+
{state && (
@@ -121,15 +121,17 @@ const PatientNotesDetailedView = (props: Props) => { allowReply={false} />
- {state.replies.length > 0 && ( -
- {state.replies.length}{" "} - {state.replies.length > 1 ? "replies" : "reply"} -
- )} -

Replies

+
+

Replies

+ {state.replies.length > 0 && ( +
+ {state.replies.length}{" "} + {state.replies.length > 1 ? "replies" : "reply"} +
+ )} +
{ -
+
{state.replies.map((reply) => (