Skip to content

Commit

Permalink
hide update log button if discharged (#4464)
Browse files Browse the repository at this point in the history
  • Loading branch information
rithviknishad authored Jan 3, 2023
1 parent 6be8ff0 commit fb3f24e
Showing 1 changed file with 22 additions and 19 deletions.
41 changes: 22 additions & 19 deletions src/Components/Facility/Consultations/DailyRoundsList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -212,25 +212,28 @@ export const DailyRoundsList = (props: any) => {
<CareIcon className="care-l-eye text-lg" />
<span>View Details</span>
</ButtonV2>
<ButtonV2
variant="secondary"
border
ghost
onClick={() => {
if (itemData.rounds_type === "NORMAL") {
navigate(
`/facility/${facilityId}/patient/${patientId}/consultation/${consultationId}/daily-rounds/${itemData.id}/update`
);
} else {
navigate(
`/facility/${facilityId}/patient/${patientId}/consultation/${consultationId}/daily_rounds/${itemData.id}/update`
);
}
}}
>
<CareIcon className="care-l-pen text-lg" />
<span>Update Log</span>
</ButtonV2>
{!consultationData.discharge_reason && (
<ButtonV2
variant="secondary"
border
ghost
className="tooltip"
onClick={() => {
if (itemData.rounds_type === "NORMAL") {
navigate(
`/facility/${facilityId}/patient/${patientId}/consultation/${consultationId}/daily-rounds/${itemData.id}/update`
);
} else {
navigate(
`/facility/${facilityId}/patient/${patientId}/consultation/${consultationId}/daily_rounds/${itemData.id}/update`
);
}
}}
>
<CareIcon className="care-l-pen text-lg" />
<span>Update Log</span>
</ButtonV2>
)}
</div>
</div>
</div>
Expand Down

0 comments on commit fb3f24e

Please sign in to comment.