Skip to content

Commit

Permalink
Merge branch 'develop' into hideAssetType#6789
Browse files Browse the repository at this point in the history
  • Loading branch information
shyamprakash123 authored Jan 20, 2024
2 parents 0bdec42 + f6159eb commit a5adf30
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/Components/Form/SelectMenuV2.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ const SelectMenuV2 = <T, V>(props: SelectMenuProps<T, V>) => {
{value.icon}
</div>
)}
<p className="ml-2.5 text-sm font-medium">
<p className="ml-2.5 break-all text-sm font-medium">
{value.selectedLabel}
</p>
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -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";
Expand All @@ -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) =>
Expand All @@ -46,9 +46,7 @@ export default function AdministrationEventCell({
show={showTimeline}
>
<div className="mt-6 text-sm font-medium text-gray-700">
Administrations between{" "}
<span className="text-black">{formatTime(start, "HH:mm")}</span> and{" "}
<span className="text-black">{formatTime(end, "HH:mm")}</span> on{" "}
Administrations on{" "}
<span className="text-black">
{formatDateTime(start, "DD/MM/YYYY")}
</span>
Expand Down
5 changes: 4 additions & 1 deletion src/Components/Medicine/PrescriptionDetailCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,10 @@ export default function PrescriptionDetailCard({
<Detail className="col-span-9 md:col-span-5" label={t("medicine")}>
{prescription.medicine_object?.name ?? prescription.medicine_old}
</Detail>
<Detail className="col-span-5 md:col-span-2" label={t("route")}>
<Detail
className="col-span-5 break-all md:col-span-2"
label={t("route")}
>
{prescription.route &&
t("PRESCRIPTION_ROUTE_" + prescription.route)}
</Detail>
Expand Down

0 comments on commit a5adf30

Please sign in to comment.