diff --git a/src/Components/Assets/AssetManage.tsx b/src/Components/Assets/AssetManage.tsx index 23098bff22f..4f65bc6a569 100644 --- a/src/Components/Assets/AssetManage.tsx +++ b/src/Components/Assets/AssetManage.tsx @@ -432,20 +432,24 @@ const AssetManage = (props: AssetManageProps) => { {t("update")} - {asset?.asset_class && ( - - navigate( - `/facility/${asset?.location_object.facility.id}/assets/${asset?.id}/configure` - ) - } - id="configure-asset" - data-testid="asset-configure-button" - > - - {t("configure")} - - )} + {asset?.asset_class && + (asset?.asset_class !== "ONVIF" || + ["DistrictAdmin", "StateAdmin", "Doctor"].includes( + authUser.user_type + )) && ( + + navigate( + `/facility/${asset?.location_object.facility.id}/assets/${asset?.id}/configure` + ) + } + id="configure-asset" + data-testid="asset-configure-button" + > + + {t("configure")} + + )} {checkAuthority(authUser.user_type, "DistrictAdmin") && ( { {CONSULTATION_TABS.map((p: OptionsType) => { if (p.text === "FEED") { if ( - !consultationData?.current_bed?.bed_object?.id ?? - consultationData?.discharge_date !== null + consultationData?.discharge_date || // Discharged + !consultationData?.current_bed?.bed_object?.id || // Not admitted to bed + !["DistrictAdmin", "StateAdmin", "Doctor"].includes( + authUser.user_type + ) // Not admin or doctor ) - return null; + return null; // Hide feed tab } return (