Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolve page scroll resets in consultations tabs. #6825

Merged
merged 5 commits into from
Dec 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export const ConsultationABGTab = (props: ConsultationTabProps) => {
facilityId={props.facilityId}
patientId={props.patientId}
consultationId={props.consultationId}
></ABGPlots>
/>
</div>
);
};
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export const ConsultationDialysisTab = (props: ConsultationTabProps) => {
return (
<div>
<PageTitle title="Dialysis Plots" hideBack={true} breadcrumbs={false} />
<DialysisPlots consultationId={props.consultationId}></DialysisPlots>
<DialysisPlots consultationId={props.consultationId} />
</div>
);
};
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export const ConsultationNeurologicalMonitoringTab = (
facilityId={props.facilityId}
patientId={props.patientId}
consultationId={props.consultationId}
></NeurologicalTable>
/>
</div>
);
};
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export const ConsultationNursingTab = (props: ConsultationTabProps) => {
facilityId={props.facilityId}
patientId={props.patientId}
consultationId={props.consultationId}
></NursingPlot>
/>
</div>
);
};
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export const ConsultationNutritionTab = (props: ConsultationTabProps) => {
facilityId={props.facilityId}
patientId={props.patientId}
consultationId={props.consultationId}
></NutritionPlots>
/>
</div>
);
};
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export const ConsultationSummaryTab = (props: ConsultationTabProps) => {
facilityId={props.facilityId}
patientId={props.patientId}
consultationId={props.consultationId}
></PrimaryParametersPlot>
/>
</div>
);
};
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export const ConsultationVentilatorTab = (props: ConsultationTabProps) => {
facilityId={props.facilityId}
patientId={props.patientId}
consultationId={props.consultationId}
></VentilatorPlot>
/>
</div>
);
};
1 change: 0 additions & 1 deletion src/Components/Facility/ConsultationDetails/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,6 @@ export const ConsultationDetails = (props: any) => {
</div>
</div>
</div>

<SelectedTab {...consultationTabProps} />
</div>

Expand Down
2 changes: 1 addition & 1 deletion src/Components/Facility/Consultations/NursingPlot.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ export const NursingPlot = (props: any) => {
</div>
</div>

{totalCount > PAGINATION_LIMIT && (
{!areFieldsEmpty() && totalCount > PAGINATION_LIMIT && (
<div className="mt-4 flex w-full justify-center">
<Pagination
cPage={currentPage}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import ReportTable from "./Reports/ReportTable";
import { formatDateTime } from "../../../Utils/utils";
import { InvestigationSessionType } from "./investigationsTab";
import { lazy } from "react";

const Loading = lazy(() => import("../../Common/Loading"));

export default function ViewInvestigations(props: {
Expand All @@ -26,7 +27,9 @@ export default function ViewInvestigations(props: {
return (
<div className="mx-auto max-w-7xl">
{isLoading ? (
<Loading />
<div className="min-h-screen">
<Loading />
</div>
) : (
<div className="mt-4 space-y-2 ">
{investigations.length > 0 && (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,9 @@ const MedicineAdministrationSheet = ({ readonly, is_prn }: Props) => {
}
>
{loading ? (
<Loading />
<div className="min-h-screen">
<Loading />
</div>
) : (
<>
{prescriptions?.length === 0 && <NoPrescriptions prn={is_prn} />}
Expand Down
7 changes: 6 additions & 1 deletion src/Components/Patient/FileUpload.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,7 @@ export const FileUpload = (props: FileUploadProps) => {
setFacilityName("");
}
}

fetchPatientName();
}, [dispatch, patientId]);

Expand Down Expand Up @@ -898,7 +899,11 @@ export const FileUpload = (props: FileUploadProps) => {
};

if (isLoading) {
return <Loading />;
return (
<div className="min-h-screen">
<Loading />
</div>
);
}

const onFileChange = (e: ChangeEvent<HTMLInputElement>): any => {
Expand Down
Loading