Skip to content

Commit

Permalink
Resolved requested changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
shyamprakash123 committed Nov 3, 2023
1 parent 8d8a8a3 commit c4d8333
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 deletions.
13 changes: 5 additions & 8 deletions src/Components/Facility/ConsultationDetails/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -133,14 +133,11 @@ export const ConsultationDetails = (props: any) => {
bed: data?.current_bed?.bed_object?.id,
})
);
const isCameraAttachedRes =
assetRes.data.results.filter(
(asset: { asset_object: { meta: { asset_type: string } } }) => {
return asset?.asset_object?.meta?.asset_type === "CAMERA"
? true
: false;
}
).length >= 1;
const isCameraAttachedRes = assetRes.data.results.some(
(asset: { asset_object: { asset_class: string } }) => {
return asset?.asset_object?.asset_class === "ONVIF";
}
);
setIsCameraAttached(isCameraAttachedRes);
const id = res.data.patient;
const patientRes = await dispatch(getPatient({ id }));
Expand Down
4 changes: 1 addition & 3 deletions src/Components/Facility/Consultations/Feed.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,7 @@ export const Feed: React.FC<IFeedProps> = ({ consultationId, facilityId }) => {
...bedAssets.data,
results: bedAssets.data.results.filter(
(asset: { asset_object: { meta: { asset_type: string } } }) => {
return asset?.asset_object?.meta?.asset_type === "CAMERA"
? true
: false;
return asset?.asset_object?.meta?.asset_type === "CAMERA";
}
),
},
Expand Down

0 comments on commit c4d8333

Please sign in to comment.