Skip to content

Commit

Permalink
remove unused import
Browse files Browse the repository at this point in the history
  • Loading branch information
Zeshanxviii committed Sep 6, 2024
1 parent 112a2b6 commit aa130f6
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 46 deletions.
40 changes: 3 additions & 37 deletions src/Components/Facility/Investigations/ShowInvestigation.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
import _, { set } from "lodash-es";
import { navigate } from "raviger";
import { lazy, ReactNode, useCallback, useReducer } from "react";
import { useTranslation } from "react-i18next";
import { lazy, useCallback, useReducer } from "react";
import routes from "../../../Redux/api";
import * as Notification from "../../../Utils/Notifications.js";
import request from "../../../Utils/request/request";
import useQuery from "../../../Utils/request/useQuery";
import InvestigationTable from "./InvestigationTable";
import PrintPreview from "../../../CAREUI/misc/PrintPreview";
import { classNames, formatDate, formatDateTime, formatName, patientAgeInYears } from "../../../Utils/utils";
import careConfig from "@careConfig";
const Loading = lazy(() => import("../../Common/Loading"));

const initialState = {
Expand Down Expand Up @@ -37,8 +34,7 @@ const updateFormReducer = (state = initialState, action: any) => {
};

export default function ShowInvestigation(props: any) {
const { t } = useTranslation();
const { consultationId, patientId, facilityId, sessionId } = props;
const { consultationId, patientId, sessionId } = props;

const [state, dispatch] = useReducer(updateFormReducer, initialState);
const { loading: investigationLoading } = useQuery(routes.getInvestigation, {
Expand Down Expand Up @@ -144,9 +140,7 @@ export default function ShowInvestigation(props: any) {
}

return (

<PrintPreview title={`Investigation Report for ${patientData?.name}`}
>
<PrintPreview title={`Investigation Report for ${patientData?.name}`}>
<InvestigationTable
title={`Investigation Report of :${patientData?.name}`}
data={state.initialValues}
Expand All @@ -157,33 +151,5 @@ export default function ShowInvestigation(props: any) {
handleSave={handleSubmit}
/>
</PrintPreview>

);
}

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>
);
};
18 changes: 9 additions & 9 deletions src/Components/Facility/TreatmentSummary.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,7 @@ export interface ITreatmentSummaryProps {
export default function TreatmentSummary({
consultationId,
patientId,
facilityId,
}: ITreatmentSummaryProps) {

const { t } = useTranslation();
const date = new Date();

Expand All @@ -48,13 +46,16 @@ export default function TreatmentSummary({
<div>
<PageHeadTitle title={t("treatment_summary__head_title")} />
<div className="my-4">
<PrintPreview title="Treatment Summary">
<PrintPreview title={t("treatment_summary__head_title")}>
<div id="section-to-print" className="mx-5">

<div className="mb-3 flex items-center justify-between p-4 ">
<h3>{consultationData?.facility_name}</h3>
<img className="h-10 w-auto" src={careConfig.mainLogo?.dark} alt="care logo" />
</div>
<div className="mb-3 flex items-center justify-between p-4">
<h3>{consultationData?.facility_name}</h3>
<img
className="h-10 w-auto"
src={careConfig.mainLogo?.dark}
alt="care logo"
/>
</div>
<h2 className="text-center text-lg">
{t("treatment_summary__heading")}
</h2>
Expand Down Expand Up @@ -516,4 +517,3 @@ function InstructionsSection({ consultationData }: IInstructionsSection) {
</>
);
}

0 comments on commit aa130f6

Please sign in to comment.