From 8a9078d16b6dd5189c7919bb3fbd83ea7aa53a18 Mon Sep 17 00:00:00 2001 From: Sulochan Khadka <122200551+Sulochan-khadka@users.noreply.github.com> Date: Mon, 11 Nov 2024 17:24:51 +0530 Subject: [PATCH] Dosage heading is misaligned in the prescription module #8645 (#8751) --- .../AdministrationTable.tsx | 22 +++++------ .../AdministrationTableRow.tsx | 39 ++++++++++++------- 2 files changed, 35 insertions(+), 26 deletions(-) diff --git a/src/components/Medicine/MedicineAdministrationSheet/AdministrationTable.tsx b/src/components/Medicine/MedicineAdministrationSheet/AdministrationTable.tsx index 86db7353832..b1eac32409d 100644 --- a/src/components/Medicine/MedicineAdministrationSheet/AdministrationTable.tsx +++ b/src/components/Medicine/MedicineAdministrationSheet/AdministrationTable.tsx @@ -31,17 +31,17 @@ export default function MedicineAdministrationTable({ -
- {t("medicine")} - -

Dosage &

-

- {prescriptions[0]?.dosage_type !== "PRN" - ? "Frequency" - : "Indicator"} -

-
-
+ {t("medicine")} + + + +

{t("dosage")} &

+

+ {prescriptions[0]?.dosage_type !== "PRN" + ? t("frequency") + : t("indicator")} +

+
diff --git a/src/components/Medicine/MedicineAdministrationSheet/AdministrationTableRow.tsx b/src/components/Medicine/MedicineAdministrationSheet/AdministrationTableRow.tsx index d08506d7fbe..7544f405b08 100644 --- a/src/components/Medicine/MedicineAdministrationSheet/AdministrationTableRow.tsx +++ b/src/components/Medicine/MedicineAdministrationSheet/AdministrationTableRow.tsx @@ -59,6 +59,25 @@ export default function MedicineAdministrationTableRow({ key: `${prescription.last_administration?.administered_date}`, }, ); + const DosageFrequencyInfo = () => ( +
+
+ {prescription.dosage_type !== "TITRATED" ? ( +

{prescription.base_dosage}

+ ) : ( +

+ {prescription.base_dosage} - {prescription.target_dosage} +

+ )} + +

+ {prescription.dosage_type !== "PRN" + ? t("PRESCRIPTION_FREQUENCY_" + prescription.frequency) + : prescription.indicator} +

+
+
+ ); return ( <> @@ -216,24 +235,14 @@ export default function MedicineAdministrationTableRow({ {prescription.medicine_object?.generic} - -
- {prescription.dosage_type !== "TITRATED" ? ( -

{prescription.base_dosage}

- ) : ( -

- {prescription.base_dosage} - {prescription.target_dosage} -

- )} - -

- {prescription.dosage_type !== "PRN" - ? t("PRESCRIPTION_FREQUENCY_" + prescription.frequency) - : prescription.indicator} -

+
+
+ + +