Remove deprecated SOA code
Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @generated SignedSource<<35c2c66dca0c895c7abca2b0f4917a68>>
|
||||
* @generated SignedSource<<10bdb7f9b009009a66d93605d3d671c4>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
@@ -10,15 +10,12 @@
|
||||
|
||||
import { ConcreteRequest } from 'relay-runtime';
|
||||
import { FragmentRefs } from "relay-runtime";
|
||||
export type ControlStatus = "EXCLUDED" | "INCLUDED";
|
||||
export type CreateControlInput = {
|
||||
bestPractice: boolean;
|
||||
description?: string | null | undefined;
|
||||
exclusionJustification?: string | null | undefined;
|
||||
frameworkId: string;
|
||||
name: string;
|
||||
sectionTitle: string;
|
||||
status: ControlStatus;
|
||||
};
|
||||
export type FrameworkControlDialogCreateMutation$variables = {
|
||||
connections: ReadonlyArray<string>;
|
||||
@@ -169,20 +166,6 @@ return {
|
||||
"name": "sectionTitle",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "status",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "exclusionJustification",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
@@ -218,12 +201,12 @@ return {
|
||||
]
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "81df1f9c65937d3e387edffc6e9a28ac",
|
||||
"cacheID": "51536092f1e2e37d1499182357306138",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "FrameworkControlDialogCreateMutation",
|
||||
"operationKind": "mutation",
|
||||
"text": "mutation FrameworkControlDialogCreateMutation(\n $input: CreateControlInput!\n) {\n createControl(input: $input) {\n controlEdge {\n node {\n ...FrameworkControlDialogFragment\n id\n }\n }\n }\n}\n\nfragment FrameworkControlDialogFragment on Control {\n id\n name\n description\n sectionTitle\n status\n exclusionJustification\n bestPractice\n}\n"
|
||||
"text": "mutation FrameworkControlDialogCreateMutation(\n $input: CreateControlInput!\n) {\n createControl(input: $input) {\n controlEdge {\n node {\n ...FrameworkControlDialogFragment\n id\n }\n }\n }\n}\n\nfragment FrameworkControlDialogFragment on Control {\n id\n name\n description\n sectionTitle\n bestPractice\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @generated SignedSource<<3a62e5f931a990d83caca02ab629b0c0>>
|
||||
* @generated SignedSource<<43181b3f35ce7df5f54b19bf82eeaad0>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
@@ -9,16 +9,13 @@
|
||||
// @ts-nocheck
|
||||
|
||||
import { ReaderFragment } from 'relay-runtime';
|
||||
export type ControlStatus = "EXCLUDED" | "INCLUDED";
|
||||
import { FragmentRefs } from "relay-runtime";
|
||||
export type FrameworkControlDialogFragment$data = {
|
||||
readonly bestPractice: boolean;
|
||||
readonly description: string | null | undefined;
|
||||
readonly exclusionJustification: string | null | undefined;
|
||||
readonly id: string;
|
||||
readonly name: string;
|
||||
readonly sectionTitle: string;
|
||||
readonly status: ControlStatus;
|
||||
readonly " $fragmentType": "FrameworkControlDialogFragment";
|
||||
};
|
||||
export type FrameworkControlDialogFragment$key = {
|
||||
@@ -60,20 +57,6 @@ const node: ReaderFragment = {
|
||||
"name": "sectionTitle",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "status",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "exclusionJustification",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
@@ -86,6 +69,6 @@ const node: ReaderFragment = {
|
||||
"abstractKey": null
|
||||
};
|
||||
|
||||
(node as any).hash = "481f75ce8c525c1fa12517ef173ad868";
|
||||
(node as any).hash = "3ca9ebd60cc24f1080a594bf4ca0b928";
|
||||
|
||||
export default node;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @generated SignedSource<<7ee3c72e16fa86d6c006c004e4f93c95>>
|
||||
* @generated SignedSource<<791e18651a3911865d78b730f268f489>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
@@ -10,15 +10,12 @@
|
||||
|
||||
import { ConcreteRequest } from 'relay-runtime';
|
||||
import { FragmentRefs } from "relay-runtime";
|
||||
export type ControlStatus = "EXCLUDED" | "INCLUDED";
|
||||
export type UpdateControlInput = {
|
||||
bestPractice?: boolean | null | undefined;
|
||||
description?: string | null | undefined;
|
||||
exclusionJustification?: string | null | undefined;
|
||||
id: string;
|
||||
name?: string | null | undefined;
|
||||
sectionTitle?: string | null | undefined;
|
||||
status?: ControlStatus | null | undefined;
|
||||
};
|
||||
export type FrameworkControlDialogUpdateMutation$variables = {
|
||||
input: UpdateControlInput;
|
||||
@@ -138,20 +135,6 @@ return {
|
||||
"name": "sectionTitle",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "status",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "exclusionJustification",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
@@ -168,12 +151,12 @@ return {
|
||||
]
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "374c69b33dd6e94dec75829fe0777f58",
|
||||
"cacheID": "a44a5055f8167fa3754f4f389cee598f",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "FrameworkControlDialogUpdateMutation",
|
||||
"operationKind": "mutation",
|
||||
"text": "mutation FrameworkControlDialogUpdateMutation(\n $input: UpdateControlInput!\n) {\n updateControl(input: $input) {\n control {\n ...FrameworkControlDialogFragment\n id\n }\n }\n}\n\nfragment FrameworkControlDialogFragment on Control {\n id\n name\n description\n sectionTitle\n status\n exclusionJustification\n bestPractice\n}\n"
|
||||
"text": "mutation FrameworkControlDialogUpdateMutation(\n $input: UpdateControlInput!\n) {\n updateControl(input: $input) {\n control {\n ...FrameworkControlDialogFragment\n id\n }\n }\n}\n\nfragment FrameworkControlDialogFragment on Control {\n id\n name\n description\n sectionTitle\n bestPractice\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @generated SignedSource<<3db987ede3a3aa1dfa570e76a00ef224>>
|
||||
* @generated SignedSource<<b78ad7244ad348d2622288743eff7a9b>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
@@ -9,24 +9,20 @@
|
||||
// @ts-nocheck
|
||||
|
||||
import { ReaderFragment } from 'relay-runtime';
|
||||
export type ControlStatus = "EXCLUDED" | "INCLUDED";
|
||||
import { FragmentRefs } from "relay-runtime";
|
||||
export type FrameworkDetailPageFragment$data = {
|
||||
readonly canCreateControl: boolean;
|
||||
readonly canDelete: boolean;
|
||||
readonly canExport: boolean;
|
||||
readonly canGenerateSOA: boolean;
|
||||
readonly canUpdate: boolean;
|
||||
readonly controls: {
|
||||
readonly __id: string;
|
||||
readonly edges: ReadonlyArray<{
|
||||
readonly node: {
|
||||
readonly bestPractice: boolean;
|
||||
readonly exclusionJustification: string | null | undefined;
|
||||
readonly id: string;
|
||||
readonly name: string;
|
||||
readonly sectionTitle: string;
|
||||
readonly status: ControlStatus;
|
||||
};
|
||||
}>;
|
||||
};
|
||||
@@ -141,19 +137,6 @@ return {
|
||||
"name": "permission",
|
||||
"storageKey": "permission(action:\"core:control:create\")"
|
||||
},
|
||||
{
|
||||
"alias": "canGenerateSOA",
|
||||
"args": [
|
||||
{
|
||||
"kind": "Literal",
|
||||
"name": "action",
|
||||
"value": "core:framework:generate-state-of-applicability"
|
||||
}
|
||||
],
|
||||
"kind": "ScalarField",
|
||||
"name": "permission",
|
||||
"storageKey": "permission(action:\"core:framework:generate-state-of-applicability\")"
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
@@ -213,20 +196,6 @@ return {
|
||||
"storageKey": null
|
||||
},
|
||||
(v1/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "status",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "exclusionJustification",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
@@ -261,6 +230,6 @@ return {
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "a3eb8b9d80c69d7faa83eae88e3b986b";
|
||||
(node as any).hash = "f6eba8f00d1e491f79bc201851b8c69d";
|
||||
|
||||
export default node;
|
||||
|
||||
@@ -1,95 +0,0 @@
|
||||
/**
|
||||
* @generated SignedSource<<b7c54e98eb3ba12bf4619530b45fdbab>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
// @ts-nocheck
|
||||
|
||||
import { ConcreteRequest } from 'relay-runtime';
|
||||
export type FrameworkDetailPageGenerateFrameworkStateOfApplicabilityMutation$variables = {
|
||||
frameworkId: string;
|
||||
};
|
||||
export type FrameworkDetailPageGenerateFrameworkStateOfApplicabilityMutation$data = {
|
||||
readonly generateFrameworkStateOfApplicability: {
|
||||
readonly data: string;
|
||||
};
|
||||
};
|
||||
export type FrameworkDetailPageGenerateFrameworkStateOfApplicabilityMutation = {
|
||||
response: FrameworkDetailPageGenerateFrameworkStateOfApplicabilityMutation$data;
|
||||
variables: FrameworkDetailPageGenerateFrameworkStateOfApplicabilityMutation$variables;
|
||||
};
|
||||
|
||||
const node: ConcreteRequest = (function(){
|
||||
var v0 = [
|
||||
{
|
||||
"defaultValue": null,
|
||||
"kind": "LocalArgument",
|
||||
"name": "frameworkId"
|
||||
}
|
||||
],
|
||||
v1 = [
|
||||
{
|
||||
"alias": null,
|
||||
"args": [
|
||||
{
|
||||
"fields": [
|
||||
{
|
||||
"kind": "Variable",
|
||||
"name": "frameworkId",
|
||||
"variableName": "frameworkId"
|
||||
}
|
||||
],
|
||||
"kind": "ObjectValue",
|
||||
"name": "input"
|
||||
}
|
||||
],
|
||||
"concreteType": "GenerateFrameworkStateOfApplicabilityPayload",
|
||||
"kind": "LinkedField",
|
||||
"name": "generateFrameworkStateOfApplicability",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "data",
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
];
|
||||
return {
|
||||
"fragment": {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "FrameworkDetailPageGenerateFrameworkStateOfApplicabilityMutation",
|
||||
"selections": (v1/*: any*/),
|
||||
"type": "Mutation",
|
||||
"abstractKey": null
|
||||
},
|
||||
"kind": "Request",
|
||||
"operation": {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Operation",
|
||||
"name": "FrameworkDetailPageGenerateFrameworkStateOfApplicabilityMutation",
|
||||
"selections": (v1/*: any*/)
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "80185d474f3a9c5d20f97a387b219511",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "FrameworkDetailPageGenerateFrameworkStateOfApplicabilityMutation",
|
||||
"operationKind": "mutation",
|
||||
"text": "mutation FrameworkDetailPageGenerateFrameworkStateOfApplicabilityMutation(\n $frameworkId: ID!\n) {\n generateFrameworkStateOfApplicability(input: {frameworkId: $frameworkId}) {\n data\n }\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "eac70164d676cb8e19d7fe7f06b2b817";
|
||||
|
||||
export default node;
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @generated SignedSource<<0c1816374b8fe7e0c0c79e9013aeb2b4>>
|
||||
* @generated SignedSource<<72da3c2c267ec4fd2da7aee87f38c51b>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
@@ -10,7 +10,6 @@
|
||||
|
||||
import { ConcreteRequest } from 'relay-runtime';
|
||||
import { FragmentRefs } from "relay-runtime";
|
||||
export type ControlStatus = "EXCLUDED" | "INCLUDED";
|
||||
export type FrameworkGraphControlNodeQuery$variables = {
|
||||
controlId: string;
|
||||
};
|
||||
@@ -47,7 +46,6 @@ export type FrameworkGraphControlNodeQuery$data = {
|
||||
};
|
||||
}>;
|
||||
};
|
||||
readonly exclusionJustification?: string | null | undefined;
|
||||
readonly id?: string;
|
||||
readonly measures?: {
|
||||
readonly __id: string;
|
||||
@@ -78,7 +76,6 @@ export type FrameworkGraphControlNodeQuery$data = {
|
||||
};
|
||||
}>;
|
||||
};
|
||||
readonly status?: ControlStatus;
|
||||
readonly " $fragmentSpreads": FragmentRefs<"FrameworkControlDialogFragment">;
|
||||
};
|
||||
};
|
||||
@@ -131,20 +128,6 @@ v5 = {
|
||||
"storageKey": null
|
||||
},
|
||||
v6 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "status",
|
||||
"storageKey": null
|
||||
},
|
||||
v7 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "exclusionJustification",
|
||||
"storageKey": null
|
||||
},
|
||||
v8 = {
|
||||
"alias": "canUpdate",
|
||||
"args": [
|
||||
{
|
||||
@@ -157,7 +140,7 @@ v8 = {
|
||||
"name": "permission",
|
||||
"storageKey": "permission(action:\"core:control:update\")"
|
||||
},
|
||||
v9 = {
|
||||
v7 = {
|
||||
"alias": "canDelete",
|
||||
"args": [
|
||||
{
|
||||
@@ -170,7 +153,7 @@ v9 = {
|
||||
"name": "permission",
|
||||
"storageKey": "permission(action:\"core:control:delete\")"
|
||||
},
|
||||
v10 = {
|
||||
v8 = {
|
||||
"alias": "canCreateMeasureMapping",
|
||||
"args": [
|
||||
{
|
||||
@@ -183,7 +166,7 @@ v10 = {
|
||||
"name": "permission",
|
||||
"storageKey": "permission(action:\"core:control:create-measure-mapping\")"
|
||||
},
|
||||
v11 = {
|
||||
v9 = {
|
||||
"alias": "canDeleteMeasureMapping",
|
||||
"args": [
|
||||
{
|
||||
@@ -196,7 +179,7 @@ v11 = {
|
||||
"name": "permission",
|
||||
"storageKey": "permission(action:\"core:control:delete-measure-mapping\")"
|
||||
},
|
||||
v12 = {
|
||||
v10 = {
|
||||
"alias": "canCreateDocumentMapping",
|
||||
"args": [
|
||||
{
|
||||
@@ -209,7 +192,7 @@ v12 = {
|
||||
"name": "permission",
|
||||
"storageKey": "permission(action:\"core:control:create-document-mapping\")"
|
||||
},
|
||||
v13 = {
|
||||
v11 = {
|
||||
"alias": "canDeleteDocumentMapping",
|
||||
"args": [
|
||||
{
|
||||
@@ -222,7 +205,7 @@ v13 = {
|
||||
"name": "permission",
|
||||
"storageKey": "permission(action:\"core:control:delete-document-mapping\")"
|
||||
},
|
||||
v14 = {
|
||||
v12 = {
|
||||
"alias": "canCreateAuditMapping",
|
||||
"args": [
|
||||
{
|
||||
@@ -235,7 +218,7 @@ v14 = {
|
||||
"name": "permission",
|
||||
"storageKey": "permission(action:\"core:control:create-audit-mapping\")"
|
||||
},
|
||||
v15 = {
|
||||
v13 = {
|
||||
"alias": "canDeleteAuditMapping",
|
||||
"args": [
|
||||
{
|
||||
@@ -248,7 +231,7 @@ v15 = {
|
||||
"name": "permission",
|
||||
"storageKey": "permission(action:\"core:control:delete-audit-mapping\")"
|
||||
},
|
||||
v16 = {
|
||||
v14 = {
|
||||
"alias": "canCreateSnapshotMapping",
|
||||
"args": [
|
||||
{
|
||||
@@ -261,7 +244,7 @@ v16 = {
|
||||
"name": "permission",
|
||||
"storageKey": "permission(action:\"core:control:create-snapshot-mapping\")"
|
||||
},
|
||||
v17 = {
|
||||
v15 = {
|
||||
"alias": "canDeleteSnapshotMapping",
|
||||
"args": [
|
||||
{
|
||||
@@ -274,7 +257,7 @@ v17 = {
|
||||
"name": "permission",
|
||||
"storageKey": "permission(action:\"core:control:delete-snapshot-mapping\")"
|
||||
},
|
||||
v18 = {
|
||||
v16 = {
|
||||
"alias": "canCreateObligationMapping",
|
||||
"args": [
|
||||
{
|
||||
@@ -287,7 +270,7 @@ v18 = {
|
||||
"name": "permission",
|
||||
"storageKey": "permission(action:\"core:control:create-obligation-mapping\")"
|
||||
},
|
||||
v19 = {
|
||||
v17 = {
|
||||
"alias": "canDeleteObligationMapping",
|
||||
"args": [
|
||||
{
|
||||
@@ -300,21 +283,21 @@ v19 = {
|
||||
"name": "permission",
|
||||
"storageKey": "permission(action:\"core:control:delete-obligation-mapping\")"
|
||||
},
|
||||
v20 = {
|
||||
v18 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "__typename",
|
||||
"storageKey": null
|
||||
},
|
||||
v21 = {
|
||||
v19 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "cursor",
|
||||
"storageKey": null
|
||||
},
|
||||
v22 = {
|
||||
v20 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "PageInfo",
|
||||
@@ -339,7 +322,7 @@ v22 = {
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
v23 = {
|
||||
v21 = {
|
||||
"kind": "ClientExtension",
|
||||
"selections": [
|
||||
{
|
||||
@@ -351,26 +334,33 @@ v23 = {
|
||||
}
|
||||
]
|
||||
},
|
||||
v24 = [
|
||||
v22 = [
|
||||
{
|
||||
"kind": "Literal",
|
||||
"name": "first",
|
||||
"value": 100
|
||||
}
|
||||
],
|
||||
v25 = {
|
||||
v23 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "state",
|
||||
"storageKey": null
|
||||
},
|
||||
v26 = {
|
||||
v24 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "createdAt",
|
||||
"storageKey": null
|
||||
},
|
||||
v25 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "status",
|
||||
"storageKey": null
|
||||
};
|
||||
return {
|
||||
"fragment": {
|
||||
@@ -406,8 +396,6 @@ return {
|
||||
(v15/*: any*/),
|
||||
(v16/*: any*/),
|
||||
(v17/*: any*/),
|
||||
(v18/*: any*/),
|
||||
(v19/*: any*/),
|
||||
{
|
||||
"args": null,
|
||||
"kind": "FragmentSpread",
|
||||
@@ -443,16 +431,16 @@ return {
|
||||
"kind": "FragmentSpread",
|
||||
"name": "LinkedMeasuresCardFragment"
|
||||
},
|
||||
(v20/*: any*/)
|
||||
(v18/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
(v21/*: any*/)
|
||||
(v19/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
(v22/*: any*/),
|
||||
(v23/*: any*/)
|
||||
(v20/*: any*/),
|
||||
(v21/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
@@ -486,16 +474,16 @@ return {
|
||||
"kind": "FragmentSpread",
|
||||
"name": "LinkedDocumentsCardFragment"
|
||||
},
|
||||
(v20/*: any*/)
|
||||
(v18/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
(v21/*: any*/)
|
||||
(v19/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
(v22/*: any*/),
|
||||
(v23/*: any*/)
|
||||
(v20/*: any*/),
|
||||
(v21/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
@@ -529,16 +517,16 @@ return {
|
||||
"kind": "FragmentSpread",
|
||||
"name": "LinkedAuditsCardFragment"
|
||||
},
|
||||
(v20/*: any*/)
|
||||
(v18/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
(v21/*: any*/)
|
||||
(v19/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
(v22/*: any*/),
|
||||
(v23/*: any*/)
|
||||
(v20/*: any*/),
|
||||
(v21/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
@@ -572,16 +560,16 @@ return {
|
||||
"kind": "FragmentSpread",
|
||||
"name": "LinkedObligationsCardFragment"
|
||||
},
|
||||
(v20/*: any*/)
|
||||
(v18/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
(v21/*: any*/)
|
||||
(v19/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
(v22/*: any*/),
|
||||
(v23/*: any*/)
|
||||
(v20/*: any*/),
|
||||
(v21/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
@@ -615,16 +603,16 @@ return {
|
||||
"kind": "FragmentSpread",
|
||||
"name": "LinkedSnapshotsCardFragment"
|
||||
},
|
||||
(v20/*: any*/)
|
||||
(v18/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
(v21/*: any*/)
|
||||
(v19/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
(v22/*: any*/),
|
||||
(v23/*: any*/)
|
||||
(v20/*: any*/),
|
||||
(v21/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
@@ -653,7 +641,7 @@ return {
|
||||
"name": "node",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v20/*: any*/),
|
||||
(v18/*: any*/),
|
||||
(v2/*: any*/),
|
||||
{
|
||||
"kind": "InlineFragment",
|
||||
@@ -673,8 +661,6 @@ return {
|
||||
(v15/*: any*/),
|
||||
(v16/*: any*/),
|
||||
(v17/*: any*/),
|
||||
(v18/*: any*/),
|
||||
(v19/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
@@ -684,7 +670,7 @@ return {
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v24/*: any*/),
|
||||
"args": (v22/*: any*/),
|
||||
"concreteType": "MeasureConnection",
|
||||
"kind": "LinkedField",
|
||||
"name": "measures",
|
||||
@@ -708,23 +694,23 @@ return {
|
||||
"selections": [
|
||||
(v2/*: any*/),
|
||||
(v3/*: any*/),
|
||||
(v25/*: any*/),
|
||||
(v20/*: any*/)
|
||||
(v23/*: any*/),
|
||||
(v18/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
(v21/*: any*/)
|
||||
(v19/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
(v22/*: any*/),
|
||||
(v23/*: any*/)
|
||||
(v20/*: any*/),
|
||||
(v21/*: any*/)
|
||||
],
|
||||
"storageKey": "measures(first:100)"
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v24/*: any*/),
|
||||
"args": (v22/*: any*/),
|
||||
"filters": null,
|
||||
"handle": "connection",
|
||||
"key": "FrameworkGraphControl_measures",
|
||||
@@ -733,7 +719,7 @@ return {
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v24/*: any*/),
|
||||
"args": (v22/*: any*/),
|
||||
"concreteType": "DocumentConnection",
|
||||
"kind": "LinkedField",
|
||||
"name": "documents",
|
||||
@@ -763,7 +749,7 @@ return {
|
||||
"name": "title",
|
||||
"storageKey": null
|
||||
},
|
||||
(v26/*: any*/),
|
||||
(v24/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
@@ -802,7 +788,7 @@ return {
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v2/*: any*/),
|
||||
(v6/*: any*/)
|
||||
(v25/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
@@ -812,22 +798,22 @@ return {
|
||||
],
|
||||
"storageKey": "versions(first:1)"
|
||||
},
|
||||
(v20/*: any*/)
|
||||
(v18/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
(v21/*: any*/)
|
||||
(v19/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
(v22/*: any*/),
|
||||
(v23/*: any*/)
|
||||
(v20/*: any*/),
|
||||
(v21/*: any*/)
|
||||
],
|
||||
"storageKey": "documents(first:100)"
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v24/*: any*/),
|
||||
"args": (v22/*: any*/),
|
||||
"filters": null,
|
||||
"handle": "connection",
|
||||
"key": "FrameworkGraphControl_documents",
|
||||
@@ -836,7 +822,7 @@ return {
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v24/*: any*/),
|
||||
"args": (v22/*: any*/),
|
||||
"concreteType": "AuditConnection",
|
||||
"kind": "LinkedField",
|
||||
"name": "audits",
|
||||
@@ -860,8 +846,8 @@ return {
|
||||
"selections": [
|
||||
(v2/*: any*/),
|
||||
(v3/*: any*/),
|
||||
(v26/*: any*/),
|
||||
(v25/*: any*/),
|
||||
(v24/*: any*/),
|
||||
(v23/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
@@ -889,22 +875,22 @@ return {
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
(v20/*: any*/)
|
||||
(v18/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
(v21/*: any*/)
|
||||
(v19/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
(v22/*: any*/),
|
||||
(v23/*: any*/)
|
||||
(v20/*: any*/),
|
||||
(v21/*: any*/)
|
||||
],
|
||||
"storageKey": "audits(first:100)"
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v24/*: any*/),
|
||||
"args": (v22/*: any*/),
|
||||
"filters": null,
|
||||
"handle": "connection",
|
||||
"key": "FrameworkGraphControl_audits",
|
||||
@@ -913,7 +899,7 @@ return {
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v24/*: any*/),
|
||||
"args": (v22/*: any*/),
|
||||
"concreteType": "ObligationConnection",
|
||||
"kind": "LinkedField",
|
||||
"name": "obligations",
|
||||
@@ -957,7 +943,7 @@ return {
|
||||
"name": "source",
|
||||
"storageKey": null
|
||||
},
|
||||
(v6/*: any*/),
|
||||
(v25/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
@@ -977,22 +963,22 @@ return {
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
(v20/*: any*/)
|
||||
(v18/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
(v21/*: any*/)
|
||||
(v19/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
(v22/*: any*/),
|
||||
(v23/*: any*/)
|
||||
(v20/*: any*/),
|
||||
(v21/*: any*/)
|
||||
],
|
||||
"storageKey": "obligations(first:100)"
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v24/*: any*/),
|
||||
"args": (v22/*: any*/),
|
||||
"filters": null,
|
||||
"handle": "connection",
|
||||
"key": "FrameworkGraphControl_obligations",
|
||||
@@ -1001,7 +987,7 @@ return {
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v24/*: any*/),
|
||||
"args": (v22/*: any*/),
|
||||
"concreteType": "SnapshotConnection",
|
||||
"kind": "LinkedField",
|
||||
"name": "snapshots",
|
||||
@@ -1033,23 +1019,23 @@ return {
|
||||
"name": "type",
|
||||
"storageKey": null
|
||||
},
|
||||
(v26/*: any*/),
|
||||
(v20/*: any*/)
|
||||
(v24/*: any*/),
|
||||
(v18/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
(v21/*: any*/)
|
||||
(v19/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
(v22/*: any*/),
|
||||
(v23/*: any*/)
|
||||
(v20/*: any*/),
|
||||
(v21/*: any*/)
|
||||
],
|
||||
"storageKey": "snapshots(first:100)"
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v24/*: any*/),
|
||||
"args": (v22/*: any*/),
|
||||
"filters": null,
|
||||
"handle": "connection",
|
||||
"key": "FrameworkGraphControl_snapshots",
|
||||
@@ -1066,7 +1052,7 @@ return {
|
||||
]
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "759f31a603a2a7d2b2ad1bfcbe1f24bd",
|
||||
"cacheID": "d177e11d82fa12c1622578238707b173",
|
||||
"id": null,
|
||||
"metadata": {
|
||||
"connection": [
|
||||
@@ -1119,11 +1105,11 @@ return {
|
||||
},
|
||||
"name": "FrameworkGraphControlNodeQuery",
|
||||
"operationKind": "query",
|
||||
"text": "query FrameworkGraphControlNodeQuery(\n $controlId: ID!\n) {\n node(id: $controlId) {\n __typename\n ... on Control {\n id\n name\n sectionTitle\n description\n status\n exclusionJustification\n canUpdate: permission(action: \"core:control:update\")\n canDelete: permission(action: \"core:control:delete\")\n canCreateMeasureMapping: permission(action: \"core:control:create-measure-mapping\")\n canDeleteMeasureMapping: permission(action: \"core:control:delete-measure-mapping\")\n canCreateDocumentMapping: permission(action: \"core:control:create-document-mapping\")\n canDeleteDocumentMapping: permission(action: \"core:control:delete-document-mapping\")\n canCreateAuditMapping: permission(action: \"core:control:create-audit-mapping\")\n canDeleteAuditMapping: permission(action: \"core:control:delete-audit-mapping\")\n canCreateSnapshotMapping: permission(action: \"core:control:create-snapshot-mapping\")\n canDeleteSnapshotMapping: permission(action: \"core:control:delete-snapshot-mapping\")\n canCreateObligationMapping: permission(action: \"core:control:create-obligation-mapping\")\n canDeleteObligationMapping: permission(action: \"core:control:delete-obligation-mapping\")\n ...FrameworkControlDialogFragment\n measures(first: 100) {\n edges {\n node {\n id\n ...LinkedMeasuresCardFragment\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n }\n }\n documents(first: 100) {\n edges {\n node {\n id\n ...LinkedDocumentsCardFragment\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n }\n }\n audits(first: 100) {\n edges {\n node {\n id\n ...LinkedAuditsCardFragment\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n }\n }\n obligations(first: 100) {\n edges {\n node {\n id\n ...LinkedObligationsCardFragment\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n }\n }\n snapshots(first: 100) {\n edges {\n node {\n id\n ...LinkedSnapshotsCardFragment\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n }\n }\n }\n id\n }\n}\n\nfragment FrameworkControlDialogFragment on Control {\n id\n name\n description\n sectionTitle\n status\n exclusionJustification\n bestPractice\n}\n\nfragment LinkedAuditsCardFragment on Audit {\n id\n name\n createdAt\n state\n validFrom\n validUntil\n framework {\n id\n name\n }\n}\n\nfragment LinkedDocumentsCardFragment on Document {\n id\n title\n createdAt\n documentType\n versions(first: 1) {\n edges {\n node {\n id\n status\n }\n }\n }\n}\n\nfragment LinkedMeasuresCardFragment on Measure {\n id\n name\n state\n}\n\nfragment LinkedObligationsCardFragment on Obligation {\n id\n requirement\n area\n source\n status\n owner {\n fullName\n id\n }\n}\n\nfragment LinkedSnapshotsCardFragment on Snapshot {\n id\n name\n description\n type\n createdAt\n}\n"
|
||||
"text": "query FrameworkGraphControlNodeQuery(\n $controlId: ID!\n) {\n node(id: $controlId) {\n __typename\n ... on Control {\n id\n name\n sectionTitle\n description\n canUpdate: permission(action: \"core:control:update\")\n canDelete: permission(action: \"core:control:delete\")\n canCreateMeasureMapping: permission(action: \"core:control:create-measure-mapping\")\n canDeleteMeasureMapping: permission(action: \"core:control:delete-measure-mapping\")\n canCreateDocumentMapping: permission(action: \"core:control:create-document-mapping\")\n canDeleteDocumentMapping: permission(action: \"core:control:delete-document-mapping\")\n canCreateAuditMapping: permission(action: \"core:control:create-audit-mapping\")\n canDeleteAuditMapping: permission(action: \"core:control:delete-audit-mapping\")\n canCreateSnapshotMapping: permission(action: \"core:control:create-snapshot-mapping\")\n canDeleteSnapshotMapping: permission(action: \"core:control:delete-snapshot-mapping\")\n canCreateObligationMapping: permission(action: \"core:control:create-obligation-mapping\")\n canDeleteObligationMapping: permission(action: \"core:control:delete-obligation-mapping\")\n ...FrameworkControlDialogFragment\n measures(first: 100) {\n edges {\n node {\n id\n ...LinkedMeasuresCardFragment\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n }\n }\n documents(first: 100) {\n edges {\n node {\n id\n ...LinkedDocumentsCardFragment\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n }\n }\n audits(first: 100) {\n edges {\n node {\n id\n ...LinkedAuditsCardFragment\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n }\n }\n obligations(first: 100) {\n edges {\n node {\n id\n ...LinkedObligationsCardFragment\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n }\n }\n snapshots(first: 100) {\n edges {\n node {\n id\n ...LinkedSnapshotsCardFragment\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n }\n }\n }\n id\n }\n}\n\nfragment FrameworkControlDialogFragment on Control {\n id\n name\n description\n sectionTitle\n bestPractice\n}\n\nfragment LinkedAuditsCardFragment on Audit {\n id\n name\n createdAt\n state\n validFrom\n validUntil\n framework {\n id\n name\n }\n}\n\nfragment LinkedDocumentsCardFragment on Document {\n id\n title\n createdAt\n documentType\n versions(first: 1) {\n edges {\n node {\n id\n status\n }\n }\n }\n}\n\nfragment LinkedMeasuresCardFragment on Measure {\n id\n name\n state\n}\n\nfragment LinkedObligationsCardFragment on Obligation {\n id\n requirement\n area\n source\n status\n owner {\n fullName\n id\n }\n}\n\nfragment LinkedSnapshotsCardFragment on Snapshot {\n id\n name\n description\n type\n createdAt\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "d320f2f2ee2e7f9b9f398dd1ff46ac2b";
|
||||
(node as any).hash = "c5a03208206812d371f5133c8963a710";
|
||||
|
||||
export default node;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @generated SignedSource<<a493a708fe8353db1159647a455582ad>>
|
||||
* @generated SignedSource<<4716483592ffb7c9bb7d96ea56503734>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
@@ -189,19 +189,6 @@ return {
|
||||
"name": "permission",
|
||||
"storageKey": "permission(action:\"core:control:create\")"
|
||||
},
|
||||
{
|
||||
"alias": "canGenerateSOA",
|
||||
"args": [
|
||||
{
|
||||
"kind": "Literal",
|
||||
"name": "action",
|
||||
"value": "core:framework:generate-state-of-applicability"
|
||||
}
|
||||
],
|
||||
"kind": "ScalarField",
|
||||
"name": "permission",
|
||||
"storageKey": "permission(action:\"core:framework:generate-state-of-applicability\")"
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
@@ -262,20 +249,6 @@ return {
|
||||
"storageKey": null
|
||||
},
|
||||
(v3/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "status",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "exclusionJustification",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
@@ -314,12 +287,12 @@ return {
|
||||
]
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "58485d98106169267addab7729095131",
|
||||
"cacheID": "9cb1289702b4dd6c83330a0ef84297d6",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "FrameworkGraphNodeQuery",
|
||||
"operationKind": "query",
|
||||
"text": "query FrameworkGraphNodeQuery(\n $frameworkId: ID!\n) {\n node(id: $frameworkId) {\n __typename\n ... on Framework {\n id\n name\n ...FrameworkDetailPageFragment\n }\n id\n }\n}\n\nfragment FrameworkDetailPageFragment on Framework {\n id\n name\n description\n lightLogoURL\n darkLogoURL\n canExport: permission(action: \"core:franework:export\")\n canUpdate: permission(action: \"core:framework:update\")\n canDelete: permission(action: \"core:framework:delete\")\n canCreateControl: permission(action: \"core:control:create\")\n canGenerateSOA: permission(action: \"core:framework:generate-state-of-applicability\")\n organization {\n name\n id\n }\n controls(first: 250, orderBy: {field: SECTION_TITLE, direction: ASC}) {\n edges {\n node {\n id\n sectionTitle\n name\n status\n exclusionJustification\n bestPractice\n }\n }\n }\n}\n"
|
||||
"text": "query FrameworkGraphNodeQuery(\n $frameworkId: ID!\n) {\n node(id: $frameworkId) {\n __typename\n ... on Framework {\n id\n name\n ...FrameworkDetailPageFragment\n }\n id\n }\n}\n\nfragment FrameworkDetailPageFragment on Framework {\n id\n name\n description\n lightLogoURL\n darkLogoURL\n canExport: permission(action: \"core:franework:export\")\n canUpdate: permission(action: \"core:framework:update\")\n canDelete: permission(action: \"core:framework:delete\")\n canCreateControl: permission(action: \"core:control:create\")\n organization {\n name\n id\n }\n controls(first: 250, orderBy: {field: SECTION_TITLE, direction: ASC}) {\n edges {\n node {\n id\n sectionTitle\n name\n bestPractice\n }\n }\n }\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
@@ -101,8 +101,6 @@ export const frameworkControlNodeQuery = graphql`
|
||||
name
|
||||
sectionTitle
|
||||
description
|
||||
status
|
||||
exclusionJustification
|
||||
canUpdate: permission(action: "core:control:update")
|
||||
canDelete: permission(action: "core:control:delete")
|
||||
canCreateMeasureMapping: permission(
|
||||
|
||||
@@ -336,22 +336,7 @@ export default function FrameworkControlPage({ queryRef }: Props) {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{control.status === "EXCLUDED" && (
|
||||
<div className="bg-danger border border-border-danger rounded-lg p-4">
|
||||
<div className="flex items-center gap-2 mb-2">
|
||||
<div className="font-medium text-txt-danger">
|
||||
{__("This control is excluded")}
|
||||
</div>
|
||||
</div>
|
||||
<div className="text-sm">
|
||||
<strong>{__("Justification:")}</strong>
|
||||
{" "}
|
||||
{control.exclusionJustification
|
||||
|| __("No justification provided")}
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
<div className={control.status === "EXCLUDED" ? "opacity-60" : ""}>
|
||||
<div>
|
||||
<div className="text-base mb-1">{control.name}</div>
|
||||
{control.description && (
|
||||
<div className="text-sm text-txt-secondary mb-4 whitespace-pre-wrap">
|
||||
|
||||
@@ -21,7 +21,6 @@ import { ConnectionHandler, graphql } from "relay-runtime";
|
||||
|
||||
import type { FrameworkDetailPageExportFrameworkMutation } from "#/__generated__/core/FrameworkDetailPageExportFrameworkMutation.graphql";
|
||||
import type { FrameworkDetailPageFragment$key } from "#/__generated__/core/FrameworkDetailPageFragment.graphql";
|
||||
import type { FrameworkDetailPageGenerateFrameworkStateOfApplicabilityMutation } from "#/__generated__/core/FrameworkDetailPageGenerateFrameworkStateOfApplicabilityMutation.graphql";
|
||||
import type { FrameworkGraphNodeQuery } from "#/__generated__/core/FrameworkGraphNodeQuery.graphql";
|
||||
import {
|
||||
connectionListKey,
|
||||
@@ -45,7 +44,6 @@ const frameworkDetailFragment = graphql`
|
||||
canUpdate: permission(action: "core:framework:update")
|
||||
canDelete: permission(action: "core:framework:delete")
|
||||
canCreateControl: permission(action: "core:control:create")
|
||||
canGenerateSOA: permission(action: "core:framework:generate-state-of-applicability")
|
||||
organization {
|
||||
name
|
||||
}
|
||||
@@ -59,8 +57,6 @@ const frameworkDetailFragment = graphql`
|
||||
id
|
||||
sectionTitle
|
||||
name
|
||||
status
|
||||
exclusionJustification
|
||||
bestPractice
|
||||
}
|
||||
}
|
||||
@@ -68,18 +64,6 @@ const frameworkDetailFragment = graphql`
|
||||
}
|
||||
`;
|
||||
|
||||
const generateFrameworkStateOfApplicabilityMutation = graphql`
|
||||
mutation FrameworkDetailPageGenerateFrameworkStateOfApplicabilityMutation(
|
||||
$frameworkId: ID!
|
||||
) {
|
||||
generateFrameworkStateOfApplicability(
|
||||
input: { frameworkId: $frameworkId }
|
||||
) {
|
||||
data
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
const exportFrameworkMutation = graphql`
|
||||
mutation FrameworkDetailPageExportFrameworkMutation($frameworkId: ID!) {
|
||||
exportFramework(input: { frameworkId: $frameworkId }) {
|
||||
@@ -116,17 +100,6 @@ export default function FrameworkDetailPage(props: Props) {
|
||||
framework,
|
||||
ConnectionHandler.getConnectionID(organizationId, connectionListKey),
|
||||
);
|
||||
const [generateFrameworkStateOfApplicability]
|
||||
= useMutationWithToasts<FrameworkDetailPageGenerateFrameworkStateOfApplicabilityMutation>(
|
||||
generateFrameworkStateOfApplicabilityMutation,
|
||||
{
|
||||
errorMessage:
|
||||
"Failed to generate framework state of applicability",
|
||||
successMessage:
|
||||
"Framework state of applicability generated successfully",
|
||||
},
|
||||
);
|
||||
|
||||
const [exportFramework]
|
||||
= useMutationWithToasts<FrameworkDetailPageExportFrameworkMutation>(
|
||||
exportFrameworkMutation,
|
||||
@@ -154,7 +127,7 @@ export default function FrameworkDetailPage(props: Props) {
|
||||
);
|
||||
}
|
||||
|
||||
const hasAnyAction = framework.canExport || framework.canDelete || framework.canGenerateSOA;
|
||||
const hasAnyAction = framework.canExport || framework.canDelete;
|
||||
|
||||
return (
|
||||
<div className="space-y-6">
|
||||
@@ -178,35 +151,6 @@ export default function FrameworkDetailPage(props: Props) {
|
||||
)}
|
||||
{hasAnyAction && (
|
||||
<ActionDropdown variant="secondary">
|
||||
{framework.canGenerateSOA
|
||||
&& (
|
||||
<DropdownItem
|
||||
variant="primary"
|
||||
onClick={() => {
|
||||
void generateFrameworkStateOfApplicability({
|
||||
variables: { frameworkId: framework.id },
|
||||
onCompleted: (data) => {
|
||||
if (
|
||||
data
|
||||
.generateFrameworkStateOfApplicability
|
||||
?.data
|
||||
) {
|
||||
const link
|
||||
= window.document.createElement("a");
|
||||
link.href
|
||||
= data.generateFrameworkStateOfApplicability.data;
|
||||
link.download = `${framework.organization.name}-${framework.name}-SOA.xlsx`;
|
||||
window.document.body.appendChild(link);
|
||||
link.click();
|
||||
window.document.body.removeChild(link);
|
||||
}
|
||||
},
|
||||
});
|
||||
}}
|
||||
>
|
||||
{__("Download SOA")}
|
||||
</DropdownItem>
|
||||
)}
|
||||
{framework.canExport
|
||||
&& (
|
||||
<DropdownItem
|
||||
@@ -245,7 +189,6 @@ export default function FrameworkDetailPage(props: Props) {
|
||||
key={control.id}
|
||||
id={control.sectionTitle}
|
||||
description={control.name}
|
||||
excluded={control.status === "EXCLUDED"}
|
||||
to={`/organizations/${organizationId}/frameworks/${framework.id}/controls/${control.id}`}
|
||||
active={selectedControl?.id === control.id}
|
||||
/>
|
||||
|
||||
@@ -33,8 +33,6 @@ const controlFragment = graphql`
|
||||
name
|
||||
description
|
||||
sectionTitle
|
||||
status
|
||||
exclusionJustification
|
||||
bestPractice
|
||||
}
|
||||
`;
|
||||
@@ -64,31 +62,12 @@ const updateMutation = graphql`
|
||||
}
|
||||
`;
|
||||
|
||||
const schema = z
|
||||
.object({
|
||||
name: z.string(),
|
||||
description: z.string().optional().nullable(),
|
||||
sectionTitle: z.string(),
|
||||
status: z.enum(["INCLUDED", "EXCLUDED"]),
|
||||
exclusionJustification: z.string().optional(),
|
||||
bestPractice: z.boolean(),
|
||||
})
|
||||
.refine(
|
||||
(data) => {
|
||||
if (data.status === "EXCLUDED") {
|
||||
return (
|
||||
data.exclusionJustification
|
||||
&& data.exclusionJustification.trim().length > 0
|
||||
);
|
||||
}
|
||||
return true;
|
||||
},
|
||||
{
|
||||
message:
|
||||
"Exclusion justification is required when status is excluded",
|
||||
path: ["exclusionJustification"],
|
||||
},
|
||||
);
|
||||
const schema = z.object({
|
||||
name: z.string(),
|
||||
description: z.string().optional().nullable(),
|
||||
sectionTitle: z.string(),
|
||||
bestPractice: z.boolean(),
|
||||
});
|
||||
|
||||
export function FrameworkControlDialog(props: Props) {
|
||||
const { __ } = useTranslate();
|
||||
@@ -111,9 +90,6 @@ export function FrameworkControlDialog(props: Props) {
|
||||
name: frameworkControl?.name ?? "",
|
||||
description: frameworkControl?.description ?? "",
|
||||
sectionTitle: frameworkControl?.sectionTitle ?? "",
|
||||
status: frameworkControl?.status ?? "INCLUDED",
|
||||
exclusionJustification:
|
||||
frameworkControl?.exclusionJustification ?? "",
|
||||
bestPractice: frameworkControl?.bestPractice ?? true,
|
||||
}),
|
||||
[frameworkControl],
|
||||
@@ -141,11 +117,6 @@ export function FrameworkControlDialog(props: Props) {
|
||||
description: data.description || null,
|
||||
sectionTitle: data.sectionTitle,
|
||||
bestPractice: data.bestPractice,
|
||||
status: data.status,
|
||||
exclusionJustification:
|
||||
data.status === "EXCLUDED"
|
||||
? data.exclusionJustification
|
||||
: null,
|
||||
},
|
||||
},
|
||||
});
|
||||
@@ -159,11 +130,6 @@ export function FrameworkControlDialog(props: Props) {
|
||||
description: data.description || null,
|
||||
sectionTitle: data.sectionTitle,
|
||||
bestPractice: data.bestPractice ?? true,
|
||||
status: data.status,
|
||||
exclusionJustification:
|
||||
data.status === "EXCLUDED"
|
||||
? data.exclusionJustification
|
||||
: null,
|
||||
},
|
||||
connections: [props.connectionId!],
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user