@@ -29,6 +29,7 @@ import {
2929 ToggleTip ,
3030} from '@sonarsource/echoes-react' ;
3131import { useIntl } from 'react-intl' ;
32+ import { isApplication } from '~shared/helpers/component' ;
3233import { getReportUrl } from '../../api/component-report' ;
3334import { getRegulatoryReportUrl } from '../../api/regulatory-report' ;
3435import { DocLink } from '../../helpers/doc-links' ;
@@ -131,24 +132,27 @@ export default function ComponentReportActionsRenderer(
131132 } ) }
132133 </ DropdownMenu . ItemButton >
133134
134- < DropdownMenu . Separator />
135-
136- < DropdownMenu . GroupLabel >
137- { intl . formatMessage ( { id : 'component_regulatory_report.report' } ) }
138- </ DropdownMenu . GroupLabel >
139- < DropdownMenu . ItemLinkDownload
140- download = { [ component . name , branch ?. name , 'regulatory report.zip' ]
141- . filter ( ( s ) => ! ! s )
142- . join ( ' - ' ) }
143- helpText = { intl . formatMessage ( {
144- id : 'component_regulatory_report.download.help_text' ,
145- } ) }
146- isDisabled = { ! branch ?. excludedFromPurge }
147- onClick = { handleDownloadStarted }
148- to = { regulatoryReportDownloadURL }
149- >
150- { intl . formatMessage ( { id : 'component_regulatory_report.download' } ) }
151- </ DropdownMenu . ItemLinkDownload >
135+ { ! isApplication ( component . qualifier ) && (
136+ < >
137+ < DropdownMenu . Separator />
138+ < DropdownMenu . GroupLabel >
139+ { intl . formatMessage ( { id : 'component_regulatory_report.report' } ) }
140+ </ DropdownMenu . GroupLabel >
141+ < DropdownMenu . ItemLinkDownload
142+ download = { [ component . name , branch ?. name , 'regulatory report.zip' ]
143+ . filter ( ( s ) => ! ! s )
144+ . join ( ' - ' ) }
145+ helpText = { intl . formatMessage ( {
146+ id : 'component_regulatory_report.download.help_text' ,
147+ } ) }
148+ isDisabled = { ! branch ?. excludedFromPurge }
149+ onClick = { handleDownloadStarted }
150+ to = { regulatoryReportDownloadURL }
151+ >
152+ { intl . formatMessage ( { id : 'component_regulatory_report.download' } ) }
153+ </ DropdownMenu . ItemLinkDownload >
154+ </ >
155+ ) }
152156 </ >
153157 }
154158 >
0 commit comments