diff --git a/public/locale/en.json b/public/locale/en.json index 758ef1965db..1305ee92c98 100644 --- a/public/locale/en.json +++ b/public/locale/en.json @@ -1112,7 +1112,7 @@ "patient_consultation__treatment__summary__spo2": "SpO2", "patient_consultation__treatment__summary__temperature": "Temperature", "patient_created": "Patient Created", - "patient_details": "Patient Details", + "patient_details": "Details of Patient", "patient_details_incomplete": "Patient Details Incomplete", "patient_face": "Patient Face", "patient_name": "Patient name", diff --git a/src/components/Common/AuthorizedButton.tsx b/src/components/Common/AuthorizedButton.tsx index 2b611a0c9f2..944ff89532a 100644 --- a/src/components/Common/AuthorizedButton.tsx +++ b/src/components/Common/AuthorizedButton.tsx @@ -1,14 +1,18 @@ -import { Button, ButtonProps } from "@headlessui/react"; +import * as React from "react"; import AuthorizedChild from "@/CAREUI/misc/AuthorizedChild"; -import { AuthorizedElementProps } from "@/Utils/AuthorizeFor"; +import { Button, ButtonProps } from "@/components/ui/button"; -export const AuthorizedButton: React.FC< - AuthorizedElementProps & ButtonProps -> = ({ authorizeFor = () => true, ...props }) => { +import { AuthorizedElementProps, AuthorizedForCB } from "@/Utils/AuthorizeFor"; + +type AuthorizedButtonProps = Omit & { + authorizeFor: AuthorizedForCB; +} & ButtonProps; + +const AuthorizedButton: React.FC = (props) => { return ( - + {({ isAuthorized }) => (