Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 Refactoring to follow up PR #1573 comments #1578

Merged
merged 1 commit into from
Dec 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 3 additions & 17 deletions client/src/app/pages/reports/reports.tsx
Original file line number Diff line number Diff line change
@@ -1,20 +1,16 @@
import React, { useMemo } from "react";
import { useTranslation } from "react-i18next";
import {
Bullseye,
Card,
CardBody,
CardHeader,
CardTitle,
Flex,
FlexItem,
MenuToggle,
PageSection,
PageSectionVariants,
Select,
SelectOption,
Split,
SplitItem,
Stack,
StackItem,
Text,
Expand Down Expand Up @@ -220,19 +216,9 @@ export const Reports: React.FC = () => {
<StackItem>
<Card>
<CardHeader>
<CardTitle>
<Split style={{ marginTop: -3 }}>
<SplitItem>
<Bullseye>
<TextContent>
<Text component="h3">
{t("terms.identifiedRisks")}
</Text>
</TextContent>
</Bullseye>
</SplitItem>
</Split>
</CardTitle>
<TextContent>
<Text component="h3">{t("terms.identifiedRisks")}</Text>
</TextContent>
</CardHeader>
<CardBody>
<IdentifiedRisksTable />
Expand Down
24 changes: 13 additions & 11 deletions client/src/app/pages/review/review-page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -125,17 +125,19 @@ const ReviewPage: React.FC = () => {
<Text component="h3">{t("terms.assessmentSummary")}</Text>
</TextContent>
</CardHeader>
<AssessmentLandscape
questionnaire={null}
assessmentRefs={
application?.assessments || archetype?.assessments
}
/>
<IdentifiedRisksTable
assessmentRefs={
application?.assessments || archetype?.assessments
}
/>
<CardBody>
<AssessmentLandscape
questionnaire={null}
assessmentRefs={
application?.assessments || archetype?.assessments
}
/>
<IdentifiedRisksTable
assessmentRefs={
application?.assessments || archetype?.assessments
}
/>
</CardBody>
</Card>
</PageSection>
)}
Expand Down
4 changes: 1 addition & 3 deletions client/src/app/queries/assessments.ts
Original file line number Diff line number Diff line change
Expand Up @@ -231,9 +231,7 @@
),
].map((archetypeId) => ({
queryKey: ["archetype", archetypeId],
queryFn: () =>
archetypeId ? getArchetypeById(archetypeId) : undefined,
enabled: !!archetypeId,
queryFn: () => getArchetypeById(archetypeId),

Check warning on line 234 in client/src/app/queries/assessments.ts

View check run for this annotation

Codecov / codecov/patch

client/src/app/queries/assessments.ts#L234

Added line #L234 was not covered by tests
})) || [],
});

Expand Down
Loading