diff --git a/client/src/app/pages/reports/components/landscape/landscape.tsx b/client/src/app/pages/reports/components/landscape/landscape.tsx index d68fe80cf6..9714330057 100644 --- a/client/src/app/pages/reports/components/landscape/landscape.tsx +++ b/client/src/app/pages/reports/components/landscape/landscape.tsx @@ -7,7 +7,7 @@ import { ConditionalRender } from "@app/components/ConditionalRender"; import { StateError } from "@app/components/StateError"; import { RISK_LIST } from "@app/Constants"; -import { AssessmentRisk, Ref } from "@app/api/models"; +import { Assessment, AssessmentRisk } from "@app/api/models"; import { ApplicationSelectionContext } from "../../application-selection-context"; import { NoApplicationSelectedEmptyState } from "../no-application-selected-empty-state"; @@ -49,10 +49,10 @@ const extractLandscapeData = ( }; interface ILandscapeProps { - questionnaire?: Ref; + assessments: Assessment[]; } -export const Landscape: React.FC = ({ questionnaire }) => { +export const Landscape: React.FC = ({ assessments }) => { const { t } = useTranslation(); // Context diff --git a/client/src/app/pages/reports/reports.tsx b/client/src/app/pages/reports/reports.tsx index e3aaf83ccc..f0910f1a98 100644 --- a/client/src/app/pages/reports/reports.tsx +++ b/client/src/app/pages/reports/reports.tsx @@ -160,13 +160,14 @@ export const Reports: React.FC = () => { - questionnaire.name === selectedQuestionnaire + assessments={ + selectedQuestionnaire === "All questionnaires" + ? assessments + : assessments.filter( + (assessment) => + assessment.questionnaire.name === + selectedQuestionnaire ) - : undefined } />