diff --git a/frontend/src/views/ComplianceReports/components/ReportDetails.jsx b/frontend/src/views/ComplianceReports/components/ReportDetails.jsx index a30e5b9db..02edbe97d 100644 --- a/frontend/src/views/ComplianceReports/components/ReportDetails.jsx +++ b/frontend/src/views/ComplianceReports/components/ReportDetails.jsx @@ -40,7 +40,7 @@ const ReportDetails = ({ currentStatus = 'Draft', isAnalystRole }) => { const navigate = useNavigate() const [isFileDialogOpen, setFileDialogOpen] = useState(false) - const showSupportingDocs = useMemo(() => { + const editSupportingDocs = useMemo(() => { return isAnalystRole && ( currentStatus === COMPLIANCE_REPORT_STATUSES.SUBMITTED || currentStatus === COMPLIANCE_REPORT_STATUSES.ASSESSED @@ -86,7 +86,7 @@ const ReportDetails = ({ currentStatus = 'Draft', isAnalystRole }) => { /> ), - condition: showSupportingDocs + condition: true }, { name: t('report:activityLists.supplyOfFuel'), @@ -230,7 +230,7 @@ const ReportDetails = ({ currentStatus = 'Draft', isAnalystRole }) => { {activityList.map((activity, index) => { const { data, error, isLoading } = activity.useFetch(complianceReportId) return ( - ((activity.name === t('report:supportingDocs') ? showSupportingDocs : (data && !isArrayEmpty(data)))) && ( + (data && !isArrayEmpty(data) || activity.name === t('report:supportingDocs')) && ( { component="div" > {activity.name}   - + { /> + + )}