diff --git a/apps/console/src/hooks/graph/FrameworkGraph.ts b/apps/console/src/hooks/graph/FrameworkGraph.ts index fed43088e..c384cd5cd 100644 --- a/apps/console/src/hooks/graph/FrameworkGraph.ts +++ b/apps/console/src/hooks/graph/FrameworkGraph.ts @@ -103,6 +103,9 @@ export const frameworkControlNodeQuery = graphql` name sectionTitle description + bestPractice + implemented + notImplementedJustification canUpdate: permission(action: "core:control:update") canDelete: permission(action: "core:control:delete") canCreateMeasureMapping: permission( diff --git a/apps/console/src/pages/organizations/frameworks/FrameworkControlPage.tsx b/apps/console/src/pages/organizations/frameworks/FrameworkControlPage.tsx index 186a73c5b..88021e882 100644 --- a/apps/console/src/pages/organizations/frameworks/FrameworkControlPage.tsx +++ b/apps/console/src/pages/organizations/frameworks/FrameworkControlPage.tsx @@ -3,7 +3,9 @@ import { promisifyMutation } from "@probo/helpers"; import { useTranslate } from "@probo/i18n"; import { ActionDropdown, + Badge, Button, + Card, DropdownItem, IconPencil, IconTrashCan, @@ -354,6 +356,28 @@ export default function FrameworkControlPage({ queryRef }: Props) { {control.description} )} + +
+
+ {__("Best Practice")} + + {control.bestPractice ? __("Yes") : __("No")} + +
+
+ {__("Implemented")} + + {control.implemented === "IMPLEMENTED" ? __("Implemented") : __("Not Implemented")} + +
+ {control.implemented === "NOT_IMPLEMENTED" && control.notImplementedJustification && ( +
+ {__("Justification for non-implementation")} +
{control.notImplementedJustification}
+
+ )} +
+
) => { if (frameworkControl) { - // Update the control await mutate({ variables: { input: { @@ -117,11 +123,12 @@ export function FrameworkControlDialog(props: Props) { description: data.description || null, sectionTitle: data.sectionTitle, bestPractice: data.bestPractice, + implemented: data.implemented, + notImplementedJustification: data.implemented === "IMPLEMENTED" ? null : (data.notImplementedJustification || null), }, }, }); } else { - // Create a new control await mutate({ variables: { input: { @@ -130,6 +137,8 @@ export function FrameworkControlDialog(props: Props) { description: data.description || null, sectionTitle: data.sectionTitle, bestPractice: data.bestPractice ?? true, + implemented: data.implemented ?? "IMPLEMENTED", + notImplementedJustification: data.implemented === "IMPLEMENTED" ? null : (data.notImplementedJustification || null), }, connections: [props.connectionId!], }, @@ -167,7 +176,7 @@ export function FrameworkControlDialog(props: Props) { id="title" required variant="title" - placeholder={__("Document title")} + placeholder={__("Control name")} {...register("name")} />