Skip to content

Commit

Permalink
show medicine name when collapsed
Browse files Browse the repository at this point in the history
  • Loading branch information
rithviknishad committed May 17, 2024
1 parent c4a1864 commit feba2f5
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions src/Components/Medicine/PrescriptionDetailCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,21 @@ export default function PrescriptionDetailCard({
props.selected ? "text-black" : "text-gray-700",
)}
>
{prescription.prescription_type === "DISCHARGE" &&
`${t("discharge")} `}
{t(
prescription.dosage_type === "PRN"
? "prn_prescription"
: "prescription",
{isCollapsed ? (
prescription.medicine_object?.name ??
prescription.medicine_old
) : (
<>
{prescription.prescription_type === "DISCHARGE" &&
`${t("discharge")} `}
{t(
prescription.dosage_type === "PRN"
? "prn_prescription"
: "prescription",
)}
{` #${prescription.id?.slice(-5)}`}
</>
)}
{` #${prescription.id?.slice(-5)}`}
</h3>
{prescription.discontinued && (
<span className="rounded-full bg-gray-700 px-2 py-1 text-xs font-semibold uppercase text-white">
Expand Down

0 comments on commit feba2f5

Please sign in to comment.