Skip to content

Commit

Permalink
Change: Differentiate scan and audit report formats
Browse files Browse the repository at this point in the history
  • Loading branch information
a-h-abdelsalam committed Feb 12, 2025
1 parent 8e92446 commit 11e3616
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
1 change: 1 addition & 0 deletions public/locales/gsa-de.json
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,7 @@
"Container Task": "Container-Aufgabe",
"Content": "Inhalte",
"Content Type": "Inhaltstyp",
"Report Type": "Berichtstyp",
"Contents": "Hilfe Übersicht",
"Corresponding Performance": "Zugehörige Leistungsdaten",
"Corresponding Report": "Zugehöriger Bericht",
Expand Down
8 changes: 8 additions & 0 deletions src/web/pages/reportformats/details.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ const ReportFormatDetails = ({entity, links = true}) => {
deprecated,
extension,
content_type,
report_type,
trust = {},
summary,
description,
Expand Down Expand Up @@ -58,6 +59,13 @@ const ReportFormatDetails = ({entity, links = true}) => {
<TableData>{content_type}</TableData>
</TableRow>

{report_type && (
<TableRow>
<TableData>{_('Report Type')}</TableData>
<TableData>{report_type}</TableData>
</TableRow>
)}

<TableRow>
<TableData>{_('Trust')}</TableData>
<TableData>
Expand Down
7 changes: 6 additions & 1 deletion src/web/pages/reports/downloadreportdialog.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,11 @@ const DownloadReportDialog = ({
)
: [];

const filteredReportFormats = (reportFormats?.filter(format => audit
? ['audit', 'all'].includes(format?.report_type)
: ['scan', 'all'].includes(format?.report_type))
) || [];

return (
<>
<ComposerContent
Expand All @@ -105,7 +110,7 @@ const DownloadReportDialog = ({
<FormGroup title={_('Report Format')}>
<Select
grow="1"
items={renderSelectItems(reportFormats)}
items={renderSelectItems(filteredReportFormats)}
name="reportFormatId"
value={reportFormatIdInState}
width="auto"
Expand Down

0 comments on commit 11e3616

Please sign in to comment.