Skip to content

Commit

Permalink
updated alignment , Closes #9416
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeffrin2005 committed Dec 14, 2024
1 parent c8963ad commit b5984d3
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/components/Patient/SampleDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ import { GENDER_TYPES, TEST_TYPE_CHOICES } from "@/common/constants";

import { DetailRoute } from "@/Routers/types";
import routes from "@/Utils/request/api";
import useTanStackQueryInstead from "@/Utils/request/useQuery";
import useQuery from "@/Utils/request/useQuery";
import { formatDateTime, formatPatientAge } from "@/Utils/utils";

export const SampleDetails = ({ id }: DetailRoute) => {
const { t } = useTranslation();
const { loading: isLoading, data: sampleDetails } = useTanStackQueryInstead(
const { loading: isLoading, data: sampleDetails } = useQuery(
routes.getTestSample,
{
pathParams: {
Expand Down Expand Up @@ -264,9 +264,9 @@ export const SampleDetails = ({ id }: DetailRoute) => {

const renderFlow = (flow: FlowModel) => {
return (
<Card key={flow.id}>
<div className="mr-3 p-4 text-black md:mr-8 grid grid-cols-1 gap-4 md:grid-cols-2">
<div>
<Card key={flow.id} className="p-4">
<div className="grid grid-cols-1 gap-4 md:grid-cols-2">
<div className="mb-2">
<span className="font-semibold leading-relaxed">
{t("status")}:{" "}
</span>{" "}
Expand Down Expand Up @@ -323,16 +323,16 @@ export const SampleDetails = ({ id }: DetailRoute) => {
<div className="text-sm text-muted-foreground">
{t("status")}:{" "}
</div>
<Badge variant="outline" className="font-semibold uppercase">
{t(`SAMPLE_TEST_HISTORY__${sampleDetails?.status}`)}
<Badge variant="outline" className="font-semibold">
{sampleDetails?.status}
</Badge>
</div>
<div className="space-y-1 sm:text-right flex gap-2 items-center ">
<div className="text-sm text-muted-foreground">
{t("result")}:{" "}
</div>
<Badge variant="secondary" className="font-semibold uppercase">
{t(`SAMPLE_TEST_RESULT__${sampleDetails?.result}`)}
<Badge variant="secondary" className="font-semibold">
{sampleDetails?.result}
</Badge>
</div>
</div>
Expand Down Expand Up @@ -540,7 +540,7 @@ export const SampleDetails = ({ id }: DetailRoute) => {
<h4 className="mt-8">{t("sample_test_history")}</h4>
{sampleDetails?.flow &&
sampleDetails.flow.map((flow: FlowModel) => (
<div key={flow.id} className="mb-2 py-2">
<div key={flow.id} className="mb-2">
{renderFlow(flow)}
</div>
))}
Expand Down

0 comments on commit b5984d3

Please sign in to comment.