Skip to content

Commit

Permalink
✨ Add archetype risk to drawer (#1522)
Browse files Browse the repository at this point in the history
  • Loading branch information
ibolton336 authored Nov 8, 2023
1 parent 6bea42c commit c66003e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions client/public/locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,7 @@
"reviewComments": "Review comments",
"risk": "Risk",
"riskFromApplication": "Application risk",
"riskFromArchetype": "Archetype risk",
"rootPath": "Root path",
"scheduled": "Scheduled",
"select": "Select",
Expand Down
1 change: 1 addition & 0 deletions client/src/app/api/models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -760,6 +760,7 @@ export interface Archetype {
assessments?: Ref[];
assessed?: boolean;
review?: Ref;
risk?: Risk;
}
export type ProviderType = "Java" | "Go";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import { PageDrawerContent } from "@app/components/PageDrawerContext";
import { dedupeArrayOfObjects } from "@app/utils/utils";
import { LabelsFromItems } from "@app/components/labels-from-items/labels-from-items";
import { ReviewFields } from "@app/pages/applications/components/application-detail-drawer/review-fields";
import { RiskLabel } from "@app/components/RiskLabel";

export interface IArchetypeDetailDrawerProps {
onCloseClick: () => void;
Expand Down Expand Up @@ -198,6 +199,14 @@ const ArchetypeDetailDrawer: React.FC<IArchetypeDetailDrawerProps> = ({
</DescriptionListDescription>
</DescriptionListGroup>
</DescriptionList>
<TextContent className={spacing.mtLg}>
<Title headingLevel="h3" size="md">
{t("terms.riskFromArchetype")}
</Title>
<Text component="small" cy-data="comments">
<RiskLabel risk={archetype?.risk || "unknown"} />
</Text>
</TextContent>
</Tab>
<Tab
eventKey={TabKey.Reviews}
Expand Down

0 comments on commit c66003e

Please sign in to comment.