Skip to content

Commit

Permalink
Rename prop to disableButtons
Browse files Browse the repository at this point in the history
  • Loading branch information
amjithtitus09 committed Feb 26, 2025
1 parent fee6116 commit 2c7121b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/components/Patient/EncounterQuestionnaire.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export default function EncounterQuestionnaire({
patient={encounter.patient}
encounter={encounter}
fetchPatientData={() => {}}
disabled={true}
disableButtons={true}
/>

<div className="flex flex-col justify-between gap-2 px-4 py-1 md:flex-row">
Expand Down
12 changes: 6 additions & 6 deletions src/components/Patient/PatientInfoCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,11 @@ export interface PatientInfoCardProps {
patient: Patient;
encounter: Encounter;
fetchPatientData?: (state: { aborted: boolean }) => void;
disabled?: boolean;
disableButtons?: boolean;
}

export default function PatientInfoCard(props: PatientInfoCardProps) {
const { patient, encounter, disabled = false } = props;
const { patient, encounter, disableButtons = false } = props;
const { t } = useTranslation();
const queryClient = useQueryClient();

Expand Down Expand Up @@ -325,7 +325,7 @@ export default function PatientInfoCard(props: PatientInfoCardProps) {
)
}

{!disabled ? (
{!disableButtons ? (
<LinkDepartmentsSheet
entityType="encounter"
entityId={encounter.id}
Expand Down Expand Up @@ -402,7 +402,7 @@ export default function PatientInfoCard(props: PatientInfoCardProps) {
<LocationTree
location={props.encounter.current_location}
/>
{!disabled && (
{!disableButtons && (
<>
<div className="border-b border-dashed border-gray-200 my-2" />
<Button
Expand Down Expand Up @@ -445,7 +445,7 @@ export default function PatientInfoCard(props: PatientInfoCardProps) {
id="consultation-buttons"
>
{!completedEncounterStatus.includes(encounter.status) &&
!disabled && (
!disableButtons && (
<div
className="flex w-full flex-col gap-3 lg:w-auto 2xl:flex-row"
data-cy="update-encounter-button"
Expand Down Expand Up @@ -528,7 +528,7 @@ export default function PatientInfoCard(props: PatientInfoCardProps) {
key={org.id}
className={cn(
"capitalize gap-1 py-1 px-2 hover:bg-secondary-100",
!disabled && "cursor-pointer ",
!disableButtons && "cursor-pointer ",
)}
variant="outline"
title={`Organization: ${org.name}${org.description ? ` - ${org.description}` : ""}`}
Expand Down

0 comments on commit 2c7121b

Please sign in to comment.