Skip to content

Commit

Permalink
fix patient Detail
Browse files Browse the repository at this point in the history
  • Loading branch information
Zeshanxviii committed Sep 6, 2024
1 parent aa130f6 commit 0593c33
Showing 1 changed file with 26 additions and 27 deletions.
53 changes: 26 additions & 27 deletions src/Components/Medicine/PrintPreview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export default function PrescriptionsPrintPreview() {
}
disabled={!(patient && encounter && items)}
>
<div className="mb-3 flex items-center justify-between p-4 ">
<div className="mb-3 flex items-center justify-between p-4">
<h3>{encounter?.facility_name}</h3>
<img
className="h-10 w-auto"
Expand Down Expand Up @@ -113,6 +113,31 @@ export default function PrescriptionsPrintPreview() {
);
}

const PatientDetail = ({
name,
children,
className,
}: {
name: string;
children?: ReactNode;
className?: string;
}) => {
return (
<div
className={classNames(
"inline-flex items-center whitespace-nowrap text-sm tracking-wide",
className,
)}
>
<div className="font-medium text-secondary-800">{name}: </div>
{children != null ? (
<span className="pl-2 font-bold">{children}</span>
) : (
<div className="h-5 w-48 animate-pulse bg-secondary-200" />
)}
</div>
);
};

const PrescriptionsTable = ({
items,
Expand Down Expand Up @@ -246,29 +271,3 @@ const PrescriptionEntry = ({ obj }: { obj: Prescription }) => {
</tr>
);
};

const PatientDetail = ({
name,
children,
className,
}: {
name: string;
children?: ReactNode;
className?: string;
}) => {
return (
<div
className={classNames(
"inline-flex items-center whitespace-nowrap text-sm tracking-wide",
className,
)}
>
<div className="font-medium text-secondary-800">{name}: </div>
{children != null ? (
<span className="pl-2 font-bold">{children}</span>
) : (
<div className="h-5 w-48 animate-pulse bg-secondary-200" />
)}
</div>
);
};

0 comments on commit 0593c33

Please sign in to comment.