diff --git a/src/components/Patient/PatientDetailsTab/Demography.tsx b/src/components/Patient/PatientDetailsTab/Demography.tsx index 2a412f03f9a..b9d2b8fece4 100644 --- a/src/components/Patient/PatientDetailsTab/Demography.tsx +++ b/src/components/Patient/PatientDetailsTab/Demography.tsx @@ -5,8 +5,9 @@ import { useTranslation } from "react-i18next"; import Chip from "@/CAREUI/display/Chip"; import CareIcon from "@/CAREUI/icons/CareIcon"; +import AuthorizedChild from "@/CAREUI/misc/AuthorizedChild"; -import ButtonV2 from "@/components/Common/ButtonV2"; +import { Button } from "@/components/ui/button"; import useAuthUser from "@/hooks/useAuthUser"; @@ -312,10 +313,9 @@ export const Demography = (props: PatientProps) => { {t("no_data_found")} )} - handleEditClick("insurance-details"), @@ -323,7 +323,7 @@ export const Demography = (props: PatientProps) => { > {t("add_insurance_details")} - + , ], }, @@ -373,21 +373,24 @@ export const Demography = (props: PatientProps) => {
- - navigate( - `/facility/${patientData?.facility}/patient/${id}/update`, - ), + + {({ isAuthorized }) => ( + )} - > - - {t("edit_profile")} - +
{/*
@@ -415,22 +418,19 @@ export const Demography = (props: PatientProps) => { className="group mt-4 rounded-md bg-white pb-2 pl-5 pt-5 shadow" >
-
+

{t(`patient__${subtab.id}`)}

{subtab.allowEdit && ( - + )}
diff --git a/src/components/Patient/PatientDetailsTab/HealthProfileSummary.tsx b/src/components/Patient/PatientDetailsTab/HealthProfileSummary.tsx index 3fb6b60d330..374d5ede08b 100644 --- a/src/components/Patient/PatientDetailsTab/HealthProfileSummary.tsx +++ b/src/components/Patient/PatientDetailsTab/HealthProfileSummary.tsx @@ -3,6 +3,8 @@ import { useTranslation } from "react-i18next"; import CareIcon from "@/CAREUI/icons/CareIcon"; +import { Button } from "@/components/ui/button"; + import { UserModel } from "@/components/Users/models"; import useAuthUser from "@/hooks/useAuthUser"; @@ -56,12 +58,12 @@ export const HealthProfileSummary = (props: PatientProps) => {

-
+
{t("medical")}
- +
diff --git a/src/components/Patient/PatientDetailsTab/ImmunisationRecords.tsx b/src/components/Patient/PatientDetailsTab/ImmunisationRecords.tsx index eb298737f3c..7ee828868fc 100644 --- a/src/components/Patient/PatientDetailsTab/ImmunisationRecords.tsx +++ b/src/components/Patient/PatientDetailsTab/ImmunisationRecords.tsx @@ -3,6 +3,8 @@ import { useTranslation } from "react-i18next"; import CareIcon from "@/CAREUI/icons/CareIcon"; +import { Button } from "@/components/ui/button"; + import { UserModel } from "@/components/Users/models"; import useAuthUser from "@/hooks/useAuthUser"; @@ -40,10 +42,10 @@ export const ImmunisationRecords = (props: PatientProps) => {

-
+

{t("covid_details")}

- +