diff --git a/src/Components/Facility/DoctorNote.tsx b/src/Components/Facility/DoctorNote.tsx
index 5777f9e3fb1..1fe28ba38d0 100644
--- a/src/Components/Facility/DoctorNote.tsx
+++ b/src/Components/Facility/DoctorNote.tsx
@@ -7,10 +7,11 @@ interface DoctorNoteProps {
state: PatientNoteStateType;
setReload: any;
handleNext: () => void;
+ disableEdit?: boolean;
}
const DoctorNote = (props: DoctorNoteProps) => {
- const { state, handleNext, setReload } = props;
+ const { state, handleNext, setReload, disableEdit } = props;
return (
{
note={note}
key={note.id}
setReload={setReload}
+ disableEdit={disableEdit}
/>
))}
diff --git a/src/Components/Facility/PatientConsultationNotesList.tsx b/src/Components/Facility/PatientConsultationNotesList.tsx
index 86aa99abc3d..2b9df8c3902 100644
--- a/src/Components/Facility/PatientConsultationNotesList.tsx
+++ b/src/Components/Facility/PatientConsultationNotesList.tsx
@@ -12,12 +12,13 @@ interface PatientNotesProps {
setState: any;
reload?: boolean;
setReload?: any;
+ disableEdit?: boolean;
}
const pageSize = RESULTS_PER_PAGE_LIMIT;
const PatientConsultationNotesList = (props: PatientNotesProps) => {
- const { state, setState, reload, setReload } = props;
+ const { state, setState, reload, setReload, disableEdit } = props;
const consultationId = useSlug("consultation") ?? "";
const [isLoading, setIsLoading] = useState(true);
@@ -80,7 +81,12 @@ const PatientConsultationNotesList = (props: PatientNotesProps) => {
}
return (
-
+
);
};
diff --git a/src/Components/Facility/PatientNoteCard.tsx b/src/Components/Facility/PatientNoteCard.tsx
index 8c53a5701d4..8f98e621573 100644
--- a/src/Components/Facility/PatientNoteCard.tsx
+++ b/src/Components/Facility/PatientNoteCard.tsx
@@ -21,10 +21,12 @@ const PatientNoteCard = ({
state,
note,
setReload,
+ disableEdit,
}: {
state: PatientNoteStateType;
note: PatientNotesModel;
setReload: any;
+ disableEdit?: boolean;
}) => {
const [isEditing, setIsEditing] = useState(false);
const [noteField, setNoteField] = useState(note.note);
@@ -127,7 +129,7 @@ const PatientNoteCard = ({
}
- {note.created_by_object.id === authUser.id && (
+ {!disableEdit && note.created_by_object.id === authUser.id && (