From 2817c98bea07de2b7806be7325f690becee1d89b Mon Sep 17 00:00:00 2001 From: Ashraf Mohammed <98876115+AshrafMd-1@users.noreply.github.com> Date: Tue, 14 Nov 2023 13:05:55 +0000 Subject: [PATCH 1/2] fix scroll overlay --- .../MedicineAdministrationSheet/index.tsx | 35 ++++++++++--------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/src/Components/Medicine/MedicineAdministrationSheet/index.tsx b/src/Components/Medicine/MedicineAdministrationSheet/index.tsx index 187d5447314..e83caf09044 100644 --- a/src/Components/Medicine/MedicineAdministrationSheet/index.tsx +++ b/src/Components/Medicine/MedicineAdministrationSheet/index.tsx @@ -106,7 +106,9 @@ const MedicineAdministrationSheet = ({ readonly, is_prn }: Props) => { } - disableOverlay={loading || !prescriptions?.length} + disableOverlay={ + loading || !prescriptions?.length || !(prescriptions?.length > 1) + } > {loading && } {prescriptions?.length === 0 && } @@ -121,23 +123,22 @@ const MedicineAdministrationSheet = ({ readonly, is_prn }: Props) => { }} /> )} - - {!showDiscontinued && !!discontinuedCount && ( - setShowDiscontinued(true)} - > - - - - Show {discontinuedCount} discontinued - prescription(s) - - - - )} + {!showDiscontinued && !!discontinuedCount && ( + setShowDiscontinued(true)} + > + + + + Show {discontinuedCount} discontinued + prescription(s) + + + + )} ); }; From bcb2a1f4cd538b5c9e335ccc2c187556a466ffff Mon Sep 17 00:00:00 2001 From: Ashraf Mohammed Date: Wed, 15 Nov 2023 13:26:30 +0530 Subject: [PATCH 2/2] add style --- .../MedicineAdministrationSheet/index.tsx | 83 ++++++++++--------- 1 file changed, 43 insertions(+), 40 deletions(-) diff --git a/src/Components/Medicine/MedicineAdministrationSheet/index.tsx b/src/Components/Medicine/MedicineAdministrationSheet/index.tsx index e83caf09044..6a187f1f998 100644 --- a/src/Components/Medicine/MedicineAdministrationSheet/index.tsx +++ b/src/Components/Medicine/MedicineAdministrationSheet/index.tsx @@ -97,48 +97,51 @@ const MedicineAdministrationSheet = ({ readonly, is_prn }: Props) => { ) } /> - - - Scroll to view more prescriptions - - - } - disableOverlay={ - loading || !prescriptions?.length || !(prescriptions?.length > 1) - } - > - {loading && } - {prescriptions?.length === 0 && } - - {!!prescriptions?.length && ( - { - refetch(); - discontinuedPrescriptions.refetch(); - }} - /> - )} - - {!showDiscontinued && !!discontinuedCount && ( - setShowDiscontinued(true)} +
+ + Scroll to view more prescriptions + +
+ } + disableOverlay={ + loading || !prescriptions?.length || !(prescriptions?.length > 1) + } > - - - - Show {discontinuedCount} discontinued - prescription(s) + {loading && } + {prescriptions?.length === 0 && } + + {!!prescriptions?.length && ( + { + refetch(); + discontinuedPrescriptions.refetch(); + }} + /> + )} + + {!showDiscontinued && !!discontinuedCount && ( + setShowDiscontinued(true)} + > + + + + Show {discontinuedCount} discontinued + prescription(s) + - -
- )} + + )} + ); };