From ab451478afba044af073e91893689a2e6a99b9d1 Mon Sep 17 00:00:00 2001 From: Uday Date: Tue, 17 Dec 2024 16:20:19 +0530 Subject: [PATCH] suggestions --- src/components/Facility/PatientNotesSlideover.tsx | 2 +- src/components/Files/FileUpload.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/Facility/PatientNotesSlideover.tsx b/src/components/Facility/PatientNotesSlideover.tsx index 27deb74713e..d591156e52e 100644 --- a/src/components/Facility/PatientNotesSlideover.tsx +++ b/src/components/Facility/PatientNotesSlideover.tsx @@ -92,7 +92,7 @@ export default function PatientNotesSlideover(props: PatientNotesProps) { setState((prevState) => ({ ...prevState, notes: - state.cPage === 1 + prevState.cPage === 1 ? notesData.results : [...prevState.notes, ...notesData.results], totalPages: Math.ceil(notesData.count / RESULTS_PER_PAGE_LIMIT), diff --git a/src/components/Files/FileUpload.tsx b/src/components/Files/FileUpload.tsx index 8bae58edb3d..77fb90b811d 100644 --- a/src/components/Files/FileUpload.tsx +++ b/src/components/Files/FileUpload.tsx @@ -444,7 +444,7 @@ export const FileUpload = (props: FileUploadProps) => { authUser.user_type === "DistrictAdmin" || authUser.user_type === "StateAdmin" } - archivable={tab !== "DISCHARGE_SUMMARY"} + archivable={!["DISCHARGE_SUMMARY", "PATIENT_NOTES"].includes(tab)} /> ))} {!(fileQuery?.data?.results || []).length && (