From d0fdfc9243523b042867ef01c7462a727fba0247 Mon Sep 17 00:00:00 2001 From: Ashesh <3626859+Ashesh3@users.noreply.github.com> Date: Fri, 19 Jan 2024 17:59:31 +0530 Subject: [PATCH 1/2] Include start date for Prescription timeline cells (#7067) * Include start date for Prescription timeline cells * Change heading * heading --- .../AdministrationEventCell.tsx | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/Components/Medicine/MedicineAdministrationSheet/AdministrationEventCell.tsx b/src/Components/Medicine/MedicineAdministrationSheet/AdministrationEventCell.tsx index 1bcfc24a80a..c62af53c8bb 100644 --- a/src/Components/Medicine/MedicineAdministrationSheet/AdministrationEventCell.tsx +++ b/src/Components/Medicine/MedicineAdministrationSheet/AdministrationEventCell.tsx @@ -1,7 +1,7 @@ import dayjs from "../../../Utils/dayjs"; import { MedicineAdministrationRecord, Prescription } from "../models"; import CareIcon from "../../../CAREUI/icons/CareIcon"; -import { classNames, formatDateTime, formatTime } from "../../../Utils/utils"; +import { classNames, formatDateTime } from "../../../Utils/utils"; import DialogModal from "../../Common/Dialog"; import PrescrpitionActivityTimeline from "../PrescrpitionTimeline"; import { useState } from "react"; @@ -21,10 +21,10 @@ export default function AdministrationEventCell({ refetch, }: Props) { const [showTimeline, setShowTimeline] = useState(false); - // Check if cell belongs to an administered prescription + // Check if cell belongs to an administered prescription (including start and excluding end) const administered = administrations .filter((administration) => - dayjs(administration.administered_date).isBetween(start, end) + dayjs(administration.administered_date).isBetween(start, end, null, "[)") ) .sort( (a, b) => @@ -46,9 +46,7 @@ export default function AdministrationEventCell({ show={showTimeline} >
- Administrations between{" "} - {formatTime(start, "HH:mm")} and{" "} - {formatTime(end, "HH:mm")} on{" "} + Administrations on{" "} {formatDateTime(start, "DD/MM/YYYY")} From f6159eb39825147f0a350993651f40169595d8d7 Mon Sep 17 00:00:00 2001 From: Ashesh <3626859+Ashesh3@users.noreply.github.com> Date: Fri, 19 Jan 2024 20:33:55 +0530 Subject: [PATCH 2/2] Add break-all class to SelectMenuV2 component (#7068) * Add break-all class to SelectMenuV2 component * Update PrescriptionDetailCard component * Update PrescriptionDetailCard component styling --- src/Components/Form/SelectMenuV2.tsx | 2 +- src/Components/Medicine/PrescriptionDetailCard.tsx | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Components/Form/SelectMenuV2.tsx b/src/Components/Form/SelectMenuV2.tsx index 464a754cebe..2e277b40b4f 100644 --- a/src/Components/Form/SelectMenuV2.tsx +++ b/src/Components/Form/SelectMenuV2.tsx @@ -101,7 +101,7 @@ const SelectMenuV2 = (props: SelectMenuProps) => { {value.icon}
)} -

+

{value.selectedLabel}

diff --git a/src/Components/Medicine/PrescriptionDetailCard.tsx b/src/Components/Medicine/PrescriptionDetailCard.tsx index 4333eeb1a88..0e1f28e9654 100644 --- a/src/Components/Medicine/PrescriptionDetailCard.tsx +++ b/src/Components/Medicine/PrescriptionDetailCard.tsx @@ -86,7 +86,10 @@ export default function PrescriptionDetailCard({ {prescription.medicine_object?.name ?? prescription.medicine_old} - + {prescription.route && t("PRESCRIPTION_ROUTE_" + prescription.route)}