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

Remove redundant "Add Consultation" button #9095

Merged
8 changes: 2 additions & 6 deletions src/components/Patient/PatientHome.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -243,11 +243,7 @@ export const PatientHome = (props: any) => {
};

const isPatientEligibleForNewConsultation = (patientData: PatientModel) => {
Srayash marked this conversation as resolved.
Show resolved Hide resolved
return patientData.is_active &&
(!patientData?.last_consultation ||
patientData?.last_consultation?.discharge_date)
? true
: false;
return patientData.is_active ? true : false;
};

return (
Expand Down Expand Up @@ -1066,7 +1062,7 @@ export const PatientHome = (props: any) => {
"w-full rounded-lg border",
isPatientEligibleForNewConsultation(patientData)
? "cursor-pointer border-green-700 hover:bg-primary-400"
: "border-secondary-700 text-secondary-700 hover:cursor-not-allowed",
: "hidden border-secondary-700 text-secondary-700 hover:cursor-not-allowed",
)}
onClick={() =>
isPatientEligibleForNewConsultation(patientData) &&
Expand Down
Loading