From 4cc489ab854c787db03fa7be568f7acbd1bf915b Mon Sep 17 00:00:00 2001 From: Kushal Bhana Date: Thu, 15 Aug 2024 16:28:35 +0530 Subject: [PATCH] responsive print in prescription module --- src/CAREUI/misc/PrintPreview.tsx | 22 +++++++++++-------- .../Medicine/ManagePrescriptions.tsx | 16 ++++++-------- src/Components/Medicine/PrintPreview.tsx | 6 ++--- tailwind.config.js | 1 + 4 files changed, 24 insertions(+), 21 deletions(-) diff --git a/src/CAREUI/misc/PrintPreview.tsx b/src/CAREUI/misc/PrintPreview.tsx index 243826c7337..78f9de33850 100644 --- a/src/CAREUI/misc/PrintPreview.tsx +++ b/src/CAREUI/misc/PrintPreview.tsx @@ -14,18 +14,22 @@ type Props = { export default function PrintPreview(props: Props) { return ( -
-
- window.print()}> - - Print - -
+
+
-
+
+
+ window.print()}> + + Print + +
{props.children}
diff --git a/src/Components/Medicine/ManagePrescriptions.tsx b/src/Components/Medicine/ManagePrescriptions.tsx index 8409e721779..500ccf95106 100644 --- a/src/Components/Medicine/ManagePrescriptions.tsx +++ b/src/Components/Medicine/ManagePrescriptions.tsx @@ -10,19 +10,17 @@ export default function ManagePrescriptions() { const { goBack } = useAppHistory(); return ( - - - Print - - } - > +
+
+ + + Print + +

diff --git a/src/Components/Medicine/PrintPreview.tsx b/src/Components/Medicine/PrintPreview.tsx index 09bad44d630..1b108490e3f 100644 --- a/src/Components/Medicine/PrintPreview.tsx +++ b/src/Components/Medicine/PrintPreview.tsx @@ -52,7 +52,7 @@ export default function PrescriptionsPrintPreview() { care logo

- + {patient && ( <> {patient.name} -{" "} @@ -71,7 +71,7 @@ export default function PrescriptionsPrintPreview() { ? `${t(`encounter_suggestion__${encounter.suggestion}`)} on` : "" } - className="col-span-5" + className="col-span-5 " > {formatDate(encounter?.encounter_date)} @@ -122,7 +122,7 @@ const PatientDetail = ({ return (
diff --git a/tailwind.config.js b/tailwind.config.js index a40c805621f..50e43f5bf33 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -24,6 +24,7 @@ module.exports = { ...defaultTheme.screens, "3xl": "1920px", }, + extend: { fontFamily: { sans: ["Inter", "sans-serif"],