Skip to content

Commit

Permalink
Show camera feed button only for specific roles (#6540)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ashesh3 authored Nov 3, 2023
1 parent 5891df3 commit ac405ce
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions src/Components/Facility/ConsultationDetails/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -335,14 +335,17 @@ export const ConsultationDetails = (props: any) => {
>
Doctor Connect
</button>
{patientData.last_consultation?.id && (
<Link
href={`/facility/${patientData.facility}/patient/${patientData.id}/consultation/${patientData.last_consultation?.id}/feed`}
className="btn btn-primary m-1 w-full hover:text-white"
>
Camera Feed
</Link>
)}
{patientData.last_consultation?.id &&
["DistrictAdmin", "StateAdmin", "Doctor"].includes(
authUser.user_type
) && (
<Link
href={`/facility/${patientData.facility}/patient/${patientData.id}/consultation/${patientData.last_consultation?.id}/feed`}
className="btn btn-primary m-1 w-full hover:text-white"
>
Camera Feed
</Link>
)}
</>
)}
<Link
Expand Down

0 comments on commit ac405ce

Please sign in to comment.