274
apps/console/src/__generated__/core/AddApplicabilityStatementDialogCreateMutation.graphql.ts
generated
Normal file
274
apps/console/src/__generated__/core/AddApplicabilityStatementDialogCreateMutation.graphql.ts
generated
Normal file
@@ -0,0 +1,274 @@
|
||||
/**
|
||||
* @generated SignedSource<<4f5d3e4c56b185607505d82119176eb5>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
// @ts-nocheck
|
||||
|
||||
import { ConcreteRequest } from 'relay-runtime';
|
||||
export type CreateApplicabilityStatementInput = {
|
||||
applicability: boolean;
|
||||
controlId: string;
|
||||
justification?: string | null | undefined;
|
||||
stateOfApplicabilityId: string;
|
||||
};
|
||||
export type AddApplicabilityStatementDialogCreateMutation$variables = {
|
||||
connections: ReadonlyArray<string>;
|
||||
input: CreateApplicabilityStatementInput;
|
||||
};
|
||||
export type AddApplicabilityStatementDialogCreateMutation$data = {
|
||||
readonly createApplicabilityStatement: {
|
||||
readonly applicabilityStatementEdge: {
|
||||
readonly node: {
|
||||
readonly applicability: boolean;
|
||||
readonly control: {
|
||||
readonly bestPractice: boolean;
|
||||
readonly contractual: boolean;
|
||||
readonly framework: {
|
||||
readonly id: string;
|
||||
readonly name: string;
|
||||
};
|
||||
readonly id: string;
|
||||
readonly name: string;
|
||||
readonly organization: {
|
||||
readonly id: string;
|
||||
} | null | undefined;
|
||||
readonly regulatory: boolean;
|
||||
readonly riskAssessment: boolean;
|
||||
readonly sectionTitle: string;
|
||||
};
|
||||
readonly id: string;
|
||||
readonly justification: string;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
export type AddApplicabilityStatementDialogCreateMutation = {
|
||||
response: AddApplicabilityStatementDialogCreateMutation$data;
|
||||
variables: AddApplicabilityStatementDialogCreateMutation$variables;
|
||||
};
|
||||
|
||||
const node: ConcreteRequest = (function(){
|
||||
var v0 = {
|
||||
"defaultValue": null,
|
||||
"kind": "LocalArgument",
|
||||
"name": "connections"
|
||||
},
|
||||
v1 = {
|
||||
"defaultValue": null,
|
||||
"kind": "LocalArgument",
|
||||
"name": "input"
|
||||
},
|
||||
v2 = [
|
||||
{
|
||||
"kind": "Variable",
|
||||
"name": "input",
|
||||
"variableName": "input"
|
||||
}
|
||||
],
|
||||
v3 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "id",
|
||||
"storageKey": null
|
||||
},
|
||||
v4 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "name",
|
||||
"storageKey": null
|
||||
},
|
||||
v5 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "ApplicabilityStatementEdge",
|
||||
"kind": "LinkedField",
|
||||
"name": "applicabilityStatementEdge",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "ApplicabilityStatement",
|
||||
"kind": "LinkedField",
|
||||
"name": "node",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v3/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "applicability",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "justification",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "Control",
|
||||
"kind": "LinkedField",
|
||||
"name": "control",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v3/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "sectionTitle",
|
||||
"storageKey": null
|
||||
},
|
||||
(v4/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "bestPractice",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "regulatory",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "contractual",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "riskAssessment",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "Framework",
|
||||
"kind": "LinkedField",
|
||||
"name": "framework",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v3/*: any*/),
|
||||
(v4/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "Organization",
|
||||
"kind": "LinkedField",
|
||||
"name": "organization",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v3/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
};
|
||||
return {
|
||||
"fragment": {
|
||||
"argumentDefinitions": [
|
||||
(v0/*: any*/),
|
||||
(v1/*: any*/)
|
||||
],
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "AddApplicabilityStatementDialogCreateMutation",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v2/*: any*/),
|
||||
"concreteType": "CreateApplicabilityStatementPayload",
|
||||
"kind": "LinkedField",
|
||||
"name": "createApplicabilityStatement",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v5/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"type": "Mutation",
|
||||
"abstractKey": null
|
||||
},
|
||||
"kind": "Request",
|
||||
"operation": {
|
||||
"argumentDefinitions": [
|
||||
(v1/*: any*/),
|
||||
(v0/*: any*/)
|
||||
],
|
||||
"kind": "Operation",
|
||||
"name": "AddApplicabilityStatementDialogCreateMutation",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v2/*: any*/),
|
||||
"concreteType": "CreateApplicabilityStatementPayload",
|
||||
"kind": "LinkedField",
|
||||
"name": "createApplicabilityStatement",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v5/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"filters": null,
|
||||
"handle": "appendEdge",
|
||||
"key": "",
|
||||
"kind": "LinkedHandle",
|
||||
"name": "applicabilityStatementEdge",
|
||||
"handleArgs": [
|
||||
{
|
||||
"kind": "Variable",
|
||||
"name": "connections",
|
||||
"variableName": "connections"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
]
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "df832d2f8d480328039fdcf85bf9187c",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "AddApplicabilityStatementDialogCreateMutation",
|
||||
"operationKind": "mutation",
|
||||
"text": "mutation AddApplicabilityStatementDialogCreateMutation(\n $input: CreateApplicabilityStatementInput!\n) {\n createApplicabilityStatement(input: $input) {\n applicabilityStatementEdge {\n node {\n id\n applicability\n justification\n control {\n id\n sectionTitle\n name\n bestPractice\n regulatory\n contractual\n riskAssessment\n framework {\n id\n name\n }\n organization {\n id\n }\n }\n }\n }\n }\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "ddf10370932006893422c8cfb47e5587";
|
||||
|
||||
export default node;
|
||||
132
apps/console/src/__generated__/core/AddApplicabilityStatementDialogDeleteMutation.graphql.ts
generated
Normal file
132
apps/console/src/__generated__/core/AddApplicabilityStatementDialogDeleteMutation.graphql.ts
generated
Normal file
@@ -0,0 +1,132 @@
|
||||
/**
|
||||
* @generated SignedSource<<b655b8a8c70af9ceb259e2fed933f397>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
// @ts-nocheck
|
||||
|
||||
import { ConcreteRequest } from 'relay-runtime';
|
||||
export type DeleteApplicabilityStatementInput = {
|
||||
applicabilityStatementId: string;
|
||||
};
|
||||
export type AddApplicabilityStatementDialogDeleteMutation$variables = {
|
||||
connections: ReadonlyArray<string>;
|
||||
input: DeleteApplicabilityStatementInput;
|
||||
};
|
||||
export type AddApplicabilityStatementDialogDeleteMutation$data = {
|
||||
readonly deleteApplicabilityStatement: {
|
||||
readonly deletedApplicabilityStatementId: string;
|
||||
};
|
||||
};
|
||||
export type AddApplicabilityStatementDialogDeleteMutation = {
|
||||
response: AddApplicabilityStatementDialogDeleteMutation$data;
|
||||
variables: AddApplicabilityStatementDialogDeleteMutation$variables;
|
||||
};
|
||||
|
||||
const node: ConcreteRequest = (function(){
|
||||
var v0 = {
|
||||
"defaultValue": null,
|
||||
"kind": "LocalArgument",
|
||||
"name": "connections"
|
||||
},
|
||||
v1 = {
|
||||
"defaultValue": null,
|
||||
"kind": "LocalArgument",
|
||||
"name": "input"
|
||||
},
|
||||
v2 = [
|
||||
{
|
||||
"kind": "Variable",
|
||||
"name": "input",
|
||||
"variableName": "input"
|
||||
}
|
||||
],
|
||||
v3 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "deletedApplicabilityStatementId",
|
||||
"storageKey": null
|
||||
};
|
||||
return {
|
||||
"fragment": {
|
||||
"argumentDefinitions": [
|
||||
(v0/*: any*/),
|
||||
(v1/*: any*/)
|
||||
],
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "AddApplicabilityStatementDialogDeleteMutation",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v2/*: any*/),
|
||||
"concreteType": "DeleteApplicabilityStatementPayload",
|
||||
"kind": "LinkedField",
|
||||
"name": "deleteApplicabilityStatement",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v3/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"type": "Mutation",
|
||||
"abstractKey": null
|
||||
},
|
||||
"kind": "Request",
|
||||
"operation": {
|
||||
"argumentDefinitions": [
|
||||
(v1/*: any*/),
|
||||
(v0/*: any*/)
|
||||
],
|
||||
"kind": "Operation",
|
||||
"name": "AddApplicabilityStatementDialogDeleteMutation",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v2/*: any*/),
|
||||
"concreteType": "DeleteApplicabilityStatementPayload",
|
||||
"kind": "LinkedField",
|
||||
"name": "deleteApplicabilityStatement",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v3/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"filters": null,
|
||||
"handle": "deleteEdge",
|
||||
"key": "",
|
||||
"kind": "ScalarHandle",
|
||||
"name": "deletedApplicabilityStatementId",
|
||||
"handleArgs": [
|
||||
{
|
||||
"kind": "Variable",
|
||||
"name": "connections",
|
||||
"variableName": "connections"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
]
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "33d1b54d91487d7c3fcbc8ff8bcb68ce",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "AddApplicabilityStatementDialogDeleteMutation",
|
||||
"operationKind": "mutation",
|
||||
"text": "mutation AddApplicabilityStatementDialogDeleteMutation(\n $input: DeleteApplicabilityStatementInput!\n) {\n deleteApplicabilityStatement(input: $input) {\n deletedApplicabilityStatementId\n }\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "965c5b50e3a2a077fb7dc287b70026f1";
|
||||
|
||||
export default node;
|
||||
352
apps/console/src/__generated__/core/AddApplicabilityStatementDialogQuery.graphql.ts
generated
Normal file
352
apps/console/src/__generated__/core/AddApplicabilityStatementDialogQuery.graphql.ts
generated
Normal file
@@ -0,0 +1,352 @@
|
||||
/**
|
||||
* @generated SignedSource<<0a75f5819022ec5555d7c3d8b4098e1c>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
// @ts-nocheck
|
||||
|
||||
import { ConcreteRequest } from 'relay-runtime';
|
||||
export type AddApplicabilityStatementDialogQuery$variables = {
|
||||
organizationId: string;
|
||||
stateOfApplicabilityId: string;
|
||||
};
|
||||
export type AddApplicabilityStatementDialogQuery$data = {
|
||||
readonly organization: {
|
||||
readonly controls?: {
|
||||
readonly edges: ReadonlyArray<{
|
||||
readonly node: {
|
||||
readonly framework: {
|
||||
readonly id: string;
|
||||
readonly name: string;
|
||||
};
|
||||
readonly id: string;
|
||||
readonly name: string;
|
||||
readonly sectionTitle: string;
|
||||
};
|
||||
}>;
|
||||
};
|
||||
readonly id?: string;
|
||||
};
|
||||
readonly stateOfApplicability: {
|
||||
readonly applicabilityStatements?: {
|
||||
readonly edges: ReadonlyArray<{
|
||||
readonly node: {
|
||||
readonly applicability: boolean;
|
||||
readonly control: {
|
||||
readonly id: string;
|
||||
};
|
||||
readonly id: string;
|
||||
readonly justification: string;
|
||||
};
|
||||
}>;
|
||||
};
|
||||
readonly id?: string;
|
||||
};
|
||||
};
|
||||
export type AddApplicabilityStatementDialogQuery = {
|
||||
response: AddApplicabilityStatementDialogQuery$data;
|
||||
variables: AddApplicabilityStatementDialogQuery$variables;
|
||||
};
|
||||
|
||||
const node: ConcreteRequest = (function(){
|
||||
var v0 = {
|
||||
"defaultValue": null,
|
||||
"kind": "LocalArgument",
|
||||
"name": "organizationId"
|
||||
},
|
||||
v1 = {
|
||||
"defaultValue": null,
|
||||
"kind": "LocalArgument",
|
||||
"name": "stateOfApplicabilityId"
|
||||
},
|
||||
v2 = [
|
||||
{
|
||||
"kind": "Variable",
|
||||
"name": "id",
|
||||
"variableName": "stateOfApplicabilityId"
|
||||
}
|
||||
],
|
||||
v3 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "id",
|
||||
"storageKey": null
|
||||
},
|
||||
v4 = {
|
||||
"kind": "Literal",
|
||||
"name": "first",
|
||||
"value": 10000
|
||||
},
|
||||
v5 = {
|
||||
"alias": null,
|
||||
"args": [
|
||||
(v4/*: any*/)
|
||||
],
|
||||
"concreteType": "ApplicabilityStatementConnection",
|
||||
"kind": "LinkedField",
|
||||
"name": "applicabilityStatements",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "ApplicabilityStatementEdge",
|
||||
"kind": "LinkedField",
|
||||
"name": "edges",
|
||||
"plural": true,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "ApplicabilityStatement",
|
||||
"kind": "LinkedField",
|
||||
"name": "node",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v3/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "applicability",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "justification",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "Control",
|
||||
"kind": "LinkedField",
|
||||
"name": "control",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v3/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": "applicabilityStatements(first:10000)"
|
||||
},
|
||||
v6 = [
|
||||
{
|
||||
"kind": "Variable",
|
||||
"name": "id",
|
||||
"variableName": "organizationId"
|
||||
}
|
||||
],
|
||||
v7 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "name",
|
||||
"storageKey": null
|
||||
},
|
||||
v8 = {
|
||||
"alias": null,
|
||||
"args": [
|
||||
(v4/*: any*/),
|
||||
{
|
||||
"kind": "Literal",
|
||||
"name": "orderBy",
|
||||
"value": {
|
||||
"direction": "ASC",
|
||||
"field": "CREATED_AT"
|
||||
}
|
||||
}
|
||||
],
|
||||
"concreteType": "ControlConnection",
|
||||
"kind": "LinkedField",
|
||||
"name": "controls",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "ControlEdge",
|
||||
"kind": "LinkedField",
|
||||
"name": "edges",
|
||||
"plural": true,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "Control",
|
||||
"kind": "LinkedField",
|
||||
"name": "node",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v3/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "sectionTitle",
|
||||
"storageKey": null
|
||||
},
|
||||
(v7/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "Framework",
|
||||
"kind": "LinkedField",
|
||||
"name": "framework",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v3/*: any*/),
|
||||
(v7/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": "controls(first:10000,orderBy:{\"direction\":\"ASC\",\"field\":\"CREATED_AT\"})"
|
||||
},
|
||||
v9 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "__typename",
|
||||
"storageKey": null
|
||||
};
|
||||
return {
|
||||
"fragment": {
|
||||
"argumentDefinitions": [
|
||||
(v0/*: any*/),
|
||||
(v1/*: any*/)
|
||||
],
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "AddApplicabilityStatementDialogQuery",
|
||||
"selections": [
|
||||
{
|
||||
"alias": "stateOfApplicability",
|
||||
"args": (v2/*: any*/),
|
||||
"concreteType": null,
|
||||
"kind": "LinkedField",
|
||||
"name": "node",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"kind": "InlineFragment",
|
||||
"selections": [
|
||||
(v3/*: any*/),
|
||||
(v5/*: any*/)
|
||||
],
|
||||
"type": "StateOfApplicability",
|
||||
"abstractKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": "organization",
|
||||
"args": (v6/*: any*/),
|
||||
"concreteType": null,
|
||||
"kind": "LinkedField",
|
||||
"name": "node",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"kind": "InlineFragment",
|
||||
"selections": [
|
||||
(v3/*: any*/),
|
||||
(v8/*: any*/)
|
||||
],
|
||||
"type": "Organization",
|
||||
"abstractKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"type": "Query",
|
||||
"abstractKey": null
|
||||
},
|
||||
"kind": "Request",
|
||||
"operation": {
|
||||
"argumentDefinitions": [
|
||||
(v1/*: any*/),
|
||||
(v0/*: any*/)
|
||||
],
|
||||
"kind": "Operation",
|
||||
"name": "AddApplicabilityStatementDialogQuery",
|
||||
"selections": [
|
||||
{
|
||||
"alias": "stateOfApplicability",
|
||||
"args": (v2/*: any*/),
|
||||
"concreteType": null,
|
||||
"kind": "LinkedField",
|
||||
"name": "node",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v9/*: any*/),
|
||||
(v3/*: any*/),
|
||||
{
|
||||
"kind": "InlineFragment",
|
||||
"selections": [
|
||||
(v5/*: any*/)
|
||||
],
|
||||
"type": "StateOfApplicability",
|
||||
"abstractKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": "organization",
|
||||
"args": (v6/*: any*/),
|
||||
"concreteType": null,
|
||||
"kind": "LinkedField",
|
||||
"name": "node",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v9/*: any*/),
|
||||
(v3/*: any*/),
|
||||
{
|
||||
"kind": "InlineFragment",
|
||||
"selections": [
|
||||
(v8/*: any*/)
|
||||
],
|
||||
"type": "Organization",
|
||||
"abstractKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
]
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "ac6bc824dd185cea6fe2928f8292eff1",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "AddApplicabilityStatementDialogQuery",
|
||||
"operationKind": "query",
|
||||
"text": "query AddApplicabilityStatementDialogQuery(\n $stateOfApplicabilityId: ID!\n $organizationId: ID!\n) {\n stateOfApplicability: node(id: $stateOfApplicabilityId) {\n __typename\n ... on StateOfApplicability {\n id\n applicabilityStatements(first: 10000) {\n edges {\n node {\n id\n applicability\n justification\n control {\n id\n }\n }\n }\n }\n }\n id\n }\n organization: node(id: $organizationId) {\n __typename\n ... on Organization {\n id\n controls(first: 10000, orderBy: {direction: ASC, field: CREATED_AT}) {\n edges {\n node {\n id\n sectionTitle\n name\n framework {\n id\n name\n }\n }\n }\n }\n }\n id\n }\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "dd10dd30b76ae39eca5953e71f7d2d02";
|
||||
|
||||
export default node;
|
||||
123
apps/console/src/__generated__/core/AddApplicabilityStatementDialogUpdateMutation.graphql.ts
generated
Normal file
123
apps/console/src/__generated__/core/AddApplicabilityStatementDialogUpdateMutation.graphql.ts
generated
Normal file
@@ -0,0 +1,123 @@
|
||||
/**
|
||||
* @generated SignedSource<<43adbd5c0838293beac5a5f900fe47bd>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
// @ts-nocheck
|
||||
|
||||
import { ConcreteRequest } from 'relay-runtime';
|
||||
export type UpdateApplicabilityStatementInput = {
|
||||
applicability: boolean;
|
||||
applicabilityStatementId: string;
|
||||
justification?: string | null | undefined;
|
||||
};
|
||||
export type AddApplicabilityStatementDialogUpdateMutation$variables = {
|
||||
input: UpdateApplicabilityStatementInput;
|
||||
};
|
||||
export type AddApplicabilityStatementDialogUpdateMutation$data = {
|
||||
readonly updateApplicabilityStatement: {
|
||||
readonly applicabilityStatement: {
|
||||
readonly applicability: boolean;
|
||||
readonly id: string;
|
||||
readonly justification: string;
|
||||
};
|
||||
};
|
||||
};
|
||||
export type AddApplicabilityStatementDialogUpdateMutation = {
|
||||
response: AddApplicabilityStatementDialogUpdateMutation$data;
|
||||
variables: AddApplicabilityStatementDialogUpdateMutation$variables;
|
||||
};
|
||||
|
||||
const node: ConcreteRequest = (function(){
|
||||
var v0 = [
|
||||
{
|
||||
"defaultValue": null,
|
||||
"kind": "LocalArgument",
|
||||
"name": "input"
|
||||
}
|
||||
],
|
||||
v1 = [
|
||||
{
|
||||
"alias": null,
|
||||
"args": [
|
||||
{
|
||||
"kind": "Variable",
|
||||
"name": "input",
|
||||
"variableName": "input"
|
||||
}
|
||||
],
|
||||
"concreteType": "UpdateApplicabilityStatementPayload",
|
||||
"kind": "LinkedField",
|
||||
"name": "updateApplicabilityStatement",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "ApplicabilityStatement",
|
||||
"kind": "LinkedField",
|
||||
"name": "applicabilityStatement",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "id",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "applicability",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "justification",
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
];
|
||||
return {
|
||||
"fragment": {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "AddApplicabilityStatementDialogUpdateMutation",
|
||||
"selections": (v1/*: any*/),
|
||||
"type": "Mutation",
|
||||
"abstractKey": null
|
||||
},
|
||||
"kind": "Request",
|
||||
"operation": {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Operation",
|
||||
"name": "AddApplicabilityStatementDialogUpdateMutation",
|
||||
"selections": (v1/*: any*/)
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "b3f6f94a9c59775234d78ac8695211f0",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "AddApplicabilityStatementDialogUpdateMutation",
|
||||
"operationKind": "mutation",
|
||||
"text": "mutation AddApplicabilityStatementDialogUpdateMutation(\n $input: UpdateApplicabilityStatementInput!\n) {\n updateApplicabilityStatement(input: $input) {\n applicabilityStatement {\n id\n applicability\n justification\n }\n }\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "8c801c1409e926a39c67b1c20741e501";
|
||||
|
||||
export default node;
|
||||
273
apps/console/src/__generated__/core/CreateStateOfApplicabilityDialogMutation.graphql.ts
generated
Normal file
273
apps/console/src/__generated__/core/CreateStateOfApplicabilityDialogMutation.graphql.ts
generated
Normal file
@@ -0,0 +1,273 @@
|
||||
/**
|
||||
* @generated SignedSource<<c9791128a3674bf247b23005471bdc50>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
// @ts-nocheck
|
||||
|
||||
import { ConcreteRequest } from 'relay-runtime';
|
||||
import { FragmentRefs } from "relay-runtime";
|
||||
export type CreateStateOfApplicabilityInput = {
|
||||
name: string;
|
||||
organizationId: string;
|
||||
ownerId: string;
|
||||
};
|
||||
export type CreateStateOfApplicabilityDialogMutation$variables = {
|
||||
connections: ReadonlyArray<string>;
|
||||
input: CreateStateOfApplicabilityInput;
|
||||
};
|
||||
export type CreateStateOfApplicabilityDialogMutation$data = {
|
||||
readonly createStateOfApplicability: {
|
||||
readonly stateOfApplicabilityEdge: {
|
||||
readonly node: {
|
||||
readonly canDelete: boolean;
|
||||
readonly createdAt: string;
|
||||
readonly id: string;
|
||||
readonly name: string;
|
||||
readonly snapshotId: string | null | undefined;
|
||||
readonly sourceId: string | null | undefined;
|
||||
readonly updatedAt: string;
|
||||
readonly " $fragmentSpreads": FragmentRefs<"StateOfApplicabilityRowFragment">;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
export type CreateStateOfApplicabilityDialogMutation = {
|
||||
response: CreateStateOfApplicabilityDialogMutation$data;
|
||||
variables: CreateStateOfApplicabilityDialogMutation$variables;
|
||||
};
|
||||
|
||||
const node: ConcreteRequest = (function(){
|
||||
var v0 = {
|
||||
"defaultValue": null,
|
||||
"kind": "LocalArgument",
|
||||
"name": "connections"
|
||||
},
|
||||
v1 = {
|
||||
"defaultValue": null,
|
||||
"kind": "LocalArgument",
|
||||
"name": "input"
|
||||
},
|
||||
v2 = [
|
||||
{
|
||||
"kind": "Variable",
|
||||
"name": "input",
|
||||
"variableName": "input"
|
||||
}
|
||||
],
|
||||
v3 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "id",
|
||||
"storageKey": null
|
||||
},
|
||||
v4 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "name",
|
||||
"storageKey": null
|
||||
},
|
||||
v5 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "sourceId",
|
||||
"storageKey": null
|
||||
},
|
||||
v6 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "snapshotId",
|
||||
"storageKey": null
|
||||
},
|
||||
v7 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "createdAt",
|
||||
"storageKey": null
|
||||
},
|
||||
v8 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "updatedAt",
|
||||
"storageKey": null
|
||||
},
|
||||
v9 = {
|
||||
"alias": "canDelete",
|
||||
"args": [
|
||||
{
|
||||
"kind": "Literal",
|
||||
"name": "action",
|
||||
"value": "core:state-of-applicability:delete"
|
||||
}
|
||||
],
|
||||
"kind": "ScalarField",
|
||||
"name": "permission",
|
||||
"storageKey": "permission(action:\"core:state-of-applicability:delete\")"
|
||||
};
|
||||
return {
|
||||
"fragment": {
|
||||
"argumentDefinitions": [
|
||||
(v0/*: any*/),
|
||||
(v1/*: any*/)
|
||||
],
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "CreateStateOfApplicabilityDialogMutation",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v2/*: any*/),
|
||||
"concreteType": "CreateStateOfApplicabilityPayload",
|
||||
"kind": "LinkedField",
|
||||
"name": "createStateOfApplicability",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "StateOfApplicabilityEdge",
|
||||
"kind": "LinkedField",
|
||||
"name": "stateOfApplicabilityEdge",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "StateOfApplicability",
|
||||
"kind": "LinkedField",
|
||||
"name": "node",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v3/*: any*/),
|
||||
(v4/*: any*/),
|
||||
(v5/*: any*/),
|
||||
(v6/*: any*/),
|
||||
(v7/*: any*/),
|
||||
(v8/*: any*/),
|
||||
(v9/*: any*/),
|
||||
{
|
||||
"args": null,
|
||||
"kind": "FragmentSpread",
|
||||
"name": "StateOfApplicabilityRowFragment"
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"type": "Mutation",
|
||||
"abstractKey": null
|
||||
},
|
||||
"kind": "Request",
|
||||
"operation": {
|
||||
"argumentDefinitions": [
|
||||
(v1/*: any*/),
|
||||
(v0/*: any*/)
|
||||
],
|
||||
"kind": "Operation",
|
||||
"name": "CreateStateOfApplicabilityDialogMutation",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v2/*: any*/),
|
||||
"concreteType": "CreateStateOfApplicabilityPayload",
|
||||
"kind": "LinkedField",
|
||||
"name": "createStateOfApplicability",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "StateOfApplicabilityEdge",
|
||||
"kind": "LinkedField",
|
||||
"name": "stateOfApplicabilityEdge",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "StateOfApplicability",
|
||||
"kind": "LinkedField",
|
||||
"name": "node",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v3/*: any*/),
|
||||
(v4/*: any*/),
|
||||
(v5/*: any*/),
|
||||
(v6/*: any*/),
|
||||
(v7/*: any*/),
|
||||
(v8/*: any*/),
|
||||
(v9/*: any*/),
|
||||
{
|
||||
"alias": "statementsInfo",
|
||||
"args": null,
|
||||
"concreteType": "ApplicabilityStatementConnection",
|
||||
"kind": "LinkedField",
|
||||
"name": "applicabilityStatements",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "totalCount",
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"filters": null,
|
||||
"handle": "prependEdge",
|
||||
"key": "",
|
||||
"kind": "LinkedHandle",
|
||||
"name": "stateOfApplicabilityEdge",
|
||||
"handleArgs": [
|
||||
{
|
||||
"kind": "Variable",
|
||||
"name": "connections",
|
||||
"variableName": "connections"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
]
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "cabae20b2fee98a353eaefaad0a28b4b",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "CreateStateOfApplicabilityDialogMutation",
|
||||
"operationKind": "mutation",
|
||||
"text": "mutation CreateStateOfApplicabilityDialogMutation(\n $input: CreateStateOfApplicabilityInput!\n) {\n createStateOfApplicability(input: $input) {\n stateOfApplicabilityEdge {\n node {\n id\n name\n sourceId\n snapshotId\n createdAt\n updatedAt\n canDelete: permission(action: \"core:state-of-applicability:delete\")\n ...StateOfApplicabilityRowFragment\n }\n }\n }\n}\n\nfragment StateOfApplicabilityRowFragment on StateOfApplicability {\n id\n name\n createdAt\n canDelete: permission(action: \"core:state-of-applicability:delete\")\n statementsInfo: applicabilityStatements {\n totalCount\n }\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "e5a7d1dc6b0401246d646dde983bc8a0";
|
||||
|
||||
export default node;
|
||||
@@ -1,194 +0,0 @@
|
||||
/**
|
||||
* @generated SignedSource<<100330ea65f9914591271a9a1f78fd2e>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
// @ts-nocheck
|
||||
|
||||
import { ConcreteRequest } from 'relay-runtime';
|
||||
export type CreateStateOfApplicabilityControlMappingInput = {
|
||||
applicability: boolean;
|
||||
controlId: string;
|
||||
justification?: string | null | undefined;
|
||||
stateOfApplicabilityId: string;
|
||||
};
|
||||
export type EditControlDialogLinkMutation$variables = {
|
||||
input: CreateStateOfApplicabilityControlMappingInput;
|
||||
};
|
||||
export type EditControlDialogLinkMutation$data = {
|
||||
readonly createStateOfApplicabilityControlMapping: {
|
||||
readonly stateOfApplicabilityControlEdge: {
|
||||
readonly node: {
|
||||
readonly applicability: boolean;
|
||||
readonly controlId: string;
|
||||
readonly justification: string | null | undefined;
|
||||
readonly stateOfApplicabilityId: string;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
export type EditControlDialogLinkMutation = {
|
||||
response: EditControlDialogLinkMutation$data;
|
||||
variables: EditControlDialogLinkMutation$variables;
|
||||
};
|
||||
|
||||
const node: ConcreteRequest = (function(){
|
||||
var v0 = [
|
||||
{
|
||||
"defaultValue": null,
|
||||
"kind": "LocalArgument",
|
||||
"name": "input"
|
||||
}
|
||||
],
|
||||
v1 = [
|
||||
{
|
||||
"kind": "Variable",
|
||||
"name": "input",
|
||||
"variableName": "input"
|
||||
}
|
||||
],
|
||||
v2 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "stateOfApplicabilityId",
|
||||
"storageKey": null
|
||||
},
|
||||
v3 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "controlId",
|
||||
"storageKey": null
|
||||
},
|
||||
v4 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "applicability",
|
||||
"storageKey": null
|
||||
},
|
||||
v5 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "justification",
|
||||
"storageKey": null
|
||||
};
|
||||
return {
|
||||
"fragment": {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "EditControlDialogLinkMutation",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v1/*: any*/),
|
||||
"concreteType": "CreateStateOfApplicabilityControlMappingPayload",
|
||||
"kind": "LinkedField",
|
||||
"name": "createStateOfApplicabilityControlMapping",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "StateOfApplicabilityControlEdge",
|
||||
"kind": "LinkedField",
|
||||
"name": "stateOfApplicabilityControlEdge",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "StateOfApplicabilityControl",
|
||||
"kind": "LinkedField",
|
||||
"name": "node",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v2/*: any*/),
|
||||
(v3/*: any*/),
|
||||
(v4/*: any*/),
|
||||
(v5/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"type": "Mutation",
|
||||
"abstractKey": null
|
||||
},
|
||||
"kind": "Request",
|
||||
"operation": {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Operation",
|
||||
"name": "EditControlDialogLinkMutation",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v1/*: any*/),
|
||||
"concreteType": "CreateStateOfApplicabilityControlMappingPayload",
|
||||
"kind": "LinkedField",
|
||||
"name": "createStateOfApplicabilityControlMapping",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "StateOfApplicabilityControlEdge",
|
||||
"kind": "LinkedField",
|
||||
"name": "stateOfApplicabilityControlEdge",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "StateOfApplicabilityControl",
|
||||
"kind": "LinkedField",
|
||||
"name": "node",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v2/*: any*/),
|
||||
(v3/*: any*/),
|
||||
(v4/*: any*/),
|
||||
(v5/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "id",
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
]
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "e15d97ea6b798532fb82fc577cbccd64",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "EditControlDialogLinkMutation",
|
||||
"operationKind": "mutation",
|
||||
"text": "mutation EditControlDialogLinkMutation(\n $input: CreateStateOfApplicabilityControlMappingInput!\n) {\n createStateOfApplicabilityControlMapping(input: $input) {\n stateOfApplicabilityControlEdge {\n node {\n stateOfApplicabilityId\n controlId\n applicability\n justification\n id\n }\n }\n }\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "e7a83ce3daa0051a0b2bb03b0429f2c4";
|
||||
|
||||
export default node;
|
||||
123
apps/console/src/__generated__/core/EditControlDialogUpdateMutation.graphql.ts
generated
Normal file
123
apps/console/src/__generated__/core/EditControlDialogUpdateMutation.graphql.ts
generated
Normal file
@@ -0,0 +1,123 @@
|
||||
/**
|
||||
* @generated SignedSource<<9a29546b80fe0ae4776de8cf81d600a3>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
// @ts-nocheck
|
||||
|
||||
import { ConcreteRequest } from 'relay-runtime';
|
||||
export type UpdateApplicabilityStatementInput = {
|
||||
applicability: boolean;
|
||||
applicabilityStatementId: string;
|
||||
justification?: string | null | undefined;
|
||||
};
|
||||
export type EditControlDialogUpdateMutation$variables = {
|
||||
input: UpdateApplicabilityStatementInput;
|
||||
};
|
||||
export type EditControlDialogUpdateMutation$data = {
|
||||
readonly updateApplicabilityStatement: {
|
||||
readonly applicabilityStatement: {
|
||||
readonly applicability: boolean;
|
||||
readonly id: string;
|
||||
readonly justification: string;
|
||||
};
|
||||
};
|
||||
};
|
||||
export type EditControlDialogUpdateMutation = {
|
||||
response: EditControlDialogUpdateMutation$data;
|
||||
variables: EditControlDialogUpdateMutation$variables;
|
||||
};
|
||||
|
||||
const node: ConcreteRequest = (function(){
|
||||
var v0 = [
|
||||
{
|
||||
"defaultValue": null,
|
||||
"kind": "LocalArgument",
|
||||
"name": "input"
|
||||
}
|
||||
],
|
||||
v1 = [
|
||||
{
|
||||
"alias": null,
|
||||
"args": [
|
||||
{
|
||||
"kind": "Variable",
|
||||
"name": "input",
|
||||
"variableName": "input"
|
||||
}
|
||||
],
|
||||
"concreteType": "UpdateApplicabilityStatementPayload",
|
||||
"kind": "LinkedField",
|
||||
"name": "updateApplicabilityStatement",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "ApplicabilityStatement",
|
||||
"kind": "LinkedField",
|
||||
"name": "applicabilityStatement",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "id",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "applicability",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "justification",
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
];
|
||||
return {
|
||||
"fragment": {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "EditControlDialogUpdateMutation",
|
||||
"selections": (v1/*: any*/),
|
||||
"type": "Mutation",
|
||||
"abstractKey": null
|
||||
},
|
||||
"kind": "Request",
|
||||
"operation": {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Operation",
|
||||
"name": "EditControlDialogUpdateMutation",
|
||||
"selections": (v1/*: any*/)
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "eaddaf695c16db04636c4d8a79ce6346",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "EditControlDialogUpdateMutation",
|
||||
"operationKind": "mutation",
|
||||
"text": "mutation EditControlDialogUpdateMutation(\n $input: UpdateApplicabilityStatementInput!\n) {\n updateApplicabilityStatement(input: $input) {\n applicabilityStatement {\n id\n applicability\n justification\n }\n }\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "51acae7db47e2eac1afd6a677abca126";
|
||||
|
||||
export default node;
|
||||
@@ -1,237 +0,0 @@
|
||||
/**
|
||||
* @generated SignedSource<<6798ad28a0faeedef40b1b0a89f7563e>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
// @ts-nocheck
|
||||
|
||||
import { ConcreteRequest } from 'relay-runtime';
|
||||
import { FragmentRefs } from "relay-runtime";
|
||||
export type CreateStateOfApplicabilityControlMappingInput = {
|
||||
applicability: boolean;
|
||||
controlId: string;
|
||||
justification?: string | null | undefined;
|
||||
stateOfApplicabilityId: string;
|
||||
};
|
||||
export type FrameworkControlPageAttachStateOfApplicabilityMutation$variables = {
|
||||
connections: ReadonlyArray<string>;
|
||||
input: CreateStateOfApplicabilityControlMappingInput;
|
||||
};
|
||||
export type FrameworkControlPageAttachStateOfApplicabilityMutation$data = {
|
||||
readonly createStateOfApplicabilityControlMapping: {
|
||||
readonly stateOfApplicabilityControlEdge: {
|
||||
readonly node: {
|
||||
readonly id: string;
|
||||
readonly " $fragmentSpreads": FragmentRefs<"LinkedStatesOfApplicabilityCardFragment">;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
export type FrameworkControlPageAttachStateOfApplicabilityMutation = {
|
||||
response: FrameworkControlPageAttachStateOfApplicabilityMutation$data;
|
||||
variables: FrameworkControlPageAttachStateOfApplicabilityMutation$variables;
|
||||
};
|
||||
|
||||
const node: ConcreteRequest = (function(){
|
||||
var v0 = {
|
||||
"defaultValue": null,
|
||||
"kind": "LocalArgument",
|
||||
"name": "connections"
|
||||
},
|
||||
v1 = {
|
||||
"defaultValue": null,
|
||||
"kind": "LocalArgument",
|
||||
"name": "input"
|
||||
},
|
||||
v2 = [
|
||||
{
|
||||
"kind": "Variable",
|
||||
"name": "input",
|
||||
"variableName": "input"
|
||||
}
|
||||
],
|
||||
v3 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "id",
|
||||
"storageKey": null
|
||||
};
|
||||
return {
|
||||
"fragment": {
|
||||
"argumentDefinitions": [
|
||||
(v0/*: any*/),
|
||||
(v1/*: any*/)
|
||||
],
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "FrameworkControlPageAttachStateOfApplicabilityMutation",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v2/*: any*/),
|
||||
"concreteType": "CreateStateOfApplicabilityControlMappingPayload",
|
||||
"kind": "LinkedField",
|
||||
"name": "createStateOfApplicabilityControlMapping",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "StateOfApplicabilityControlEdge",
|
||||
"kind": "LinkedField",
|
||||
"name": "stateOfApplicabilityControlEdge",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "StateOfApplicabilityControl",
|
||||
"kind": "LinkedField",
|
||||
"name": "node",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v3/*: any*/),
|
||||
{
|
||||
"args": null,
|
||||
"kind": "FragmentSpread",
|
||||
"name": "LinkedStatesOfApplicabilityCardFragment"
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"type": "Mutation",
|
||||
"abstractKey": null
|
||||
},
|
||||
"kind": "Request",
|
||||
"operation": {
|
||||
"argumentDefinitions": [
|
||||
(v1/*: any*/),
|
||||
(v0/*: any*/)
|
||||
],
|
||||
"kind": "Operation",
|
||||
"name": "FrameworkControlPageAttachStateOfApplicabilityMutation",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v2/*: any*/),
|
||||
"concreteType": "CreateStateOfApplicabilityControlMappingPayload",
|
||||
"kind": "LinkedField",
|
||||
"name": "createStateOfApplicabilityControlMapping",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "StateOfApplicabilityControlEdge",
|
||||
"kind": "LinkedField",
|
||||
"name": "stateOfApplicabilityControlEdge",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "StateOfApplicabilityControl",
|
||||
"kind": "LinkedField",
|
||||
"name": "node",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v3/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "stateOfApplicabilityId",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "controlId",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "StateOfApplicability",
|
||||
"kind": "LinkedField",
|
||||
"name": "stateOfApplicability",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v3/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "name",
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "applicability",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "justification",
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"filters": null,
|
||||
"handle": "prependEdge",
|
||||
"key": "",
|
||||
"kind": "LinkedHandle",
|
||||
"name": "stateOfApplicabilityControlEdge",
|
||||
"handleArgs": [
|
||||
{
|
||||
"kind": "Variable",
|
||||
"name": "connections",
|
||||
"variableName": "connections"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
]
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "205bc4f133e268c943ef9df9881350f0",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "FrameworkControlPageAttachStateOfApplicabilityMutation",
|
||||
"operationKind": "mutation",
|
||||
"text": "mutation FrameworkControlPageAttachStateOfApplicabilityMutation(\n $input: CreateStateOfApplicabilityControlMappingInput!\n) {\n createStateOfApplicabilityControlMapping(input: $input) {\n stateOfApplicabilityControlEdge {\n node {\n id\n ...LinkedStatesOfApplicabilityCardFragment\n }\n }\n }\n}\n\nfragment LinkedStatesOfApplicabilityCardFragment on StateOfApplicabilityControl {\n id\n stateOfApplicabilityId\n controlId\n stateOfApplicability {\n id\n name\n }\n applicability\n justification\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "8da7bd1e22eb2eaf857a4e97cea47e90";
|
||||
|
||||
export default node;
|
||||
@@ -1,153 +0,0 @@
|
||||
/**
|
||||
* @generated SignedSource<<b5ac3d2a6151aa858185089d6d979a34>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
// @ts-nocheck
|
||||
|
||||
import { ConcreteRequest } from 'relay-runtime';
|
||||
export type DeleteStateOfApplicabilityControlMappingInput = {
|
||||
controlId: string;
|
||||
stateOfApplicabilityId: string;
|
||||
};
|
||||
export type FrameworkControlPageDetachStateOfApplicabilityMutation$variables = {
|
||||
connections: ReadonlyArray<string>;
|
||||
input: DeleteStateOfApplicabilityControlMappingInput;
|
||||
};
|
||||
export type FrameworkControlPageDetachStateOfApplicabilityMutation$data = {
|
||||
readonly deleteStateOfApplicabilityControlMapping: {
|
||||
readonly deletedControlId: string;
|
||||
readonly deletedStateOfApplicabilityControlId: string;
|
||||
readonly deletedStateOfApplicabilityId: string;
|
||||
};
|
||||
};
|
||||
export type FrameworkControlPageDetachStateOfApplicabilityMutation = {
|
||||
response: FrameworkControlPageDetachStateOfApplicabilityMutation$data;
|
||||
variables: FrameworkControlPageDetachStateOfApplicabilityMutation$variables;
|
||||
};
|
||||
|
||||
const node: ConcreteRequest = (function(){
|
||||
var v0 = {
|
||||
"defaultValue": null,
|
||||
"kind": "LocalArgument",
|
||||
"name": "connections"
|
||||
},
|
||||
v1 = {
|
||||
"defaultValue": null,
|
||||
"kind": "LocalArgument",
|
||||
"name": "input"
|
||||
},
|
||||
v2 = [
|
||||
{
|
||||
"kind": "Variable",
|
||||
"name": "input",
|
||||
"variableName": "input"
|
||||
}
|
||||
],
|
||||
v3 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "deletedStateOfApplicabilityId",
|
||||
"storageKey": null
|
||||
},
|
||||
v4 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "deletedControlId",
|
||||
"storageKey": null
|
||||
},
|
||||
v5 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "deletedStateOfApplicabilityControlId",
|
||||
"storageKey": null
|
||||
};
|
||||
return {
|
||||
"fragment": {
|
||||
"argumentDefinitions": [
|
||||
(v0/*: any*/),
|
||||
(v1/*: any*/)
|
||||
],
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "FrameworkControlPageDetachStateOfApplicabilityMutation",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v2/*: any*/),
|
||||
"concreteType": "DeleteStateOfApplicabilityControlMappingPayload",
|
||||
"kind": "LinkedField",
|
||||
"name": "deleteStateOfApplicabilityControlMapping",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v3/*: any*/),
|
||||
(v4/*: any*/),
|
||||
(v5/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"type": "Mutation",
|
||||
"abstractKey": null
|
||||
},
|
||||
"kind": "Request",
|
||||
"operation": {
|
||||
"argumentDefinitions": [
|
||||
(v1/*: any*/),
|
||||
(v0/*: any*/)
|
||||
],
|
||||
"kind": "Operation",
|
||||
"name": "FrameworkControlPageDetachStateOfApplicabilityMutation",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v2/*: any*/),
|
||||
"concreteType": "DeleteStateOfApplicabilityControlMappingPayload",
|
||||
"kind": "LinkedField",
|
||||
"name": "deleteStateOfApplicabilityControlMapping",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v3/*: any*/),
|
||||
(v4/*: any*/),
|
||||
(v5/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"filters": null,
|
||||
"handle": "deleteEdge",
|
||||
"key": "",
|
||||
"kind": "ScalarHandle",
|
||||
"name": "deletedStateOfApplicabilityControlId",
|
||||
"handleArgs": [
|
||||
{
|
||||
"kind": "Variable",
|
||||
"name": "connections",
|
||||
"variableName": "connections"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
]
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "f0ec8162516546b2cdd221c0c9832908",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "FrameworkControlPageDetachStateOfApplicabilityMutation",
|
||||
"operationKind": "mutation",
|
||||
"text": "mutation FrameworkControlPageDetachStateOfApplicabilityMutation(\n $input: DeleteStateOfApplicabilityControlMappingInput!\n) {\n deleteStateOfApplicabilityControlMapping(input: $input) {\n deletedStateOfApplicabilityId\n deletedControlId\n deletedStateOfApplicabilityControlId\n }\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "f1a4efbd039ed9f457905903df50a160";
|
||||
|
||||
export default node;
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @generated SignedSource<<194328b415c68a01a447d4646639b3c0>>
|
||||
* @generated SignedSource<<482fcc03a3fd95b31f5d574a1b03a84c>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
@@ -30,14 +30,12 @@ export type FrameworkGraphControlNodeQuery$data = {
|
||||
readonly canCreateMeasureMapping?: boolean;
|
||||
readonly canCreateObligationMapping?: boolean;
|
||||
readonly canCreateSnapshotMapping?: boolean;
|
||||
readonly canCreateStateOfApplicabilityMapping?: boolean;
|
||||
readonly canDelete?: boolean;
|
||||
readonly canDeleteAuditMapping?: boolean;
|
||||
readonly canDeleteDocumentMapping?: boolean;
|
||||
readonly canDeleteMeasureMapping?: boolean;
|
||||
readonly canDeleteObligationMapping?: boolean;
|
||||
readonly canDeleteSnapshotMapping?: boolean;
|
||||
readonly canDeleteStateOfApplicabilityMapping?: boolean;
|
||||
readonly canUpdate?: boolean;
|
||||
readonly description?: string | null | undefined;
|
||||
readonly documents?: {
|
||||
@@ -80,15 +78,6 @@ export type FrameworkGraphControlNodeQuery$data = {
|
||||
};
|
||||
}>;
|
||||
};
|
||||
readonly stateOfApplicabilityControls?: {
|
||||
readonly __id: string;
|
||||
readonly edges: ReadonlyArray<{
|
||||
readonly node: {
|
||||
readonly id: string;
|
||||
readonly " $fragmentSpreads": FragmentRefs<"LinkedStatesOfApplicabilityCardFragment">;
|
||||
};
|
||||
}>;
|
||||
};
|
||||
readonly status?: ControlStatus;
|
||||
readonly " $fragmentSpreads": FragmentRefs<"FrameworkControlDialogFragment">;
|
||||
};
|
||||
@@ -286,32 +275,6 @@ v17 = {
|
||||
"storageKey": "permission(action:\"core:control:delete-snapshot-mapping\")"
|
||||
},
|
||||
v18 = {
|
||||
"alias": "canCreateStateOfApplicabilityMapping",
|
||||
"args": [
|
||||
{
|
||||
"kind": "Literal",
|
||||
"name": "action",
|
||||
"value": "core:control:state-of-applicability-control-mapping:create"
|
||||
}
|
||||
],
|
||||
"kind": "ScalarField",
|
||||
"name": "permission",
|
||||
"storageKey": "permission(action:\"core:control:state-of-applicability-control-mapping:create\")"
|
||||
},
|
||||
v19 = {
|
||||
"alias": "canDeleteStateOfApplicabilityMapping",
|
||||
"args": [
|
||||
{
|
||||
"kind": "Literal",
|
||||
"name": "action",
|
||||
"value": "core:control:state-of-applicability-control-mapping:delete"
|
||||
}
|
||||
],
|
||||
"kind": "ScalarField",
|
||||
"name": "permission",
|
||||
"storageKey": "permission(action:\"core:control:state-of-applicability-control-mapping:delete\")"
|
||||
},
|
||||
v20 = {
|
||||
"alias": "canCreateObligationMapping",
|
||||
"args": [
|
||||
{
|
||||
@@ -324,7 +287,7 @@ v20 = {
|
||||
"name": "permission",
|
||||
"storageKey": "permission(action:\"core:control:obligation-control-mapping:create\")"
|
||||
},
|
||||
v21 = {
|
||||
v19 = {
|
||||
"alias": "canDeleteObligationMapping",
|
||||
"args": [
|
||||
{
|
||||
@@ -337,21 +300,21 @@ v21 = {
|
||||
"name": "permission",
|
||||
"storageKey": "permission(action:\"core:control:obligation-control-mapping:delete\")"
|
||||
},
|
||||
v22 = {
|
||||
v20 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "__typename",
|
||||
"storageKey": null
|
||||
},
|
||||
v23 = {
|
||||
v21 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "cursor",
|
||||
"storageKey": null
|
||||
},
|
||||
v24 = {
|
||||
v22 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "PageInfo",
|
||||
@@ -376,7 +339,7 @@ v24 = {
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
v25 = {
|
||||
v23 = {
|
||||
"kind": "ClientExtension",
|
||||
"selections": [
|
||||
{
|
||||
@@ -388,25 +351,21 @@ v25 = {
|
||||
}
|
||||
]
|
||||
},
|
||||
v26 = [
|
||||
v24 = [
|
||||
{
|
||||
"kind": "Literal",
|
||||
"name": "first",
|
||||
"value": 100
|
||||
}
|
||||
],
|
||||
v27 = [
|
||||
(v2/*: any*/),
|
||||
(v3/*: any*/)
|
||||
],
|
||||
v28 = {
|
||||
v25 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "state",
|
||||
"storageKey": null
|
||||
},
|
||||
v29 = {
|
||||
v26 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
@@ -449,56 +408,11 @@ return {
|
||||
(v17/*: any*/),
|
||||
(v18/*: any*/),
|
||||
(v19/*: any*/),
|
||||
(v20/*: any*/),
|
||||
(v21/*: any*/),
|
||||
{
|
||||
"args": null,
|
||||
"kind": "FragmentSpread",
|
||||
"name": "FrameworkControlDialogFragment"
|
||||
},
|
||||
{
|
||||
"alias": "stateOfApplicabilityControls",
|
||||
"args": null,
|
||||
"concreteType": "StateOfApplicabilityControlConnection",
|
||||
"kind": "LinkedField",
|
||||
"name": "__FrameworkGraphControl_stateOfApplicabilityControls_connection",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "StateOfApplicabilityControlEdge",
|
||||
"kind": "LinkedField",
|
||||
"name": "edges",
|
||||
"plural": true,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "StateOfApplicabilityControl",
|
||||
"kind": "LinkedField",
|
||||
"name": "node",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v2/*: any*/),
|
||||
{
|
||||
"args": null,
|
||||
"kind": "FragmentSpread",
|
||||
"name": "LinkedStatesOfApplicabilityCardFragment"
|
||||
},
|
||||
(v22/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
(v23/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
(v24/*: any*/),
|
||||
(v25/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": "measures",
|
||||
"args": null,
|
||||
@@ -529,16 +443,16 @@ return {
|
||||
"kind": "FragmentSpread",
|
||||
"name": "LinkedMeasuresCardFragment"
|
||||
},
|
||||
(v22/*: any*/)
|
||||
(v20/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
(v23/*: any*/)
|
||||
(v21/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
(v24/*: any*/),
|
||||
(v25/*: any*/)
|
||||
(v22/*: any*/),
|
||||
(v23/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
@@ -572,16 +486,16 @@ return {
|
||||
"kind": "FragmentSpread",
|
||||
"name": "LinkedDocumentsCardFragment"
|
||||
},
|
||||
(v22/*: any*/)
|
||||
(v20/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
(v23/*: any*/)
|
||||
(v21/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
(v24/*: any*/),
|
||||
(v25/*: any*/)
|
||||
(v22/*: any*/),
|
||||
(v23/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
@@ -615,16 +529,16 @@ return {
|
||||
"kind": "FragmentSpread",
|
||||
"name": "LinkedAuditsCardFragment"
|
||||
},
|
||||
(v22/*: any*/)
|
||||
(v20/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
(v23/*: any*/)
|
||||
(v21/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
(v24/*: any*/),
|
||||
(v25/*: any*/)
|
||||
(v22/*: any*/),
|
||||
(v23/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
@@ -658,16 +572,16 @@ return {
|
||||
"kind": "FragmentSpread",
|
||||
"name": "LinkedObligationsCardFragment"
|
||||
},
|
||||
(v22/*: any*/)
|
||||
(v20/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
(v23/*: any*/)
|
||||
(v21/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
(v24/*: any*/),
|
||||
(v25/*: any*/)
|
||||
(v22/*: any*/),
|
||||
(v23/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
@@ -701,16 +615,16 @@ return {
|
||||
"kind": "FragmentSpread",
|
||||
"name": "LinkedSnapshotsCardFragment"
|
||||
},
|
||||
(v22/*: any*/)
|
||||
(v20/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
(v23/*: any*/)
|
||||
(v21/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
(v24/*: any*/),
|
||||
(v25/*: any*/)
|
||||
(v22/*: any*/),
|
||||
(v23/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
@@ -739,7 +653,7 @@ return {
|
||||
"name": "node",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v22/*: any*/),
|
||||
(v20/*: any*/),
|
||||
(v2/*: any*/),
|
||||
{
|
||||
"kind": "InlineFragment",
|
||||
@@ -761,8 +675,6 @@ return {
|
||||
(v17/*: any*/),
|
||||
(v18/*: any*/),
|
||||
(v19/*: any*/),
|
||||
(v20/*: any*/),
|
||||
(v21/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
@@ -772,92 +684,7 @@ return {
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v26/*: any*/),
|
||||
"concreteType": "StateOfApplicabilityControlConnection",
|
||||
"kind": "LinkedField",
|
||||
"name": "stateOfApplicabilityControls",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "StateOfApplicabilityControlEdge",
|
||||
"kind": "LinkedField",
|
||||
"name": "edges",
|
||||
"plural": true,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "StateOfApplicabilityControl",
|
||||
"kind": "LinkedField",
|
||||
"name": "node",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v2/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "stateOfApplicabilityId",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "controlId",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "StateOfApplicability",
|
||||
"kind": "LinkedField",
|
||||
"name": "stateOfApplicability",
|
||||
"plural": false,
|
||||
"selections": (v27/*: any*/),
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "applicability",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "justification",
|
||||
"storageKey": null
|
||||
},
|
||||
(v22/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
(v23/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
(v24/*: any*/),
|
||||
(v25/*: any*/)
|
||||
],
|
||||
"storageKey": "stateOfApplicabilityControls(first:100)"
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v26/*: any*/),
|
||||
"filters": null,
|
||||
"handle": "connection",
|
||||
"key": "FrameworkGraphControl_stateOfApplicabilityControls",
|
||||
"kind": "LinkedHandle",
|
||||
"name": "stateOfApplicabilityControls"
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v26/*: any*/),
|
||||
"args": (v24/*: any*/),
|
||||
"concreteType": "MeasureConnection",
|
||||
"kind": "LinkedField",
|
||||
"name": "measures",
|
||||
@@ -881,23 +708,23 @@ return {
|
||||
"selections": [
|
||||
(v2/*: any*/),
|
||||
(v3/*: any*/),
|
||||
(v28/*: any*/),
|
||||
(v22/*: any*/)
|
||||
(v25/*: any*/),
|
||||
(v20/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
(v23/*: any*/)
|
||||
(v21/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
(v24/*: any*/),
|
||||
(v25/*: any*/)
|
||||
(v22/*: any*/),
|
||||
(v23/*: any*/)
|
||||
],
|
||||
"storageKey": "measures(first:100)"
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v26/*: any*/),
|
||||
"args": (v24/*: any*/),
|
||||
"filters": null,
|
||||
"handle": "connection",
|
||||
"key": "FrameworkGraphControl_measures",
|
||||
@@ -906,7 +733,7 @@ return {
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v26/*: any*/),
|
||||
"args": (v24/*: any*/),
|
||||
"concreteType": "DocumentConnection",
|
||||
"kind": "LinkedField",
|
||||
"name": "documents",
|
||||
@@ -936,7 +763,7 @@ return {
|
||||
"name": "title",
|
||||
"storageKey": null
|
||||
},
|
||||
(v29/*: any*/),
|
||||
(v26/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
@@ -985,22 +812,22 @@ return {
|
||||
],
|
||||
"storageKey": "versions(first:1)"
|
||||
},
|
||||
(v22/*: any*/)
|
||||
(v20/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
(v23/*: any*/)
|
||||
(v21/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
(v24/*: any*/),
|
||||
(v25/*: any*/)
|
||||
(v22/*: any*/),
|
||||
(v23/*: any*/)
|
||||
],
|
||||
"storageKey": "documents(first:100)"
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v26/*: any*/),
|
||||
"args": (v24/*: any*/),
|
||||
"filters": null,
|
||||
"handle": "connection",
|
||||
"key": "FrameworkGraphControl_documents",
|
||||
@@ -1009,7 +836,7 @@ return {
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v26/*: any*/),
|
||||
"args": (v24/*: any*/),
|
||||
"concreteType": "AuditConnection",
|
||||
"kind": "LinkedField",
|
||||
"name": "audits",
|
||||
@@ -1033,8 +860,8 @@ return {
|
||||
"selections": [
|
||||
(v2/*: any*/),
|
||||
(v3/*: any*/),
|
||||
(v29/*: any*/),
|
||||
(v28/*: any*/),
|
||||
(v26/*: any*/),
|
||||
(v25/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
@@ -1056,25 +883,28 @@ return {
|
||||
"kind": "LinkedField",
|
||||
"name": "framework",
|
||||
"plural": false,
|
||||
"selections": (v27/*: any*/),
|
||||
"selections": [
|
||||
(v2/*: any*/),
|
||||
(v3/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
(v22/*: any*/)
|
||||
(v20/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
(v23/*: any*/)
|
||||
(v21/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
(v24/*: any*/),
|
||||
(v25/*: any*/)
|
||||
(v22/*: any*/),
|
||||
(v23/*: any*/)
|
||||
],
|
||||
"storageKey": "audits(first:100)"
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v26/*: any*/),
|
||||
"args": (v24/*: any*/),
|
||||
"filters": null,
|
||||
"handle": "connection",
|
||||
"key": "FrameworkGraphControl_audits",
|
||||
@@ -1083,7 +913,7 @@ return {
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v26/*: any*/),
|
||||
"args": (v24/*: any*/),
|
||||
"concreteType": "ObligationConnection",
|
||||
"kind": "LinkedField",
|
||||
"name": "obligations",
|
||||
@@ -1147,22 +977,22 @@ return {
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
(v22/*: any*/)
|
||||
(v20/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
(v23/*: any*/)
|
||||
(v21/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
(v24/*: any*/),
|
||||
(v25/*: any*/)
|
||||
(v22/*: any*/),
|
||||
(v23/*: any*/)
|
||||
],
|
||||
"storageKey": "obligations(first:100)"
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v26/*: any*/),
|
||||
"args": (v24/*: any*/),
|
||||
"filters": null,
|
||||
"handle": "connection",
|
||||
"key": "FrameworkGraphControl_obligations",
|
||||
@@ -1171,7 +1001,7 @@ return {
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v26/*: any*/),
|
||||
"args": (v24/*: any*/),
|
||||
"concreteType": "SnapshotConnection",
|
||||
"kind": "LinkedField",
|
||||
"name": "snapshots",
|
||||
@@ -1203,23 +1033,23 @@ return {
|
||||
"name": "type",
|
||||
"storageKey": null
|
||||
},
|
||||
(v29/*: any*/),
|
||||
(v22/*: any*/)
|
||||
(v26/*: any*/),
|
||||
(v20/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
(v23/*: any*/)
|
||||
(v21/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
(v24/*: any*/),
|
||||
(v25/*: any*/)
|
||||
(v22/*: any*/),
|
||||
(v23/*: any*/)
|
||||
],
|
||||
"storageKey": "snapshots(first:100)"
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v26/*: any*/),
|
||||
"args": (v24/*: any*/),
|
||||
"filters": null,
|
||||
"handle": "connection",
|
||||
"key": "FrameworkGraphControl_snapshots",
|
||||
@@ -1236,19 +1066,10 @@ return {
|
||||
]
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "83f936f5dced0f50c645aa6ef30efedc",
|
||||
"cacheID": "edefbc65624dd3df20c5769b4294c010",
|
||||
"id": null,
|
||||
"metadata": {
|
||||
"connection": [
|
||||
{
|
||||
"count": null,
|
||||
"cursor": null,
|
||||
"direction": "forward",
|
||||
"path": [
|
||||
"node",
|
||||
"stateOfApplicabilityControls"
|
||||
]
|
||||
},
|
||||
{
|
||||
"count": null,
|
||||
"cursor": null,
|
||||
@@ -1298,11 +1119,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 canCreateStateOfApplicabilityMapping: permission(action: \"core:control:state-of-applicability-control-mapping:create\")\n canDeleteStateOfApplicabilityMapping: permission(action: \"core:control:state-of-applicability-control-mapping:delete\")\n canCreateObligationMapping: permission(action: \"core:control:obligation-control-mapping:create\")\n canDeleteObligationMapping: permission(action: \"core:control:obligation-control-mapping:delete\")\n ...FrameworkControlDialogFragment\n stateOfApplicabilityControls(first: 100) {\n edges {\n node {\n id\n ...LinkedStatesOfApplicabilityCardFragment\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n }\n }\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\nfragment LinkedStatesOfApplicabilityCardFragment on StateOfApplicabilityControl {\n id\n stateOfApplicabilityId\n controlId\n stateOfApplicability {\n id\n name\n }\n applicability\n justification\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 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:obligation-control-mapping:create\")\n canDeleteObligationMapping: permission(action: \"core:control:obligation-control-mapping:delete\")\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"
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "755f62f220b1a05bf44dd770974691a9";
|
||||
(node as any).hash = "ba18479101d48704a9c2006372e605bb";
|
||||
|
||||
export default node;
|
||||
|
||||
@@ -1,194 +0,0 @@
|
||||
/**
|
||||
* @generated SignedSource<<ab6168a4560a52cdd137c9090c37dacc>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
// @ts-nocheck
|
||||
|
||||
import { ConcreteRequest } from 'relay-runtime';
|
||||
export type CreateStateOfApplicabilityControlMappingInput = {
|
||||
applicability: boolean;
|
||||
controlId: string;
|
||||
justification?: string | null | undefined;
|
||||
stateOfApplicabilityId: string;
|
||||
};
|
||||
export type LinkControlDialogLinkMutation$variables = {
|
||||
input: CreateStateOfApplicabilityControlMappingInput;
|
||||
};
|
||||
export type LinkControlDialogLinkMutation$data = {
|
||||
readonly createStateOfApplicabilityControlMapping: {
|
||||
readonly stateOfApplicabilityControlEdge: {
|
||||
readonly node: {
|
||||
readonly applicability: boolean;
|
||||
readonly controlId: string;
|
||||
readonly justification: string | null | undefined;
|
||||
readonly stateOfApplicabilityId: string;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
export type LinkControlDialogLinkMutation = {
|
||||
response: LinkControlDialogLinkMutation$data;
|
||||
variables: LinkControlDialogLinkMutation$variables;
|
||||
};
|
||||
|
||||
const node: ConcreteRequest = (function(){
|
||||
var v0 = [
|
||||
{
|
||||
"defaultValue": null,
|
||||
"kind": "LocalArgument",
|
||||
"name": "input"
|
||||
}
|
||||
],
|
||||
v1 = [
|
||||
{
|
||||
"kind": "Variable",
|
||||
"name": "input",
|
||||
"variableName": "input"
|
||||
}
|
||||
],
|
||||
v2 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "stateOfApplicabilityId",
|
||||
"storageKey": null
|
||||
},
|
||||
v3 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "controlId",
|
||||
"storageKey": null
|
||||
},
|
||||
v4 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "applicability",
|
||||
"storageKey": null
|
||||
},
|
||||
v5 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "justification",
|
||||
"storageKey": null
|
||||
};
|
||||
return {
|
||||
"fragment": {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "LinkControlDialogLinkMutation",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v1/*: any*/),
|
||||
"concreteType": "CreateStateOfApplicabilityControlMappingPayload",
|
||||
"kind": "LinkedField",
|
||||
"name": "createStateOfApplicabilityControlMapping",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "StateOfApplicabilityControlEdge",
|
||||
"kind": "LinkedField",
|
||||
"name": "stateOfApplicabilityControlEdge",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "StateOfApplicabilityControl",
|
||||
"kind": "LinkedField",
|
||||
"name": "node",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v2/*: any*/),
|
||||
(v3/*: any*/),
|
||||
(v4/*: any*/),
|
||||
(v5/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"type": "Mutation",
|
||||
"abstractKey": null
|
||||
},
|
||||
"kind": "Request",
|
||||
"operation": {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Operation",
|
||||
"name": "LinkControlDialogLinkMutation",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v1/*: any*/),
|
||||
"concreteType": "CreateStateOfApplicabilityControlMappingPayload",
|
||||
"kind": "LinkedField",
|
||||
"name": "createStateOfApplicabilityControlMapping",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "StateOfApplicabilityControlEdge",
|
||||
"kind": "LinkedField",
|
||||
"name": "stateOfApplicabilityControlEdge",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "StateOfApplicabilityControl",
|
||||
"kind": "LinkedField",
|
||||
"name": "node",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v2/*: any*/),
|
||||
(v3/*: any*/),
|
||||
(v4/*: any*/),
|
||||
(v5/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "id",
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
]
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "59e215d4f18e0429cbf813aae4db8c94",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "LinkControlDialogLinkMutation",
|
||||
"operationKind": "mutation",
|
||||
"text": "mutation LinkControlDialogLinkMutation(\n $input: CreateStateOfApplicabilityControlMappingInput!\n) {\n createStateOfApplicabilityControlMapping(input: $input) {\n stateOfApplicabilityControlEdge {\n node {\n stateOfApplicabilityId\n controlId\n applicability\n justification\n id\n }\n }\n }\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "47757e096c6beeba6be6290a2154f841";
|
||||
|
||||
export default node;
|
||||
@@ -1,211 +0,0 @@
|
||||
/**
|
||||
* @generated SignedSource<<feca91fd2418eba0f5714a2c76346d08>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
// @ts-nocheck
|
||||
|
||||
import { ConcreteRequest } from 'relay-runtime';
|
||||
export type LinkControlDialogQuery$variables = {
|
||||
stateOfApplicabilityId: string;
|
||||
};
|
||||
export type LinkControlDialogQuery$data = {
|
||||
readonly node: {
|
||||
readonly availableControls?: ReadonlyArray<{
|
||||
readonly applicability: boolean | null | undefined;
|
||||
readonly controlId: string;
|
||||
readonly frameworkId: string;
|
||||
readonly frameworkName: string;
|
||||
readonly justification: string | null | undefined;
|
||||
readonly name: string;
|
||||
readonly organizationId: string;
|
||||
readonly sectionTitle: string;
|
||||
readonly stateOfApplicabilityId: string | null | undefined;
|
||||
}>;
|
||||
readonly id?: string;
|
||||
};
|
||||
};
|
||||
export type LinkControlDialogQuery = {
|
||||
response: LinkControlDialogQuery$data;
|
||||
variables: LinkControlDialogQuery$variables;
|
||||
};
|
||||
|
||||
const node: ConcreteRequest = (function(){
|
||||
var v0 = [
|
||||
{
|
||||
"defaultValue": null,
|
||||
"kind": "LocalArgument",
|
||||
"name": "stateOfApplicabilityId"
|
||||
}
|
||||
],
|
||||
v1 = [
|
||||
{
|
||||
"kind": "Variable",
|
||||
"name": "id",
|
||||
"variableName": "stateOfApplicabilityId"
|
||||
}
|
||||
],
|
||||
v2 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "id",
|
||||
"storageKey": null
|
||||
},
|
||||
v3 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "AvailableStateOfApplicabilityControl",
|
||||
"kind": "LinkedField",
|
||||
"name": "availableControls",
|
||||
"plural": true,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "controlId",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "sectionTitle",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "name",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "frameworkId",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "frameworkName",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "organizationId",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "stateOfApplicabilityId",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "applicability",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "justification",
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
};
|
||||
return {
|
||||
"fragment": {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "LinkControlDialogQuery",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v1/*: any*/),
|
||||
"concreteType": null,
|
||||
"kind": "LinkedField",
|
||||
"name": "node",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"kind": "InlineFragment",
|
||||
"selections": [
|
||||
(v2/*: any*/),
|
||||
(v3/*: any*/)
|
||||
],
|
||||
"type": "StateOfApplicability",
|
||||
"abstractKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"type": "Query",
|
||||
"abstractKey": null
|
||||
},
|
||||
"kind": "Request",
|
||||
"operation": {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Operation",
|
||||
"name": "LinkControlDialogQuery",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v1/*: any*/),
|
||||
"concreteType": null,
|
||||
"kind": "LinkedField",
|
||||
"name": "node",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "__typename",
|
||||
"storageKey": null
|
||||
},
|
||||
(v2/*: any*/),
|
||||
{
|
||||
"kind": "InlineFragment",
|
||||
"selections": [
|
||||
(v3/*: any*/)
|
||||
],
|
||||
"type": "StateOfApplicability",
|
||||
"abstractKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
]
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "a0d70e15a1236fe0e8626e685ea16a15",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "LinkControlDialogQuery",
|
||||
"operationKind": "query",
|
||||
"text": "query LinkControlDialogQuery(\n $stateOfApplicabilityId: ID!\n) {\n node(id: $stateOfApplicabilityId) {\n __typename\n ... on StateOfApplicability {\n id\n availableControls {\n controlId\n sectionTitle\n name\n frameworkId\n frameworkName\n organizationId\n stateOfApplicabilityId\n applicability\n justification\n }\n }\n id\n }\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "26daf3c064517bdbbf025da7ce5fc30f";
|
||||
|
||||
export default node;
|
||||
@@ -1,109 +0,0 @@
|
||||
/**
|
||||
* @generated SignedSource<<3bb4d04e228ac7dbda8ebfb8b7c2567f>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
// @ts-nocheck
|
||||
|
||||
import { ConcreteRequest } from 'relay-runtime';
|
||||
export type DeleteStateOfApplicabilityControlMappingInput = {
|
||||
controlId: string;
|
||||
stateOfApplicabilityId: string;
|
||||
};
|
||||
export type LinkControlDialogUnlinkMutation$variables = {
|
||||
input: DeleteStateOfApplicabilityControlMappingInput;
|
||||
};
|
||||
export type LinkControlDialogUnlinkMutation$data = {
|
||||
readonly deleteStateOfApplicabilityControlMapping: {
|
||||
readonly deletedControlId: string;
|
||||
readonly deletedStateOfApplicabilityControlId: string;
|
||||
readonly deletedStateOfApplicabilityId: string;
|
||||
};
|
||||
};
|
||||
export type LinkControlDialogUnlinkMutation = {
|
||||
response: LinkControlDialogUnlinkMutation$data;
|
||||
variables: LinkControlDialogUnlinkMutation$variables;
|
||||
};
|
||||
|
||||
const node: ConcreteRequest = (function(){
|
||||
var v0 = [
|
||||
{
|
||||
"defaultValue": null,
|
||||
"kind": "LocalArgument",
|
||||
"name": "input"
|
||||
}
|
||||
],
|
||||
v1 = [
|
||||
{
|
||||
"alias": null,
|
||||
"args": [
|
||||
{
|
||||
"kind": "Variable",
|
||||
"name": "input",
|
||||
"variableName": "input"
|
||||
}
|
||||
],
|
||||
"concreteType": "DeleteStateOfApplicabilityControlMappingPayload",
|
||||
"kind": "LinkedField",
|
||||
"name": "deleteStateOfApplicabilityControlMapping",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "deletedStateOfApplicabilityId",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "deletedControlId",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "deletedStateOfApplicabilityControlId",
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
];
|
||||
return {
|
||||
"fragment": {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "LinkControlDialogUnlinkMutation",
|
||||
"selections": (v1/*: any*/),
|
||||
"type": "Mutation",
|
||||
"abstractKey": null
|
||||
},
|
||||
"kind": "Request",
|
||||
"operation": {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Operation",
|
||||
"name": "LinkControlDialogUnlinkMutation",
|
||||
"selections": (v1/*: any*/)
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "766d15d5071197ed2907d876caf37995",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "LinkControlDialogUnlinkMutation",
|
||||
"operationKind": "mutation",
|
||||
"text": "mutation LinkControlDialogUnlinkMutation(\n $input: DeleteStateOfApplicabilityControlMappingInput!\n) {\n deleteStateOfApplicabilityControlMapping(input: $input) {\n deletedStateOfApplicabilityId\n deletedControlId\n deletedStateOfApplicabilityControlId\n }\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "a184d521b495bf3ff76796530e9eb0e1";
|
||||
|
||||
export default node;
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @generated SignedSource<<fa19c3e1b91d31188625e48b8b6db7e9>>
|
||||
* @generated SignedSource<<ab309c7bbc8e33d319f6edafe017e0e9>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
@@ -12,14 +12,15 @@ import { ReaderFragment } from 'relay-runtime';
|
||||
import { FragmentRefs } from "relay-runtime";
|
||||
export type LinkedStatesOfApplicabilityCardFragment$data = {
|
||||
readonly applicability: boolean;
|
||||
readonly controlId: string;
|
||||
readonly control: {
|
||||
readonly id: string;
|
||||
};
|
||||
readonly id: string;
|
||||
readonly justification: string | null | undefined;
|
||||
readonly justification: string;
|
||||
readonly stateOfApplicability: {
|
||||
readonly id: string;
|
||||
readonly name: string;
|
||||
};
|
||||
readonly stateOfApplicabilityId: string;
|
||||
readonly " $fragmentType": "LinkedStatesOfApplicabilityCardFragment";
|
||||
};
|
||||
export type LinkedStatesOfApplicabilityCardFragment$key = {
|
||||
@@ -42,20 +43,6 @@ return {
|
||||
"name": "LinkedStatesOfApplicabilityCardFragment",
|
||||
"selections": [
|
||||
(v0/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "stateOfApplicabilityId",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "controlId",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
@@ -75,6 +62,18 @@ return {
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "Control",
|
||||
"kind": "LinkedField",
|
||||
"name": "control",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v0/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
@@ -90,11 +89,11 @@ return {
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"type": "StateOfApplicabilityControl",
|
||||
"type": "ApplicabilityStatement",
|
||||
"abstractKey": null
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "b9a9922b27f277a769025f11b0829bdc";
|
||||
(node as any).hash = "92dc33d1e220b3433508e55cb05ea39a";
|
||||
|
||||
export default node;
|
||||
|
||||
132
apps/console/src/__generated__/core/StateOfApplicabilityControlsTabDeleteMutation.graphql.ts
generated
Normal file
132
apps/console/src/__generated__/core/StateOfApplicabilityControlsTabDeleteMutation.graphql.ts
generated
Normal file
@@ -0,0 +1,132 @@
|
||||
/**
|
||||
* @generated SignedSource<<efea63fc9ceccad58af05da557d0ac53>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
// @ts-nocheck
|
||||
|
||||
import { ConcreteRequest } from 'relay-runtime';
|
||||
export type DeleteApplicabilityStatementInput = {
|
||||
applicabilityStatementId: string;
|
||||
};
|
||||
export type StateOfApplicabilityControlsTabDeleteMutation$variables = {
|
||||
connections: ReadonlyArray<string>;
|
||||
input: DeleteApplicabilityStatementInput;
|
||||
};
|
||||
export type StateOfApplicabilityControlsTabDeleteMutation$data = {
|
||||
readonly deleteApplicabilityStatement: {
|
||||
readonly deletedApplicabilityStatementId: string;
|
||||
};
|
||||
};
|
||||
export type StateOfApplicabilityControlsTabDeleteMutation = {
|
||||
response: StateOfApplicabilityControlsTabDeleteMutation$data;
|
||||
variables: StateOfApplicabilityControlsTabDeleteMutation$variables;
|
||||
};
|
||||
|
||||
const node: ConcreteRequest = (function(){
|
||||
var v0 = {
|
||||
"defaultValue": null,
|
||||
"kind": "LocalArgument",
|
||||
"name": "connections"
|
||||
},
|
||||
v1 = {
|
||||
"defaultValue": null,
|
||||
"kind": "LocalArgument",
|
||||
"name": "input"
|
||||
},
|
||||
v2 = [
|
||||
{
|
||||
"kind": "Variable",
|
||||
"name": "input",
|
||||
"variableName": "input"
|
||||
}
|
||||
],
|
||||
v3 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "deletedApplicabilityStatementId",
|
||||
"storageKey": null
|
||||
};
|
||||
return {
|
||||
"fragment": {
|
||||
"argumentDefinitions": [
|
||||
(v0/*: any*/),
|
||||
(v1/*: any*/)
|
||||
],
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "StateOfApplicabilityControlsTabDeleteMutation",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v2/*: any*/),
|
||||
"concreteType": "DeleteApplicabilityStatementPayload",
|
||||
"kind": "LinkedField",
|
||||
"name": "deleteApplicabilityStatement",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v3/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"type": "Mutation",
|
||||
"abstractKey": null
|
||||
},
|
||||
"kind": "Request",
|
||||
"operation": {
|
||||
"argumentDefinitions": [
|
||||
(v1/*: any*/),
|
||||
(v0/*: any*/)
|
||||
],
|
||||
"kind": "Operation",
|
||||
"name": "StateOfApplicabilityControlsTabDeleteMutation",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v2/*: any*/),
|
||||
"concreteType": "DeleteApplicabilityStatementPayload",
|
||||
"kind": "LinkedField",
|
||||
"name": "deleteApplicabilityStatement",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v3/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"filters": null,
|
||||
"handle": "deleteEdge",
|
||||
"key": "",
|
||||
"kind": "ScalarHandle",
|
||||
"name": "deletedApplicabilityStatementId",
|
||||
"handleArgs": [
|
||||
{
|
||||
"kind": "Variable",
|
||||
"name": "connections",
|
||||
"variableName": "connections"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
]
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "427051073f5e747e828d282a773e4db6",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "StateOfApplicabilityControlsTabDeleteMutation",
|
||||
"operationKind": "mutation",
|
||||
"text": "mutation StateOfApplicabilityControlsTabDeleteMutation(\n $input: DeleteApplicabilityStatementInput!\n) {\n deleteApplicabilityStatement(input: $input) {\n deletedApplicabilityStatementId\n }\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "860e6ba50b4d8cfd9dd53416d5e3b710";
|
||||
|
||||
export default node;
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @generated SignedSource<<1e93345ca5370e4fdf20719ac86b8078>>
|
||||
* @generated SignedSource<<6a0d32b2293db5f05fee4b79e61db4b6>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
@@ -11,27 +11,39 @@
|
||||
import { ReaderFragment } from 'relay-runtime';
|
||||
import { FragmentRefs } from "relay-runtime";
|
||||
export type StateOfApplicabilityControlsTabFragment$data = {
|
||||
readonly availableControls: ReadonlyArray<{
|
||||
readonly applicability: boolean | null | undefined;
|
||||
readonly bestPractice: boolean;
|
||||
readonly contractual: boolean;
|
||||
readonly controlId: string;
|
||||
readonly frameworkId: string;
|
||||
readonly frameworkName: string;
|
||||
readonly justification: string | null | undefined;
|
||||
readonly name: string;
|
||||
readonly organizationId: string;
|
||||
readonly regulatory: boolean;
|
||||
readonly riskAssessment: boolean;
|
||||
readonly sectionTitle: string;
|
||||
readonly stateOfApplicabilityId: string | null | undefined;
|
||||
}>;
|
||||
readonly canCreateStateOfApplicabilityControlMapping: boolean;
|
||||
readonly canDeleteStateOfApplicabilityControlMapping: boolean;
|
||||
readonly controlsInfo: {
|
||||
readonly totalCount: number;
|
||||
readonly applicabilityStatements: {
|
||||
readonly __id: string;
|
||||
readonly edges: ReadonlyArray<{
|
||||
readonly node: {
|
||||
readonly applicability: boolean;
|
||||
readonly control: {
|
||||
readonly bestPractice: boolean;
|
||||
readonly contractual: boolean;
|
||||
readonly framework: {
|
||||
readonly id: string;
|
||||
readonly name: string;
|
||||
};
|
||||
readonly id: string;
|
||||
readonly name: string;
|
||||
readonly organization: {
|
||||
readonly id: string;
|
||||
} | null | undefined;
|
||||
readonly regulatory: boolean;
|
||||
readonly riskAssessment: boolean;
|
||||
readonly sectionTitle: string;
|
||||
};
|
||||
readonly id: string;
|
||||
readonly justification: string;
|
||||
};
|
||||
}>;
|
||||
};
|
||||
readonly canCreateApplicabilityStatement: boolean;
|
||||
readonly canDeleteApplicabilityStatement: boolean;
|
||||
readonly canUpdateApplicabilityStatement: boolean;
|
||||
readonly id: string;
|
||||
readonly organization: {
|
||||
readonly id: string;
|
||||
} | null | undefined;
|
||||
readonly " $fragmentType": "StateOfApplicabilityControlsTabFragment";
|
||||
};
|
||||
export type StateOfApplicabilityControlsTabFragment$key = {
|
||||
@@ -39,190 +51,267 @@ export type StateOfApplicabilityControlsTabFragment$key = {
|
||||
readonly " $fragmentSpreads": FragmentRefs<"StateOfApplicabilityControlsTabFragment">;
|
||||
};
|
||||
|
||||
import StateOfApplicabilityControlsTabRefetchQuery_graphql from './StateOfApplicabilityControlsTabRefetchQuery.graphql';
|
||||
|
||||
const node: ReaderFragment = {
|
||||
const node: ReaderFragment = (function(){
|
||||
var v0 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "id",
|
||||
"storageKey": null
|
||||
},
|
||||
v1 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "Organization",
|
||||
"kind": "LinkedField",
|
||||
"name": "organization",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v0/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
v2 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "name",
|
||||
"storageKey": null
|
||||
};
|
||||
return {
|
||||
"argumentDefinitions": [],
|
||||
"kind": "Fragment",
|
||||
"metadata": {
|
||||
"refetch": {
|
||||
"connection": null,
|
||||
"fragmentPathInResult": [
|
||||
"node"
|
||||
],
|
||||
"operation": StateOfApplicabilityControlsTabRefetchQuery_graphql,
|
||||
"identifierInfo": {
|
||||
"identifierField": "id",
|
||||
"identifierQueryVariableName": "id"
|
||||
"connection": [
|
||||
{
|
||||
"count": null,
|
||||
"cursor": null,
|
||||
"direction": "forward",
|
||||
"path": [
|
||||
"applicabilityStatements"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"name": "StateOfApplicabilityControlsTabFragment",
|
||||
"selections": [
|
||||
(v0/*: any*/),
|
||||
(v1/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "id",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": "controlsInfo",
|
||||
"alias": "canCreateApplicabilityStatement",
|
||||
"args": [
|
||||
{
|
||||
"kind": "Literal",
|
||||
"name": "first",
|
||||
"value": 0
|
||||
"name": "action",
|
||||
"value": "core:applicability-statement:create"
|
||||
}
|
||||
],
|
||||
"concreteType": "ControlConnection",
|
||||
"kind": "ScalarField",
|
||||
"name": "permission",
|
||||
"storageKey": "permission(action:\"core:applicability-statement:create\")"
|
||||
},
|
||||
{
|
||||
"alias": "canUpdateApplicabilityStatement",
|
||||
"args": [
|
||||
{
|
||||
"kind": "Literal",
|
||||
"name": "action",
|
||||
"value": "core:applicability-statement:update"
|
||||
}
|
||||
],
|
||||
"kind": "ScalarField",
|
||||
"name": "permission",
|
||||
"storageKey": "permission(action:\"core:applicability-statement:update\")"
|
||||
},
|
||||
{
|
||||
"alias": "canDeleteApplicabilityStatement",
|
||||
"args": [
|
||||
{
|
||||
"kind": "Literal",
|
||||
"name": "action",
|
||||
"value": "core:applicability-statement:delete"
|
||||
}
|
||||
],
|
||||
"kind": "ScalarField",
|
||||
"name": "permission",
|
||||
"storageKey": "permission(action:\"core:applicability-statement:delete\")"
|
||||
},
|
||||
{
|
||||
"alias": "applicabilityStatements",
|
||||
"args": [
|
||||
{
|
||||
"kind": "Literal",
|
||||
"name": "orderBy",
|
||||
"value": {
|
||||
"direction": "ASC",
|
||||
"field": "CREATED_AT"
|
||||
}
|
||||
}
|
||||
],
|
||||
"concreteType": "ApplicabilityStatementConnection",
|
||||
"kind": "LinkedField",
|
||||
"name": "controls",
|
||||
"name": "__StateOfApplicabilityControlsTab_applicabilityStatements_connection",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "totalCount",
|
||||
"concreteType": "ApplicabilityStatementEdge",
|
||||
"kind": "LinkedField",
|
||||
"name": "edges",
|
||||
"plural": true,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "ApplicabilityStatement",
|
||||
"kind": "LinkedField",
|
||||
"name": "node",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v0/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "applicability",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "justification",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "Control",
|
||||
"kind": "LinkedField",
|
||||
"name": "control",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v0/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "sectionTitle",
|
||||
"storageKey": null
|
||||
},
|
||||
(v2/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "bestPractice",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "regulatory",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "contractual",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "riskAssessment",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "Framework",
|
||||
"kind": "LinkedField",
|
||||
"name": "framework",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v0/*: any*/),
|
||||
(v2/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
(v1/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "__typename",
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "cursor",
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "PageInfo",
|
||||
"kind": "LinkedField",
|
||||
"name": "pageInfo",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "endCursor",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "hasNextPage",
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"kind": "ClientExtension",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "__id",
|
||||
"storageKey": null
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"storageKey": "controls(first:0)"
|
||||
},
|
||||
{
|
||||
"alias": "canCreateStateOfApplicabilityControlMapping",
|
||||
"args": [
|
||||
{
|
||||
"kind": "Literal",
|
||||
"name": "action",
|
||||
"value": "core:state-of-applicability-control-mapping:create"
|
||||
}
|
||||
],
|
||||
"kind": "ScalarField",
|
||||
"name": "permission",
|
||||
"storageKey": "permission(action:\"core:state-of-applicability-control-mapping:create\")"
|
||||
},
|
||||
{
|
||||
"alias": "canDeleteStateOfApplicabilityControlMapping",
|
||||
"args": [
|
||||
{
|
||||
"kind": "Literal",
|
||||
"name": "action",
|
||||
"value": "core:state-of-applicability-control-mapping:delete"
|
||||
}
|
||||
],
|
||||
"kind": "ScalarField",
|
||||
"name": "permission",
|
||||
"storageKey": "permission(action:\"core:state-of-applicability-control-mapping:delete\")"
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "AvailableStateOfApplicabilityControl",
|
||||
"kind": "LinkedField",
|
||||
"name": "availableControls",
|
||||
"plural": true,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "controlId",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "sectionTitle",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "name",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "frameworkId",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "frameworkName",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "organizationId",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "stateOfApplicabilityId",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "applicability",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "justification",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "bestPractice",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "regulatory",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "contractual",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "riskAssessment",
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
"storageKey": "__StateOfApplicabilityControlsTab_applicabilityStatements_connection(orderBy:{\"direction\":\"ASC\",\"field\":\"CREATED_AT\"})"
|
||||
}
|
||||
],
|
||||
"type": "StateOfApplicability",
|
||||
"abstractKey": null
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "37dd1660caf4dea39bb697b99a8bf511";
|
||||
(node as any).hash = "b5a28520cb7a702b208cbfad2c904a99";
|
||||
|
||||
export default node;
|
||||
|
||||
@@ -1,273 +0,0 @@
|
||||
/**
|
||||
* @generated SignedSource<<82aac43cc256062befe9f2126eb20c4e>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
// @ts-nocheck
|
||||
|
||||
import { ConcreteRequest } from 'relay-runtime';
|
||||
import { FragmentRefs } from "relay-runtime";
|
||||
export type StateOfApplicabilityControlsTabRefetchQuery$variables = {
|
||||
id: string;
|
||||
};
|
||||
export type StateOfApplicabilityControlsTabRefetchQuery$data = {
|
||||
readonly node: {
|
||||
readonly " $fragmentSpreads": FragmentRefs<"StateOfApplicabilityControlsTabFragment">;
|
||||
};
|
||||
};
|
||||
export type StateOfApplicabilityControlsTabRefetchQuery = {
|
||||
response: StateOfApplicabilityControlsTabRefetchQuery$data;
|
||||
variables: StateOfApplicabilityControlsTabRefetchQuery$variables;
|
||||
};
|
||||
|
||||
const node: ConcreteRequest = (function(){
|
||||
var v0 = [
|
||||
{
|
||||
"defaultValue": null,
|
||||
"kind": "LocalArgument",
|
||||
"name": "id"
|
||||
}
|
||||
],
|
||||
v1 = [
|
||||
{
|
||||
"kind": "Variable",
|
||||
"name": "id",
|
||||
"variableName": "id"
|
||||
}
|
||||
];
|
||||
return {
|
||||
"fragment": {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "StateOfApplicabilityControlsTabRefetchQuery",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v1/*: any*/),
|
||||
"concreteType": null,
|
||||
"kind": "LinkedField",
|
||||
"name": "node",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"args": null,
|
||||
"kind": "FragmentSpread",
|
||||
"name": "StateOfApplicabilityControlsTabFragment"
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"type": "Query",
|
||||
"abstractKey": null
|
||||
},
|
||||
"kind": "Request",
|
||||
"operation": {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Operation",
|
||||
"name": "StateOfApplicabilityControlsTabRefetchQuery",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v1/*: any*/),
|
||||
"concreteType": null,
|
||||
"kind": "LinkedField",
|
||||
"name": "node",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "__typename",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "id",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"kind": "InlineFragment",
|
||||
"selections": [
|
||||
{
|
||||
"alias": "controlsInfo",
|
||||
"args": [
|
||||
{
|
||||
"kind": "Literal",
|
||||
"name": "first",
|
||||
"value": 0
|
||||
}
|
||||
],
|
||||
"concreteType": "ControlConnection",
|
||||
"kind": "LinkedField",
|
||||
"name": "controls",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "totalCount",
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": "controls(first:0)"
|
||||
},
|
||||
{
|
||||
"alias": "canCreateStateOfApplicabilityControlMapping",
|
||||
"args": [
|
||||
{
|
||||
"kind": "Literal",
|
||||
"name": "action",
|
||||
"value": "core:state-of-applicability-control-mapping:create"
|
||||
}
|
||||
],
|
||||
"kind": "ScalarField",
|
||||
"name": "permission",
|
||||
"storageKey": "permission(action:\"core:state-of-applicability-control-mapping:create\")"
|
||||
},
|
||||
{
|
||||
"alias": "canDeleteStateOfApplicabilityControlMapping",
|
||||
"args": [
|
||||
{
|
||||
"kind": "Literal",
|
||||
"name": "action",
|
||||
"value": "core:state-of-applicability-control-mapping:delete"
|
||||
}
|
||||
],
|
||||
"kind": "ScalarField",
|
||||
"name": "permission",
|
||||
"storageKey": "permission(action:\"core:state-of-applicability-control-mapping:delete\")"
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "AvailableStateOfApplicabilityControl",
|
||||
"kind": "LinkedField",
|
||||
"name": "availableControls",
|
||||
"plural": true,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "controlId",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "sectionTitle",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "name",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "frameworkId",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "frameworkName",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "organizationId",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "stateOfApplicabilityId",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "applicability",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "justification",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "bestPractice",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "regulatory",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "contractual",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "riskAssessment",
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"type": "StateOfApplicability",
|
||||
"abstractKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
]
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "fd5b512b7274ba6a3047960c796c82bf",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "StateOfApplicabilityControlsTabRefetchQuery",
|
||||
"operationKind": "query",
|
||||
"text": "query StateOfApplicabilityControlsTabRefetchQuery(\n $id: ID!\n) {\n node(id: $id) {\n __typename\n ...StateOfApplicabilityControlsTabFragment\n id\n }\n}\n\nfragment StateOfApplicabilityControlsTabFragment on StateOfApplicability {\n id\n controlsInfo: controls(first: 0) {\n totalCount\n }\n canCreateStateOfApplicabilityControlMapping: permission(action: \"core:state-of-applicability-control-mapping:create\")\n canDeleteStateOfApplicabilityControlMapping: permission(action: \"core:state-of-applicability-control-mapping:delete\")\n availableControls {\n controlId\n sectionTitle\n name\n frameworkId\n frameworkName\n organizationId\n stateOfApplicabilityId\n applicability\n justification\n bestPractice\n regulatory\n contractual\n riskAssessment\n }\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "37dd1660caf4dea39bb697b99a8bf511";
|
||||
|
||||
export default node;
|
||||
@@ -1,109 +0,0 @@
|
||||
/**
|
||||
* @generated SignedSource<<a9742800c22e683eb17d46d52b7d6aa5>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
// @ts-nocheck
|
||||
|
||||
import { ConcreteRequest } from 'relay-runtime';
|
||||
export type DeleteStateOfApplicabilityControlMappingInput = {
|
||||
controlId: string;
|
||||
stateOfApplicabilityId: string;
|
||||
};
|
||||
export type StateOfApplicabilityControlsTabUnlinkMutation$variables = {
|
||||
input: DeleteStateOfApplicabilityControlMappingInput;
|
||||
};
|
||||
export type StateOfApplicabilityControlsTabUnlinkMutation$data = {
|
||||
readonly deleteStateOfApplicabilityControlMapping: {
|
||||
readonly deletedControlId: string;
|
||||
readonly deletedStateOfApplicabilityControlId: string;
|
||||
readonly deletedStateOfApplicabilityId: string;
|
||||
};
|
||||
};
|
||||
export type StateOfApplicabilityControlsTabUnlinkMutation = {
|
||||
response: StateOfApplicabilityControlsTabUnlinkMutation$data;
|
||||
variables: StateOfApplicabilityControlsTabUnlinkMutation$variables;
|
||||
};
|
||||
|
||||
const node: ConcreteRequest = (function(){
|
||||
var v0 = [
|
||||
{
|
||||
"defaultValue": null,
|
||||
"kind": "LocalArgument",
|
||||
"name": "input"
|
||||
}
|
||||
],
|
||||
v1 = [
|
||||
{
|
||||
"alias": null,
|
||||
"args": [
|
||||
{
|
||||
"kind": "Variable",
|
||||
"name": "input",
|
||||
"variableName": "input"
|
||||
}
|
||||
],
|
||||
"concreteType": "DeleteStateOfApplicabilityControlMappingPayload",
|
||||
"kind": "LinkedField",
|
||||
"name": "deleteStateOfApplicabilityControlMapping",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "deletedStateOfApplicabilityId",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "deletedControlId",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "deletedStateOfApplicabilityControlId",
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
];
|
||||
return {
|
||||
"fragment": {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "StateOfApplicabilityControlsTabUnlinkMutation",
|
||||
"selections": (v1/*: any*/),
|
||||
"type": "Mutation",
|
||||
"abstractKey": null
|
||||
},
|
||||
"kind": "Request",
|
||||
"operation": {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Operation",
|
||||
"name": "StateOfApplicabilityControlsTabUnlinkMutation",
|
||||
"selections": (v1/*: any*/)
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "6bf3ac32bd032b215e3e4f48100353d7",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "StateOfApplicabilityControlsTabUnlinkMutation",
|
||||
"operationKind": "mutation",
|
||||
"text": "mutation StateOfApplicabilityControlsTabUnlinkMutation(\n $input: DeleteStateOfApplicabilityControlMappingInput!\n) {\n deleteStateOfApplicabilityControlMapping(input: $input) {\n deletedStateOfApplicabilityId\n deletedControlId\n deletedStateOfApplicabilityControlId\n }\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "b8c3e0ca44bde75468fcfab09151854d";
|
||||
|
||||
export default node;
|
||||
132
apps/console/src/__generated__/core/StateOfApplicabilityDetailPageDeleteMutation.graphql.ts
generated
Normal file
132
apps/console/src/__generated__/core/StateOfApplicabilityDetailPageDeleteMutation.graphql.ts
generated
Normal file
@@ -0,0 +1,132 @@
|
||||
/**
|
||||
* @generated SignedSource<<56cf69173dcd665f19c4273ab108f383>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
// @ts-nocheck
|
||||
|
||||
import { ConcreteRequest } from 'relay-runtime';
|
||||
export type DeleteStateOfApplicabilityInput = {
|
||||
stateOfApplicabilityId: string;
|
||||
};
|
||||
export type StateOfApplicabilityDetailPageDeleteMutation$variables = {
|
||||
connections: ReadonlyArray<string>;
|
||||
input: DeleteStateOfApplicabilityInput;
|
||||
};
|
||||
export type StateOfApplicabilityDetailPageDeleteMutation$data = {
|
||||
readonly deleteStateOfApplicability: {
|
||||
readonly deletedStateOfApplicabilityId: string;
|
||||
};
|
||||
};
|
||||
export type StateOfApplicabilityDetailPageDeleteMutation = {
|
||||
response: StateOfApplicabilityDetailPageDeleteMutation$data;
|
||||
variables: StateOfApplicabilityDetailPageDeleteMutation$variables;
|
||||
};
|
||||
|
||||
const node: ConcreteRequest = (function(){
|
||||
var v0 = {
|
||||
"defaultValue": null,
|
||||
"kind": "LocalArgument",
|
||||
"name": "connections"
|
||||
},
|
||||
v1 = {
|
||||
"defaultValue": null,
|
||||
"kind": "LocalArgument",
|
||||
"name": "input"
|
||||
},
|
||||
v2 = [
|
||||
{
|
||||
"kind": "Variable",
|
||||
"name": "input",
|
||||
"variableName": "input"
|
||||
}
|
||||
],
|
||||
v3 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "deletedStateOfApplicabilityId",
|
||||
"storageKey": null
|
||||
};
|
||||
return {
|
||||
"fragment": {
|
||||
"argumentDefinitions": [
|
||||
(v0/*: any*/),
|
||||
(v1/*: any*/)
|
||||
],
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "StateOfApplicabilityDetailPageDeleteMutation",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v2/*: any*/),
|
||||
"concreteType": "DeleteStateOfApplicabilityPayload",
|
||||
"kind": "LinkedField",
|
||||
"name": "deleteStateOfApplicability",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v3/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"type": "Mutation",
|
||||
"abstractKey": null
|
||||
},
|
||||
"kind": "Request",
|
||||
"operation": {
|
||||
"argumentDefinitions": [
|
||||
(v1/*: any*/),
|
||||
(v0/*: any*/)
|
||||
],
|
||||
"kind": "Operation",
|
||||
"name": "StateOfApplicabilityDetailPageDeleteMutation",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v2/*: any*/),
|
||||
"concreteType": "DeleteStateOfApplicabilityPayload",
|
||||
"kind": "LinkedField",
|
||||
"name": "deleteStateOfApplicability",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v3/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"filters": null,
|
||||
"handle": "deleteEdge",
|
||||
"key": "",
|
||||
"kind": "ScalarHandle",
|
||||
"name": "deletedStateOfApplicabilityId",
|
||||
"handleArgs": [
|
||||
{
|
||||
"kind": "Variable",
|
||||
"name": "connections",
|
||||
"variableName": "connections"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
]
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "13f5a325289c902aca142880e1f30648",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "StateOfApplicabilityDetailPageDeleteMutation",
|
||||
"operationKind": "mutation",
|
||||
"text": "mutation StateOfApplicabilityDetailPageDeleteMutation(\n $input: DeleteStateOfApplicabilityInput!\n) {\n deleteStateOfApplicability(input: $input) {\n deletedStateOfApplicabilityId\n }\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "b511cc3d55c6ebb1517687f706026333";
|
||||
|
||||
export default node;
|
||||
492
apps/console/src/__generated__/core/StateOfApplicabilityDetailPageQuery.graphql.ts
generated
Normal file
492
apps/console/src/__generated__/core/StateOfApplicabilityDetailPageQuery.graphql.ts
generated
Normal file
@@ -0,0 +1,492 @@
|
||||
/**
|
||||
* @generated SignedSource<<2f9bc9cc4e848c4b8c88326c2279d94f>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
// @ts-nocheck
|
||||
|
||||
import { ConcreteRequest } from 'relay-runtime';
|
||||
import { FragmentRefs } from "relay-runtime";
|
||||
export type StateOfApplicabilityDetailPageQuery$variables = {
|
||||
stateOfApplicabilityId: string;
|
||||
};
|
||||
export type StateOfApplicabilityDetailPageQuery$data = {
|
||||
readonly node: {
|
||||
readonly canDelete?: boolean;
|
||||
readonly canExport?: boolean;
|
||||
readonly canUpdate?: boolean;
|
||||
readonly createdAt?: string;
|
||||
readonly id?: string;
|
||||
readonly name?: string;
|
||||
readonly organization?: {
|
||||
readonly id: string;
|
||||
} | null | undefined;
|
||||
readonly owner?: {
|
||||
readonly fullName: string;
|
||||
readonly id: string;
|
||||
};
|
||||
readonly snapshotId?: string | null | undefined;
|
||||
readonly sourceId?: string | null | undefined;
|
||||
readonly updatedAt?: string;
|
||||
readonly " $fragmentSpreads": FragmentRefs<"StateOfApplicabilityControlsTabFragment">;
|
||||
};
|
||||
};
|
||||
export type StateOfApplicabilityDetailPageQuery = {
|
||||
response: StateOfApplicabilityDetailPageQuery$data;
|
||||
variables: StateOfApplicabilityDetailPageQuery$variables;
|
||||
};
|
||||
|
||||
const node: ConcreteRequest = (function(){
|
||||
var v0 = [
|
||||
{
|
||||
"defaultValue": null,
|
||||
"kind": "LocalArgument",
|
||||
"name": "stateOfApplicabilityId"
|
||||
}
|
||||
],
|
||||
v1 = [
|
||||
{
|
||||
"kind": "Variable",
|
||||
"name": "id",
|
||||
"variableName": "stateOfApplicabilityId"
|
||||
}
|
||||
],
|
||||
v2 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "id",
|
||||
"storageKey": null
|
||||
},
|
||||
v3 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "name",
|
||||
"storageKey": null
|
||||
},
|
||||
v4 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "sourceId",
|
||||
"storageKey": null
|
||||
},
|
||||
v5 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "snapshotId",
|
||||
"storageKey": null
|
||||
},
|
||||
v6 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "createdAt",
|
||||
"storageKey": null
|
||||
},
|
||||
v7 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "updatedAt",
|
||||
"storageKey": null
|
||||
},
|
||||
v8 = {
|
||||
"alias": "canUpdate",
|
||||
"args": [
|
||||
{
|
||||
"kind": "Literal",
|
||||
"name": "action",
|
||||
"value": "core:state-of-applicability:update"
|
||||
}
|
||||
],
|
||||
"kind": "ScalarField",
|
||||
"name": "permission",
|
||||
"storageKey": "permission(action:\"core:state-of-applicability:update\")"
|
||||
},
|
||||
v9 = {
|
||||
"alias": "canDelete",
|
||||
"args": [
|
||||
{
|
||||
"kind": "Literal",
|
||||
"name": "action",
|
||||
"value": "core:state-of-applicability:delete"
|
||||
}
|
||||
],
|
||||
"kind": "ScalarField",
|
||||
"name": "permission",
|
||||
"storageKey": "permission(action:\"core:state-of-applicability:delete\")"
|
||||
},
|
||||
v10 = {
|
||||
"alias": "canExport",
|
||||
"args": [
|
||||
{
|
||||
"kind": "Literal",
|
||||
"name": "action",
|
||||
"value": "core:state-of-applicability:export"
|
||||
}
|
||||
],
|
||||
"kind": "ScalarField",
|
||||
"name": "permission",
|
||||
"storageKey": "permission(action:\"core:state-of-applicability:export\")"
|
||||
},
|
||||
v11 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "Organization",
|
||||
"kind": "LinkedField",
|
||||
"name": "organization",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v2/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
v12 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "People",
|
||||
"kind": "LinkedField",
|
||||
"name": "owner",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v2/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "fullName",
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
v13 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "__typename",
|
||||
"storageKey": null
|
||||
},
|
||||
v14 = [
|
||||
{
|
||||
"kind": "Literal",
|
||||
"name": "first",
|
||||
"value": 1000
|
||||
},
|
||||
{
|
||||
"kind": "Literal",
|
||||
"name": "orderBy",
|
||||
"value": {
|
||||
"direction": "ASC",
|
||||
"field": "CREATED_AT"
|
||||
}
|
||||
}
|
||||
];
|
||||
return {
|
||||
"fragment": {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "StateOfApplicabilityDetailPageQuery",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v1/*: any*/),
|
||||
"concreteType": null,
|
||||
"kind": "LinkedField",
|
||||
"name": "node",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"kind": "InlineFragment",
|
||||
"selections": [
|
||||
(v2/*: any*/),
|
||||
(v3/*: any*/),
|
||||
(v4/*: any*/),
|
||||
(v5/*: any*/),
|
||||
(v6/*: any*/),
|
||||
(v7/*: any*/),
|
||||
(v8/*: any*/),
|
||||
(v9/*: any*/),
|
||||
(v10/*: any*/),
|
||||
(v11/*: any*/),
|
||||
(v12/*: any*/),
|
||||
{
|
||||
"args": null,
|
||||
"kind": "FragmentSpread",
|
||||
"name": "StateOfApplicabilityControlsTabFragment"
|
||||
}
|
||||
],
|
||||
"type": "StateOfApplicability",
|
||||
"abstractKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"type": "Query",
|
||||
"abstractKey": null
|
||||
},
|
||||
"kind": "Request",
|
||||
"operation": {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Operation",
|
||||
"name": "StateOfApplicabilityDetailPageQuery",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v1/*: any*/),
|
||||
"concreteType": null,
|
||||
"kind": "LinkedField",
|
||||
"name": "node",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v13/*: any*/),
|
||||
(v2/*: any*/),
|
||||
{
|
||||
"kind": "InlineFragment",
|
||||
"selections": [
|
||||
(v3/*: any*/),
|
||||
(v4/*: any*/),
|
||||
(v5/*: any*/),
|
||||
(v6/*: any*/),
|
||||
(v7/*: any*/),
|
||||
(v8/*: any*/),
|
||||
(v9/*: any*/),
|
||||
(v10/*: any*/),
|
||||
(v11/*: any*/),
|
||||
(v12/*: any*/),
|
||||
{
|
||||
"alias": "canCreateApplicabilityStatement",
|
||||
"args": [
|
||||
{
|
||||
"kind": "Literal",
|
||||
"name": "action",
|
||||
"value": "core:applicability-statement:create"
|
||||
}
|
||||
],
|
||||
"kind": "ScalarField",
|
||||
"name": "permission",
|
||||
"storageKey": "permission(action:\"core:applicability-statement:create\")"
|
||||
},
|
||||
{
|
||||
"alias": "canUpdateApplicabilityStatement",
|
||||
"args": [
|
||||
{
|
||||
"kind": "Literal",
|
||||
"name": "action",
|
||||
"value": "core:applicability-statement:update"
|
||||
}
|
||||
],
|
||||
"kind": "ScalarField",
|
||||
"name": "permission",
|
||||
"storageKey": "permission(action:\"core:applicability-statement:update\")"
|
||||
},
|
||||
{
|
||||
"alias": "canDeleteApplicabilityStatement",
|
||||
"args": [
|
||||
{
|
||||
"kind": "Literal",
|
||||
"name": "action",
|
||||
"value": "core:applicability-statement:delete"
|
||||
}
|
||||
],
|
||||
"kind": "ScalarField",
|
||||
"name": "permission",
|
||||
"storageKey": "permission(action:\"core:applicability-statement:delete\")"
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v14/*: any*/),
|
||||
"concreteType": "ApplicabilityStatementConnection",
|
||||
"kind": "LinkedField",
|
||||
"name": "applicabilityStatements",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "ApplicabilityStatementEdge",
|
||||
"kind": "LinkedField",
|
||||
"name": "edges",
|
||||
"plural": true,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "ApplicabilityStatement",
|
||||
"kind": "LinkedField",
|
||||
"name": "node",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v2/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "applicability",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "justification",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "Control",
|
||||
"kind": "LinkedField",
|
||||
"name": "control",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v2/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "sectionTitle",
|
||||
"storageKey": null
|
||||
},
|
||||
(v3/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "bestPractice",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "regulatory",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "contractual",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "riskAssessment",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "Framework",
|
||||
"kind": "LinkedField",
|
||||
"name": "framework",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v2/*: any*/),
|
||||
(v3/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
(v11/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
(v13/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "cursor",
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "PageInfo",
|
||||
"kind": "LinkedField",
|
||||
"name": "pageInfo",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "endCursor",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "hasNextPage",
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"kind": "ClientExtension",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "__id",
|
||||
"storageKey": null
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"storageKey": "applicabilityStatements(first:1000,orderBy:{\"direction\":\"ASC\",\"field\":\"CREATED_AT\"})"
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v14/*: any*/),
|
||||
"filters": [
|
||||
"orderBy"
|
||||
],
|
||||
"handle": "connection",
|
||||
"key": "StateOfApplicabilityControlsTab_applicabilityStatements",
|
||||
"kind": "LinkedHandle",
|
||||
"name": "applicabilityStatements"
|
||||
}
|
||||
],
|
||||
"type": "StateOfApplicability",
|
||||
"abstractKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
]
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "ae9d15bd80281c127b74f1a0a32099ee",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "StateOfApplicabilityDetailPageQuery",
|
||||
"operationKind": "query",
|
||||
"text": "query StateOfApplicabilityDetailPageQuery(\n $stateOfApplicabilityId: ID!\n) {\n node(id: $stateOfApplicabilityId) {\n __typename\n ... on StateOfApplicability {\n id\n name\n sourceId\n snapshotId\n createdAt\n updatedAt\n canUpdate: permission(action: \"core:state-of-applicability:update\")\n canDelete: permission(action: \"core:state-of-applicability:delete\")\n canExport: permission(action: \"core:state-of-applicability:export\")\n organization {\n id\n }\n owner {\n id\n fullName\n }\n ...StateOfApplicabilityControlsTabFragment\n }\n id\n }\n}\n\nfragment StateOfApplicabilityControlsTabFragment on StateOfApplicability {\n id\n organization {\n id\n }\n canCreateApplicabilityStatement: permission(action: \"core:applicability-statement:create\")\n canUpdateApplicabilityStatement: permission(action: \"core:applicability-statement:update\")\n canDeleteApplicabilityStatement: permission(action: \"core:applicability-statement:delete\")\n applicabilityStatements(first: 1000, orderBy: {direction: ASC, field: CREATED_AT}) {\n edges {\n node {\n id\n applicability\n justification\n control {\n id\n sectionTitle\n name\n bestPractice\n regulatory\n contractual\n riskAssessment\n framework {\n id\n name\n }\n organization {\n id\n }\n }\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n }\n }\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "c5fc32cde9c8e0ce3b8a77c96e0bb7cd";
|
||||
|
||||
export default node;
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @generated SignedSource<<eb7a62904f0c39bab4289b137c4b8e9b>>
|
||||
* @generated SignedSource<<00cfb3ae1f26e5b5ab343724f00292b0>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
@@ -14,10 +14,10 @@ export type UpdateStateOfApplicabilityInput = {
|
||||
name?: string | null | undefined;
|
||||
ownerId?: string | null | undefined;
|
||||
};
|
||||
export type StateOfApplicabilityGraphUpdateMutation$variables = {
|
||||
export type StateOfApplicabilityDetailPageUpdateMutation$variables = {
|
||||
input: UpdateStateOfApplicabilityInput;
|
||||
};
|
||||
export type StateOfApplicabilityGraphUpdateMutation$data = {
|
||||
export type StateOfApplicabilityDetailPageUpdateMutation$data = {
|
||||
readonly updateStateOfApplicability: {
|
||||
readonly stateOfApplicability: {
|
||||
readonly createdAt: string;
|
||||
@@ -33,9 +33,9 @@ export type StateOfApplicabilityGraphUpdateMutation$data = {
|
||||
};
|
||||
};
|
||||
};
|
||||
export type StateOfApplicabilityGraphUpdateMutation = {
|
||||
response: StateOfApplicabilityGraphUpdateMutation$data;
|
||||
variables: StateOfApplicabilityGraphUpdateMutation$variables;
|
||||
export type StateOfApplicabilityDetailPageUpdateMutation = {
|
||||
response: StateOfApplicabilityDetailPageUpdateMutation$data;
|
||||
variables: StateOfApplicabilityDetailPageUpdateMutation$variables;
|
||||
};
|
||||
|
||||
const node: ConcreteRequest = (function(){
|
||||
@@ -143,7 +143,7 @@ return {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "StateOfApplicabilityGraphUpdateMutation",
|
||||
"name": "StateOfApplicabilityDetailPageUpdateMutation",
|
||||
"selections": (v2/*: any*/),
|
||||
"type": "Mutation",
|
||||
"abstractKey": null
|
||||
@@ -152,20 +152,20 @@ return {
|
||||
"operation": {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Operation",
|
||||
"name": "StateOfApplicabilityGraphUpdateMutation",
|
||||
"name": "StateOfApplicabilityDetailPageUpdateMutation",
|
||||
"selections": (v2/*: any*/)
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "609bd562b84162f2807ee89b3c3273aa",
|
||||
"cacheID": "0236ac567b08f60ca0773d91fb1b2155",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "StateOfApplicabilityGraphUpdateMutation",
|
||||
"name": "StateOfApplicabilityDetailPageUpdateMutation",
|
||||
"operationKind": "mutation",
|
||||
"text": "mutation StateOfApplicabilityGraphUpdateMutation(\n $input: UpdateStateOfApplicabilityInput!\n) {\n updateStateOfApplicability(input: $input) {\n stateOfApplicability {\n id\n name\n sourceId\n snapshotId\n createdAt\n updatedAt\n owner {\n id\n fullName\n }\n }\n }\n}\n"
|
||||
"text": "mutation StateOfApplicabilityDetailPageUpdateMutation(\n $input: UpdateStateOfApplicabilityInput!\n) {\n updateStateOfApplicability(input: $input) {\n stateOfApplicability {\n id\n name\n sourceId\n snapshotId\n createdAt\n updatedAt\n owner {\n id\n fullName\n }\n }\n }\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "e8810210629ef7fad113616c06f141ee";
|
||||
(node as any).hash = "0213db8aa925819738cea45aa8603d6d";
|
||||
|
||||
export default node;
|
||||
@@ -1,200 +0,0 @@
|
||||
/**
|
||||
* @generated SignedSource<<4c20f255a28d7869f69f484e0e4e2321>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
// @ts-nocheck
|
||||
|
||||
import { ConcreteRequest } from 'relay-runtime';
|
||||
export type CreateStateOfApplicabilityInput = {
|
||||
name: string;
|
||||
organizationId: string;
|
||||
ownerId: string;
|
||||
};
|
||||
export type StateOfApplicabilityGraphCreateMutation$variables = {
|
||||
connections: ReadonlyArray<string>;
|
||||
input: CreateStateOfApplicabilityInput;
|
||||
};
|
||||
export type StateOfApplicabilityGraphCreateMutation$data = {
|
||||
readonly createStateOfApplicability: {
|
||||
readonly stateOfApplicabilityEdge: {
|
||||
readonly node: {
|
||||
readonly createdAt: string;
|
||||
readonly id: string;
|
||||
readonly name: string;
|
||||
readonly snapshotId: string | null | undefined;
|
||||
readonly sourceId: string | null | undefined;
|
||||
readonly updatedAt: string;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
export type StateOfApplicabilityGraphCreateMutation = {
|
||||
response: StateOfApplicabilityGraphCreateMutation$data;
|
||||
variables: StateOfApplicabilityGraphCreateMutation$variables;
|
||||
};
|
||||
|
||||
const node: ConcreteRequest = (function(){
|
||||
var v0 = {
|
||||
"defaultValue": null,
|
||||
"kind": "LocalArgument",
|
||||
"name": "connections"
|
||||
},
|
||||
v1 = {
|
||||
"defaultValue": null,
|
||||
"kind": "LocalArgument",
|
||||
"name": "input"
|
||||
},
|
||||
v2 = [
|
||||
{
|
||||
"kind": "Variable",
|
||||
"name": "input",
|
||||
"variableName": "input"
|
||||
}
|
||||
],
|
||||
v3 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "StateOfApplicabilityEdge",
|
||||
"kind": "LinkedField",
|
||||
"name": "stateOfApplicabilityEdge",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "StateOfApplicability",
|
||||
"kind": "LinkedField",
|
||||
"name": "node",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "id",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "name",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "sourceId",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "snapshotId",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "createdAt",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "updatedAt",
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
};
|
||||
return {
|
||||
"fragment": {
|
||||
"argumentDefinitions": [
|
||||
(v0/*: any*/),
|
||||
(v1/*: any*/)
|
||||
],
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "StateOfApplicabilityGraphCreateMutation",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v2/*: any*/),
|
||||
"concreteType": "CreateStateOfApplicabilityPayload",
|
||||
"kind": "LinkedField",
|
||||
"name": "createStateOfApplicability",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v3/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"type": "Mutation",
|
||||
"abstractKey": null
|
||||
},
|
||||
"kind": "Request",
|
||||
"operation": {
|
||||
"argumentDefinitions": [
|
||||
(v1/*: any*/),
|
||||
(v0/*: any*/)
|
||||
],
|
||||
"kind": "Operation",
|
||||
"name": "StateOfApplicabilityGraphCreateMutation",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v2/*: any*/),
|
||||
"concreteType": "CreateStateOfApplicabilityPayload",
|
||||
"kind": "LinkedField",
|
||||
"name": "createStateOfApplicability",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v3/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"filters": null,
|
||||
"handle": "prependEdge",
|
||||
"key": "",
|
||||
"kind": "LinkedHandle",
|
||||
"name": "stateOfApplicabilityEdge",
|
||||
"handleArgs": [
|
||||
{
|
||||
"kind": "Variable",
|
||||
"name": "connections",
|
||||
"variableName": "connections"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
]
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "c1a3721f591bc17ed455a326eb9edead",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "StateOfApplicabilityGraphCreateMutation",
|
||||
"operationKind": "mutation",
|
||||
"text": "mutation StateOfApplicabilityGraphCreateMutation(\n $input: CreateStateOfApplicabilityInput!\n) {\n createStateOfApplicability(input: $input) {\n stateOfApplicabilityEdge {\n node {\n id\n name\n sourceId\n snapshotId\n createdAt\n updatedAt\n }\n }\n }\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "294d4fe89f8cbbbb4b8170a46dd3cd7a";
|
||||
|
||||
export default node;
|
||||
@@ -1,218 +0,0 @@
|
||||
/**
|
||||
* @generated SignedSource<<9e7f481aa8c95332bc03c3974a6752f8>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
// @ts-nocheck
|
||||
|
||||
import { ConcreteRequest } from 'relay-runtime';
|
||||
export type StateOfApplicabilityGraphForEditQuery$variables = {
|
||||
stateOfApplicabilityId: string;
|
||||
};
|
||||
export type StateOfApplicabilityGraphForEditQuery$data = {
|
||||
readonly node: {
|
||||
readonly controls?: {
|
||||
readonly edges: ReadonlyArray<{
|
||||
readonly node: {
|
||||
readonly framework: {
|
||||
readonly id: string;
|
||||
readonly name: string;
|
||||
};
|
||||
readonly id: string;
|
||||
readonly name: string;
|
||||
readonly sectionTitle: string;
|
||||
};
|
||||
}>;
|
||||
};
|
||||
readonly id?: string;
|
||||
readonly name?: string;
|
||||
};
|
||||
};
|
||||
export type StateOfApplicabilityGraphForEditQuery = {
|
||||
response: StateOfApplicabilityGraphForEditQuery$data;
|
||||
variables: StateOfApplicabilityGraphForEditQuery$variables;
|
||||
};
|
||||
|
||||
const node: ConcreteRequest = (function(){
|
||||
var v0 = [
|
||||
{
|
||||
"defaultValue": null,
|
||||
"kind": "LocalArgument",
|
||||
"name": "stateOfApplicabilityId"
|
||||
}
|
||||
],
|
||||
v1 = [
|
||||
{
|
||||
"kind": "Variable",
|
||||
"name": "id",
|
||||
"variableName": "stateOfApplicabilityId"
|
||||
}
|
||||
],
|
||||
v2 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "id",
|
||||
"storageKey": null
|
||||
},
|
||||
v3 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "name",
|
||||
"storageKey": null
|
||||
},
|
||||
v4 = {
|
||||
"alias": null,
|
||||
"args": [
|
||||
{
|
||||
"kind": "Literal",
|
||||
"name": "first",
|
||||
"value": 1000
|
||||
},
|
||||
{
|
||||
"kind": "Literal",
|
||||
"name": "orderBy",
|
||||
"value": {
|
||||
"direction": "ASC",
|
||||
"field": "SECTION_TITLE"
|
||||
}
|
||||
}
|
||||
],
|
||||
"concreteType": "ControlConnection",
|
||||
"kind": "LinkedField",
|
||||
"name": "controls",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "ControlEdge",
|
||||
"kind": "LinkedField",
|
||||
"name": "edges",
|
||||
"plural": true,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "Control",
|
||||
"kind": "LinkedField",
|
||||
"name": "node",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v2/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "sectionTitle",
|
||||
"storageKey": null
|
||||
},
|
||||
(v3/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "Framework",
|
||||
"kind": "LinkedField",
|
||||
"name": "framework",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v2/*: any*/),
|
||||
(v3/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": "controls(first:1000,orderBy:{\"direction\":\"ASC\",\"field\":\"SECTION_TITLE\"})"
|
||||
};
|
||||
return {
|
||||
"fragment": {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "StateOfApplicabilityGraphForEditQuery",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v1/*: any*/),
|
||||
"concreteType": null,
|
||||
"kind": "LinkedField",
|
||||
"name": "node",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"kind": "InlineFragment",
|
||||
"selections": [
|
||||
(v2/*: any*/),
|
||||
(v3/*: any*/),
|
||||
(v4/*: any*/)
|
||||
],
|
||||
"type": "StateOfApplicability",
|
||||
"abstractKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"type": "Query",
|
||||
"abstractKey": null
|
||||
},
|
||||
"kind": "Request",
|
||||
"operation": {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Operation",
|
||||
"name": "StateOfApplicabilityGraphForEditQuery",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v1/*: any*/),
|
||||
"concreteType": null,
|
||||
"kind": "LinkedField",
|
||||
"name": "node",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "__typename",
|
||||
"storageKey": null
|
||||
},
|
||||
(v2/*: any*/),
|
||||
{
|
||||
"kind": "InlineFragment",
|
||||
"selections": [
|
||||
(v3/*: any*/),
|
||||
(v4/*: any*/)
|
||||
],
|
||||
"type": "StateOfApplicability",
|
||||
"abstractKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
]
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "b6b5490aa177e6e7e8339060eac14a9c",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "StateOfApplicabilityGraphForEditQuery",
|
||||
"operationKind": "query",
|
||||
"text": "query StateOfApplicabilityGraphForEditQuery(\n $stateOfApplicabilityId: ID!\n) {\n node(id: $stateOfApplicabilityId) {\n __typename\n ... on StateOfApplicability {\n id\n name\n controls(first: 1000, orderBy: {field: SECTION_TITLE, direction: ASC}) {\n edges {\n node {\n id\n sectionTitle\n name\n framework {\n id\n name\n }\n }\n }\n }\n }\n id\n }\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "e89010d6f8d66b9df856280a59d5f0c8";
|
||||
|
||||
export default node;
|
||||
@@ -1,417 +0,0 @@
|
||||
/**
|
||||
* @generated SignedSource<<4c350f48aeb8f51c9716aed4eeadc735>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
// @ts-nocheck
|
||||
|
||||
import { ConcreteRequest } from 'relay-runtime';
|
||||
import { FragmentRefs } from "relay-runtime";
|
||||
export type StateOfApplicabilityGraphNodeQuery$variables = {
|
||||
stateOfApplicabilityId: string;
|
||||
};
|
||||
export type StateOfApplicabilityGraphNodeQuery$data = {
|
||||
readonly node: {
|
||||
readonly canDelete?: boolean;
|
||||
readonly canExport?: boolean;
|
||||
readonly canUpdate?: boolean;
|
||||
readonly createdAt?: string;
|
||||
readonly id?: string;
|
||||
readonly name?: string;
|
||||
readonly organization?: {
|
||||
readonly id: string;
|
||||
} | null | undefined;
|
||||
readonly owner?: {
|
||||
readonly fullName: string;
|
||||
readonly id: string;
|
||||
};
|
||||
readonly snapshotId?: string | null | undefined;
|
||||
readonly sourceId?: string | null | undefined;
|
||||
readonly updatedAt?: string;
|
||||
readonly " $fragmentSpreads": FragmentRefs<"StateOfApplicabilityControlsTabFragment">;
|
||||
};
|
||||
};
|
||||
export type StateOfApplicabilityGraphNodeQuery = {
|
||||
response: StateOfApplicabilityGraphNodeQuery$data;
|
||||
variables: StateOfApplicabilityGraphNodeQuery$variables;
|
||||
};
|
||||
|
||||
const node: ConcreteRequest = (function(){
|
||||
var v0 = [
|
||||
{
|
||||
"defaultValue": null,
|
||||
"kind": "LocalArgument",
|
||||
"name": "stateOfApplicabilityId"
|
||||
}
|
||||
],
|
||||
v1 = [
|
||||
{
|
||||
"kind": "Variable",
|
||||
"name": "id",
|
||||
"variableName": "stateOfApplicabilityId"
|
||||
}
|
||||
],
|
||||
v2 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "id",
|
||||
"storageKey": null
|
||||
},
|
||||
v3 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "name",
|
||||
"storageKey": null
|
||||
},
|
||||
v4 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "sourceId",
|
||||
"storageKey": null
|
||||
},
|
||||
v5 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "snapshotId",
|
||||
"storageKey": null
|
||||
},
|
||||
v6 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "createdAt",
|
||||
"storageKey": null
|
||||
},
|
||||
v7 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "updatedAt",
|
||||
"storageKey": null
|
||||
},
|
||||
v8 = {
|
||||
"alias": "canUpdate",
|
||||
"args": [
|
||||
{
|
||||
"kind": "Literal",
|
||||
"name": "action",
|
||||
"value": "core:state-of-applicability:update"
|
||||
}
|
||||
],
|
||||
"kind": "ScalarField",
|
||||
"name": "permission",
|
||||
"storageKey": "permission(action:\"core:state-of-applicability:update\")"
|
||||
},
|
||||
v9 = {
|
||||
"alias": "canDelete",
|
||||
"args": [
|
||||
{
|
||||
"kind": "Literal",
|
||||
"name": "action",
|
||||
"value": "core:state-of-applicability:delete"
|
||||
}
|
||||
],
|
||||
"kind": "ScalarField",
|
||||
"name": "permission",
|
||||
"storageKey": "permission(action:\"core:state-of-applicability:delete\")"
|
||||
},
|
||||
v10 = {
|
||||
"alias": "canExport",
|
||||
"args": [
|
||||
{
|
||||
"kind": "Literal",
|
||||
"name": "action",
|
||||
"value": "core:state-of-applicability:export"
|
||||
}
|
||||
],
|
||||
"kind": "ScalarField",
|
||||
"name": "permission",
|
||||
"storageKey": "permission(action:\"core:state-of-applicability:export\")"
|
||||
},
|
||||
v11 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "Organization",
|
||||
"kind": "LinkedField",
|
||||
"name": "organization",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v2/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
v12 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "People",
|
||||
"kind": "LinkedField",
|
||||
"name": "owner",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v2/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "fullName",
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
};
|
||||
return {
|
||||
"fragment": {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "StateOfApplicabilityGraphNodeQuery",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v1/*: any*/),
|
||||
"concreteType": null,
|
||||
"kind": "LinkedField",
|
||||
"name": "node",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"kind": "InlineFragment",
|
||||
"selections": [
|
||||
(v2/*: any*/),
|
||||
(v3/*: any*/),
|
||||
(v4/*: any*/),
|
||||
(v5/*: any*/),
|
||||
(v6/*: any*/),
|
||||
(v7/*: any*/),
|
||||
(v8/*: any*/),
|
||||
(v9/*: any*/),
|
||||
(v10/*: any*/),
|
||||
(v11/*: any*/),
|
||||
(v12/*: any*/),
|
||||
{
|
||||
"args": null,
|
||||
"kind": "FragmentSpread",
|
||||
"name": "StateOfApplicabilityControlsTabFragment"
|
||||
}
|
||||
],
|
||||
"type": "StateOfApplicability",
|
||||
"abstractKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"type": "Query",
|
||||
"abstractKey": null
|
||||
},
|
||||
"kind": "Request",
|
||||
"operation": {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Operation",
|
||||
"name": "StateOfApplicabilityGraphNodeQuery",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v1/*: any*/),
|
||||
"concreteType": null,
|
||||
"kind": "LinkedField",
|
||||
"name": "node",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "__typename",
|
||||
"storageKey": null
|
||||
},
|
||||
(v2/*: any*/),
|
||||
{
|
||||
"kind": "InlineFragment",
|
||||
"selections": [
|
||||
(v3/*: any*/),
|
||||
(v4/*: any*/),
|
||||
(v5/*: any*/),
|
||||
(v6/*: any*/),
|
||||
(v7/*: any*/),
|
||||
(v8/*: any*/),
|
||||
(v9/*: any*/),
|
||||
(v10/*: any*/),
|
||||
(v11/*: any*/),
|
||||
(v12/*: any*/),
|
||||
{
|
||||
"alias": "controlsInfo",
|
||||
"args": [
|
||||
{
|
||||
"kind": "Literal",
|
||||
"name": "first",
|
||||
"value": 0
|
||||
}
|
||||
],
|
||||
"concreteType": "ControlConnection",
|
||||
"kind": "LinkedField",
|
||||
"name": "controls",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "totalCount",
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": "controls(first:0)"
|
||||
},
|
||||
{
|
||||
"alias": "canCreateStateOfApplicabilityControlMapping",
|
||||
"args": [
|
||||
{
|
||||
"kind": "Literal",
|
||||
"name": "action",
|
||||
"value": "core:state-of-applicability-control-mapping:create"
|
||||
}
|
||||
],
|
||||
"kind": "ScalarField",
|
||||
"name": "permission",
|
||||
"storageKey": "permission(action:\"core:state-of-applicability-control-mapping:create\")"
|
||||
},
|
||||
{
|
||||
"alias": "canDeleteStateOfApplicabilityControlMapping",
|
||||
"args": [
|
||||
{
|
||||
"kind": "Literal",
|
||||
"name": "action",
|
||||
"value": "core:state-of-applicability-control-mapping:delete"
|
||||
}
|
||||
],
|
||||
"kind": "ScalarField",
|
||||
"name": "permission",
|
||||
"storageKey": "permission(action:\"core:state-of-applicability-control-mapping:delete\")"
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "AvailableStateOfApplicabilityControl",
|
||||
"kind": "LinkedField",
|
||||
"name": "availableControls",
|
||||
"plural": true,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "controlId",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "sectionTitle",
|
||||
"storageKey": null
|
||||
},
|
||||
(v3/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "frameworkId",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "frameworkName",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "organizationId",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "stateOfApplicabilityId",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "applicability",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "justification",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "bestPractice",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "regulatory",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "contractual",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "riskAssessment",
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"type": "StateOfApplicability",
|
||||
"abstractKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
]
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "529e47a135ba24716b749998d1181d9a",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "StateOfApplicabilityGraphNodeQuery",
|
||||
"operationKind": "query",
|
||||
"text": "query StateOfApplicabilityGraphNodeQuery(\n $stateOfApplicabilityId: ID!\n) {\n node(id: $stateOfApplicabilityId) {\n __typename\n ... on StateOfApplicability {\n id\n name\n sourceId\n snapshotId\n createdAt\n updatedAt\n canUpdate: permission(action: \"core:state-of-applicability:update\")\n canDelete: permission(action: \"core:state-of-applicability:delete\")\n canExport: permission(action: \"core:state-of-applicability:export\")\n organization {\n id\n }\n owner {\n id\n fullName\n }\n ...StateOfApplicabilityControlsTabFragment\n }\n id\n }\n}\n\nfragment StateOfApplicabilityControlsTabFragment on StateOfApplicability {\n id\n controlsInfo: controls(first: 0) {\n totalCount\n }\n canCreateStateOfApplicabilityControlMapping: permission(action: \"core:state-of-applicability-control-mapping:create\")\n canDeleteStateOfApplicabilityControlMapping: permission(action: \"core:state-of-applicability-control-mapping:delete\")\n availableControls {\n controlId\n sectionTitle\n name\n frameworkId\n frameworkName\n organizationId\n stateOfApplicabilityId\n applicability\n justification\n bestPractice\n regulatory\n contractual\n riskAssessment\n }\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "5ea300f4dd399cafd7985072c2013dbe";
|
||||
|
||||
export default node;
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @generated SignedSource<<deb6f38f36dc011d0fc4fc060303a57a>>
|
||||
* @generated SignedSource<<74458c1ec95a320a91f42f0c5cdb0925>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
@@ -12,18 +12,18 @@ import { ConcreteRequest } from 'relay-runtime';
|
||||
export type DeleteStateOfApplicabilityInput = {
|
||||
stateOfApplicabilityId: string;
|
||||
};
|
||||
export type StateOfApplicabilityGraphDeleteMutation$variables = {
|
||||
export type StateOfApplicabilityRowDeleteMutation$variables = {
|
||||
connections: ReadonlyArray<string>;
|
||||
input: DeleteStateOfApplicabilityInput;
|
||||
};
|
||||
export type StateOfApplicabilityGraphDeleteMutation$data = {
|
||||
export type StateOfApplicabilityRowDeleteMutation$data = {
|
||||
readonly deleteStateOfApplicability: {
|
||||
readonly deletedStateOfApplicabilityId: string;
|
||||
};
|
||||
};
|
||||
export type StateOfApplicabilityGraphDeleteMutation = {
|
||||
response: StateOfApplicabilityGraphDeleteMutation$data;
|
||||
variables: StateOfApplicabilityGraphDeleteMutation$variables;
|
||||
export type StateOfApplicabilityRowDeleteMutation = {
|
||||
response: StateOfApplicabilityRowDeleteMutation$data;
|
||||
variables: StateOfApplicabilityRowDeleteMutation$variables;
|
||||
};
|
||||
|
||||
const node: ConcreteRequest = (function(){
|
||||
@@ -59,7 +59,7 @@ return {
|
||||
],
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "StateOfApplicabilityGraphDeleteMutation",
|
||||
"name": "StateOfApplicabilityRowDeleteMutation",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
@@ -84,7 +84,7 @@ return {
|
||||
(v0/*: any*/)
|
||||
],
|
||||
"kind": "Operation",
|
||||
"name": "StateOfApplicabilityGraphDeleteMutation",
|
||||
"name": "StateOfApplicabilityRowDeleteMutation",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
@@ -117,16 +117,16 @@ return {
|
||||
]
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "197a2ed2b48d43372e16deae6e9b98c2",
|
||||
"cacheID": "be77dc47292c3864174f008adb45f910",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "StateOfApplicabilityGraphDeleteMutation",
|
||||
"name": "StateOfApplicabilityRowDeleteMutation",
|
||||
"operationKind": "mutation",
|
||||
"text": "mutation StateOfApplicabilityGraphDeleteMutation(\n $input: DeleteStateOfApplicabilityInput!\n) {\n deleteStateOfApplicability(input: $input) {\n deletedStateOfApplicabilityId\n }\n}\n"
|
||||
"text": "mutation StateOfApplicabilityRowDeleteMutation(\n $input: DeleteStateOfApplicabilityInput!\n) {\n deleteStateOfApplicability(input: $input) {\n deletedStateOfApplicabilityId\n }\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "92ec928d4ad0fe7ff4ae78ad9f1f329a";
|
||||
(node as any).hash = "c580dcff6800cb372932ec5ed9201417";
|
||||
|
||||
export default node;
|
||||
93
apps/console/src/__generated__/core/StateOfApplicabilityRowFragment.graphql.ts
generated
Normal file
93
apps/console/src/__generated__/core/StateOfApplicabilityRowFragment.graphql.ts
generated
Normal file
@@ -0,0 +1,93 @@
|
||||
/**
|
||||
* @generated SignedSource<<d044af0467a7f2acf6c390cdcc561c40>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
// @ts-nocheck
|
||||
|
||||
import { ReaderFragment } from 'relay-runtime';
|
||||
import { FragmentRefs } from "relay-runtime";
|
||||
export type StateOfApplicabilityRowFragment$data = {
|
||||
readonly canDelete: boolean;
|
||||
readonly createdAt: string;
|
||||
readonly id: string;
|
||||
readonly name: string;
|
||||
readonly statementsInfo: {
|
||||
readonly totalCount: number;
|
||||
};
|
||||
readonly " $fragmentType": "StateOfApplicabilityRowFragment";
|
||||
};
|
||||
export type StateOfApplicabilityRowFragment$key = {
|
||||
readonly " $data"?: StateOfApplicabilityRowFragment$data;
|
||||
readonly " $fragmentSpreads": FragmentRefs<"StateOfApplicabilityRowFragment">;
|
||||
};
|
||||
|
||||
const node: ReaderFragment = {
|
||||
"argumentDefinitions": [],
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "StateOfApplicabilityRowFragment",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "id",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "name",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "createdAt",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": "canDelete",
|
||||
"args": [
|
||||
{
|
||||
"kind": "Literal",
|
||||
"name": "action",
|
||||
"value": "core:state-of-applicability:delete"
|
||||
}
|
||||
],
|
||||
"kind": "ScalarField",
|
||||
"name": "permission",
|
||||
"storageKey": "permission(action:\"core:state-of-applicability:delete\")"
|
||||
},
|
||||
{
|
||||
"alias": "statementsInfo",
|
||||
"args": null,
|
||||
"concreteType": "ApplicabilityStatementConnection",
|
||||
"kind": "LinkedField",
|
||||
"name": "applicabilityStatements",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "totalCount",
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"type": "StateOfApplicability",
|
||||
"abstractKey": null
|
||||
};
|
||||
|
||||
(node as any).hash = "4f393828b72d1b7a4417a8eb2a5415b7";
|
||||
|
||||
export default node;
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @generated SignedSource<<3472918fdff6205597f39a6310f2ee08>>
|
||||
* @generated SignedSource<<d1798d7a1c00385a597093970a92e778>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
@@ -10,33 +10,25 @@
|
||||
|
||||
import { ReaderFragment } from 'relay-runtime';
|
||||
import { FragmentRefs } from "relay-runtime";
|
||||
export type StateOfApplicabilityGraphPaginatedFragment$data = {
|
||||
export type StatesOfApplicabilityPageFragment$data = {
|
||||
readonly id: string;
|
||||
readonly statesOfApplicability: {
|
||||
readonly __id: string;
|
||||
readonly edges: ReadonlyArray<{
|
||||
readonly node: {
|
||||
readonly canDelete: boolean;
|
||||
readonly controlsInfo: {
|
||||
readonly totalCount: number;
|
||||
};
|
||||
readonly createdAt: string;
|
||||
readonly id: string;
|
||||
readonly name: string;
|
||||
readonly snapshotId: string | null | undefined;
|
||||
readonly sourceId: string | null | undefined;
|
||||
readonly updatedAt: string;
|
||||
readonly " $fragmentSpreads": FragmentRefs<"StateOfApplicabilityRowFragment">;
|
||||
};
|
||||
}>;
|
||||
};
|
||||
readonly " $fragmentType": "StateOfApplicabilityGraphPaginatedFragment";
|
||||
readonly " $fragmentType": "StatesOfApplicabilityPageFragment";
|
||||
};
|
||||
export type StateOfApplicabilityGraphPaginatedFragment$key = {
|
||||
readonly " $data"?: StateOfApplicabilityGraphPaginatedFragment$data;
|
||||
readonly " $fragmentSpreads": FragmentRefs<"StateOfApplicabilityGraphPaginatedFragment">;
|
||||
export type StatesOfApplicabilityPageFragment$key = {
|
||||
readonly " $data"?: StatesOfApplicabilityPageFragment$data;
|
||||
readonly " $fragmentSpreads": FragmentRefs<"StatesOfApplicabilityPageFragment">;
|
||||
};
|
||||
|
||||
import StateOfApplicabilityListQuery_graphql from './StateOfApplicabilityListQuery.graphql';
|
||||
import StatesOfApplicabilityPagePaginationQuery_graphql from './StatesOfApplicabilityPagePaginationQuery.graphql';
|
||||
|
||||
const node: ReaderFragment = (function(){
|
||||
var v0 = [
|
||||
@@ -112,14 +104,14 @@ return {
|
||||
"fragmentPathInResult": [
|
||||
"node"
|
||||
],
|
||||
"operation": StateOfApplicabilityListQuery_graphql,
|
||||
"operation": StatesOfApplicabilityPagePaginationQuery_graphql,
|
||||
"identifierInfo": {
|
||||
"identifierField": "id",
|
||||
"identifierQueryVariableName": "id"
|
||||
}
|
||||
}
|
||||
},
|
||||
"name": "StateOfApplicabilityGraphPaginatedFragment",
|
||||
"name": "StatesOfApplicabilityPageFragment",
|
||||
"selections": [
|
||||
{
|
||||
"alias": "statesOfApplicability",
|
||||
@@ -128,16 +120,11 @@ return {
|
||||
"kind": "Variable",
|
||||
"name": "filter",
|
||||
"variableName": "filter"
|
||||
},
|
||||
{
|
||||
"kind": "Variable",
|
||||
"name": "orderBy",
|
||||
"variableName": "order"
|
||||
}
|
||||
],
|
||||
"concreteType": "StateOfApplicabilityConnection",
|
||||
"kind": "LinkedField",
|
||||
"name": "__StateOfApplicabilityGraphPaginatedQuery_statesOfApplicability_connection",
|
||||
"name": "__StatesOfApplicabilityPage_statesOfApplicability_connection",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
@@ -158,76 +145,9 @@ return {
|
||||
"selections": [
|
||||
(v1/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "name",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "sourceId",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "snapshotId",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "createdAt",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "updatedAt",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": "canDelete",
|
||||
"args": [
|
||||
{
|
||||
"kind": "Literal",
|
||||
"name": "action",
|
||||
"value": "core:state-of-applicability:delete"
|
||||
}
|
||||
],
|
||||
"kind": "ScalarField",
|
||||
"name": "permission",
|
||||
"storageKey": "permission(action:\"core:state-of-applicability:delete\")"
|
||||
},
|
||||
{
|
||||
"alias": "controlsInfo",
|
||||
"args": [
|
||||
{
|
||||
"kind": "Literal",
|
||||
"name": "first",
|
||||
"value": 0
|
||||
}
|
||||
],
|
||||
"concreteType": "ControlConnection",
|
||||
"kind": "LinkedField",
|
||||
"name": "controls",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "totalCount",
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": "controls(first:0)"
|
||||
"kind": "FragmentSpread",
|
||||
"name": "StateOfApplicabilityRowFragment"
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
@@ -310,6 +230,6 @@ return {
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "82cf2a5ce701c34a41f8166371dd75c3";
|
||||
(node as any).hash = "30ea5e415eca53b251933d1ce086a9b7";
|
||||
|
||||
export default node;
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @generated SignedSource<<8bdd74dfae1b656006a07b2f89fe525d>>
|
||||
* @generated SignedSource<<be08976a189938be59196a67454e0a60>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
@@ -19,7 +19,7 @@ export type StateOfApplicabilityOrder = {
|
||||
direction: OrderDirection;
|
||||
field: StateOfApplicabilityOrderField;
|
||||
};
|
||||
export type StateOfApplicabilityListQuery$variables = {
|
||||
export type StatesOfApplicabilityPagePaginationQuery$variables = {
|
||||
after?: string | null | undefined;
|
||||
before?: string | null | undefined;
|
||||
filter?: StateOfApplicabilityFilter | null | undefined;
|
||||
@@ -28,14 +28,14 @@ export type StateOfApplicabilityListQuery$variables = {
|
||||
last?: number | null | undefined;
|
||||
order?: StateOfApplicabilityOrder | null | undefined;
|
||||
};
|
||||
export type StateOfApplicabilityListQuery$data = {
|
||||
export type StatesOfApplicabilityPagePaginationQuery$data = {
|
||||
readonly node: {
|
||||
readonly " $fragmentSpreads": FragmentRefs<"StateOfApplicabilityGraphPaginatedFragment">;
|
||||
readonly " $fragmentSpreads": FragmentRefs<"StatesOfApplicabilityPageFragment">;
|
||||
};
|
||||
};
|
||||
export type StateOfApplicabilityListQuery = {
|
||||
response: StateOfApplicabilityListQuery$data;
|
||||
variables: StateOfApplicabilityListQuery$variables;
|
||||
export type StatesOfApplicabilityPagePaginationQuery = {
|
||||
response: StatesOfApplicabilityPagePaginationQuery$data;
|
||||
variables: StatesOfApplicabilityPagePaginationQuery$variables;
|
||||
};
|
||||
|
||||
const node: ConcreteRequest = (function(){
|
||||
@@ -150,7 +150,7 @@ return {
|
||||
],
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "StateOfApplicabilityListQuery",
|
||||
"name": "StatesOfApplicabilityPagePaginationQuery",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
@@ -174,7 +174,7 @@ return {
|
||||
}
|
||||
],
|
||||
"kind": "FragmentSpread",
|
||||
"name": "StateOfApplicabilityGraphPaginatedFragment"
|
||||
"name": "StatesOfApplicabilityPageFragment"
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
@@ -195,7 +195,7 @@ return {
|
||||
(v4/*: any*/)
|
||||
],
|
||||
"kind": "Operation",
|
||||
"name": "StateOfApplicabilityListQuery",
|
||||
"name": "StatesOfApplicabilityPagePaginationQuery",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
@@ -242,20 +242,6 @@ return {
|
||||
"name": "name",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "sourceId",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "snapshotId",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
@@ -263,13 +249,6 @@ return {
|
||||
"name": "createdAt",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "updatedAt",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": "canDelete",
|
||||
"args": [
|
||||
@@ -284,17 +263,11 @@ return {
|
||||
"storageKey": "permission(action:\"core:state-of-applicability:delete\")"
|
||||
},
|
||||
{
|
||||
"alias": "controlsInfo",
|
||||
"args": [
|
||||
{
|
||||
"kind": "Literal",
|
||||
"name": "first",
|
||||
"value": 0
|
||||
}
|
||||
],
|
||||
"concreteType": "ControlConnection",
|
||||
"alias": "statementsInfo",
|
||||
"args": null,
|
||||
"concreteType": "ApplicabilityStatementConnection",
|
||||
"kind": "LinkedField",
|
||||
"name": "controls",
|
||||
"name": "applicabilityStatements",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
@@ -305,7 +278,7 @@ return {
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": "controls(first:0)"
|
||||
"storageKey": null
|
||||
},
|
||||
(v13/*: any*/)
|
||||
],
|
||||
@@ -379,11 +352,10 @@ return {
|
||||
"alias": null,
|
||||
"args": (v15/*: any*/),
|
||||
"filters": [
|
||||
"orderBy",
|
||||
"filter"
|
||||
],
|
||||
"handle": "connection",
|
||||
"key": "StateOfApplicabilityGraphPaginatedQuery_statesOfApplicability",
|
||||
"key": "StatesOfApplicabilityPage_statesOfApplicability",
|
||||
"kind": "LinkedHandle",
|
||||
"name": "statesOfApplicability"
|
||||
}
|
||||
@@ -397,16 +369,16 @@ return {
|
||||
]
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "68d8b8bc491e464ea692b6d37952bcbf",
|
||||
"cacheID": "812dcba28ad3fb441e49e281a199fd62",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "StateOfApplicabilityListQuery",
|
||||
"name": "StatesOfApplicabilityPagePaginationQuery",
|
||||
"operationKind": "query",
|
||||
"text": "query StateOfApplicabilityListQuery(\n $after: CursorKey = null\n $before: CursorKey = null\n $filter: StateOfApplicabilityFilter = {snapshotId: null}\n $first: Int = 50\n $last: Int = null\n $order: StateOfApplicabilityOrder = {direction: DESC, field: CREATED_AT}\n $id: ID!\n) {\n node(id: $id) {\n __typename\n ...StateOfApplicabilityGraphPaginatedFragment_4cFWzS\n id\n }\n}\n\nfragment StateOfApplicabilityGraphPaginatedFragment_4cFWzS on Organization {\n statesOfApplicability(first: $first, after: $after, last: $last, before: $before, orderBy: $order, filter: $filter) {\n edges {\n node {\n id\n name\n sourceId\n snapshotId\n createdAt\n updatedAt\n canDelete: permission(action: \"core:state-of-applicability:delete\")\n controlsInfo: controls(first: 0) {\n totalCount\n }\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n hasPreviousPage\n startCursor\n }\n }\n id\n}\n"
|
||||
"text": "query StatesOfApplicabilityPagePaginationQuery(\n $after: CursorKey = null\n $before: CursorKey = null\n $filter: StateOfApplicabilityFilter = {snapshotId: null}\n $first: Int = 50\n $last: Int = null\n $order: StateOfApplicabilityOrder = {direction: DESC, field: CREATED_AT}\n $id: ID!\n) {\n node(id: $id) {\n __typename\n ...StatesOfApplicabilityPageFragment_4cFWzS\n id\n }\n}\n\nfragment StateOfApplicabilityRowFragment on StateOfApplicability {\n id\n name\n createdAt\n canDelete: permission(action: \"core:state-of-applicability:delete\")\n statementsInfo: applicabilityStatements {\n totalCount\n }\n}\n\nfragment StatesOfApplicabilityPageFragment_4cFWzS on Organization {\n statesOfApplicability(first: $first, after: $after, last: $last, before: $before, orderBy: $order, filter: $filter) {\n edges {\n node {\n id\n ...StateOfApplicabilityRowFragment\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n hasPreviousPage\n startCursor\n }\n }\n id\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "82cf2a5ce701c34a41f8166371dd75c3";
|
||||
(node as any).hash = "30ea5e415eca53b251933d1ce086a9b7";
|
||||
|
||||
export default node;
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @generated SignedSource<<a1b6d40084a5ddfad764dd1f6fa32607>>
|
||||
* @generated SignedSource<<edaa0e98c84869aff4c1b3945fddd09a>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
@@ -10,24 +10,24 @@
|
||||
|
||||
import { ConcreteRequest } from 'relay-runtime';
|
||||
import { FragmentRefs } from "relay-runtime";
|
||||
export type StateOfApplicabilityGraphPaginatedQuery$variables = {
|
||||
export type StatesOfApplicabilityPageQuery$variables = {
|
||||
organizationId: string;
|
||||
};
|
||||
export type StateOfApplicabilityGraphPaginatedQuery$data = {
|
||||
export type StatesOfApplicabilityPageQuery$data = {
|
||||
readonly organization: {
|
||||
readonly __typename: "Organization";
|
||||
readonly canCreateStateOfApplicability: boolean;
|
||||
readonly id: string;
|
||||
readonly " $fragmentSpreads": FragmentRefs<"StateOfApplicabilityGraphPaginatedFragment">;
|
||||
readonly " $fragmentSpreads": FragmentRefs<"StatesOfApplicabilityPageFragment">;
|
||||
} | {
|
||||
// This will never be '%other', but we need some
|
||||
// value in case none of the concrete values match.
|
||||
readonly __typename: "%other";
|
||||
};
|
||||
};
|
||||
export type StateOfApplicabilityGraphPaginatedQuery = {
|
||||
response: StateOfApplicabilityGraphPaginatedQuery$data;
|
||||
variables: StateOfApplicabilityGraphPaginatedQuery$variables;
|
||||
export type StatesOfApplicabilityPageQuery = {
|
||||
response: StatesOfApplicabilityPageQuery$data;
|
||||
variables: StatesOfApplicabilityPageQuery$variables;
|
||||
};
|
||||
|
||||
const node: ConcreteRequest = (function(){
|
||||
@@ -99,7 +99,7 @@ return {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "StateOfApplicabilityGraphPaginatedQuery",
|
||||
"name": "StatesOfApplicabilityPageQuery",
|
||||
"selections": [
|
||||
{
|
||||
"alias": "organization",
|
||||
@@ -118,7 +118,7 @@ return {
|
||||
{
|
||||
"args": null,
|
||||
"kind": "FragmentSpread",
|
||||
"name": "StateOfApplicabilityGraphPaginatedFragment"
|
||||
"name": "StatesOfApplicabilityPageFragment"
|
||||
}
|
||||
],
|
||||
"type": "Organization",
|
||||
@@ -135,7 +135,7 @@ return {
|
||||
"operation": {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Operation",
|
||||
"name": "StateOfApplicabilityGraphPaginatedQuery",
|
||||
"name": "StatesOfApplicabilityPageQuery",
|
||||
"selections": [
|
||||
{
|
||||
"alias": "organization",
|
||||
@@ -183,20 +183,6 @@ return {
|
||||
"name": "name",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "sourceId",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "snapshotId",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
@@ -204,13 +190,6 @@ return {
|
||||
"name": "createdAt",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "updatedAt",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": "canDelete",
|
||||
"args": [
|
||||
@@ -225,17 +204,11 @@ return {
|
||||
"storageKey": "permission(action:\"core:state-of-applicability:delete\")"
|
||||
},
|
||||
{
|
||||
"alias": "controlsInfo",
|
||||
"args": [
|
||||
{
|
||||
"kind": "Literal",
|
||||
"name": "first",
|
||||
"value": 0
|
||||
}
|
||||
],
|
||||
"concreteType": "ControlConnection",
|
||||
"alias": "statementsInfo",
|
||||
"args": null,
|
||||
"concreteType": "ApplicabilityStatementConnection",
|
||||
"kind": "LinkedField",
|
||||
"name": "controls",
|
||||
"name": "applicabilityStatements",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
@@ -246,7 +219,7 @@ return {
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": "controls(first:0)"
|
||||
"storageKey": null
|
||||
},
|
||||
(v2/*: any*/)
|
||||
],
|
||||
@@ -320,11 +293,10 @@ return {
|
||||
"alias": null,
|
||||
"args": (v5/*: any*/),
|
||||
"filters": [
|
||||
"orderBy",
|
||||
"filter"
|
||||
],
|
||||
"handle": "connection",
|
||||
"key": "StateOfApplicabilityGraphPaginatedQuery_statesOfApplicability",
|
||||
"key": "StatesOfApplicabilityPage_statesOfApplicability",
|
||||
"kind": "LinkedHandle",
|
||||
"name": "statesOfApplicability"
|
||||
}
|
||||
@@ -338,16 +310,16 @@ return {
|
||||
]
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "3d53dfeb5366c889e790a88116dd3a4a",
|
||||
"cacheID": "d0baef050f4750119d752ca5e17b134a",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "StateOfApplicabilityGraphPaginatedQuery",
|
||||
"name": "StatesOfApplicabilityPageQuery",
|
||||
"operationKind": "query",
|
||||
"text": "query StateOfApplicabilityGraphPaginatedQuery(\n $organizationId: ID!\n) {\n organization: node(id: $organizationId) {\n __typename\n ... on Organization {\n id\n canCreateStateOfApplicability: permission(action: \"core:state-of-applicability:create\")\n ...StateOfApplicabilityGraphPaginatedFragment\n }\n id\n }\n}\n\nfragment StateOfApplicabilityGraphPaginatedFragment on Organization {\n statesOfApplicability(first: 50, orderBy: {direction: DESC, field: CREATED_AT}, filter: {snapshotId: null}) {\n edges {\n node {\n id\n name\n sourceId\n snapshotId\n createdAt\n updatedAt\n canDelete: permission(action: \"core:state-of-applicability:delete\")\n controlsInfo: controls(first: 0) {\n totalCount\n }\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n hasPreviousPage\n startCursor\n }\n }\n id\n}\n"
|
||||
"text": "query StatesOfApplicabilityPageQuery(\n $organizationId: ID!\n) {\n organization: node(id: $organizationId) {\n __typename\n ... on Organization {\n id\n canCreateStateOfApplicability: permission(action: \"core:state-of-applicability:create\")\n ...StatesOfApplicabilityPageFragment\n }\n id\n }\n}\n\nfragment StateOfApplicabilityRowFragment on StateOfApplicability {\n id\n name\n createdAt\n canDelete: permission(action: \"core:state-of-applicability:delete\")\n statementsInfo: applicabilityStatements {\n totalCount\n }\n}\n\nfragment StatesOfApplicabilityPageFragment on Organization {\n statesOfApplicability(first: 50, orderBy: {direction: DESC, field: CREATED_AT}, filter: {snapshotId: null}) {\n edges {\n node {\n id\n ...StateOfApplicabilityRowFragment\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n hasPreviousPage\n startCursor\n }\n }\n id\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "2182e7aea21c8eba8b2cfda1e614b6e5";
|
||||
(node as any).hash = "10fd3ffd276b002b98c3b9aa437ccbed";
|
||||
|
||||
export default node;
|
||||
@@ -15,7 +15,7 @@ import {
|
||||
Tr,
|
||||
TrButton,
|
||||
} from "@probo/ui";
|
||||
import { clsx } from "clsx";
|
||||
import clsx from "clsx";
|
||||
import { useEffect, useMemo, useState } from "react";
|
||||
import { useFragment } from "react-relay";
|
||||
import { graphql } from "relay-runtime";
|
||||
@@ -26,14 +26,15 @@ import { useOrganizationId } from "#/hooks/useOrganizationId";
|
||||
import { LinkedStatesOfApplicabilityDialog } from "./LinkedStatesOfApplicabilityDialog";
|
||||
|
||||
const linkedStateOfApplicabilityFragment = graphql`
|
||||
fragment LinkedStatesOfApplicabilityCardFragment on StateOfApplicabilityControl {
|
||||
fragment LinkedStatesOfApplicabilityCardFragment on ApplicabilityStatement {
|
||||
id
|
||||
stateOfApplicabilityId
|
||||
controlId
|
||||
stateOfApplicability {
|
||||
id
|
||||
name
|
||||
}
|
||||
control {
|
||||
id
|
||||
}
|
||||
applicability
|
||||
justification
|
||||
}
|
||||
@@ -233,7 +234,8 @@ function LinkedInfoExtractor(props: {
|
||||
controlId: string;
|
||||
}) => void;
|
||||
}) {
|
||||
const { fragment, onExtracted } = props;
|
||||
const { onExtracted, fragment } = props;
|
||||
|
||||
const data = useFragment(
|
||||
linkedStateOfApplicabilityFragment,
|
||||
fragment,
|
||||
@@ -241,10 +243,10 @@ function LinkedInfoExtractor(props: {
|
||||
|
||||
useEffect(() => {
|
||||
onExtracted({
|
||||
stateOfApplicabilityId: data.stateOfApplicabilityId,
|
||||
controlId: data.controlId,
|
||||
stateOfApplicabilityId: data.stateOfApplicability.id,
|
||||
controlId: data.control.id,
|
||||
});
|
||||
}, [data.stateOfApplicabilityId, data.controlId, onExtracted]);
|
||||
}, [data.stateOfApplicability.id, data.control.id, onExtracted]);
|
||||
|
||||
return null;
|
||||
}
|
||||
@@ -265,7 +267,7 @@ function StateOfApplicabilityRow(props: {
|
||||
|
||||
return (
|
||||
<Tr
|
||||
to={`/organizations/${organizationId}/states-of-applicability/${soa.stateOfApplicabilityId}`}
|
||||
to={`/organizations/${organizationId}/states-of-applicability/${soa.stateOfApplicability.id}`}
|
||||
>
|
||||
<Td>{soa.stateOfApplicability.name}</Td>
|
||||
<Td>
|
||||
@@ -282,8 +284,8 @@ function StateOfApplicabilityRow(props: {
|
||||
variant="secondary"
|
||||
onClick={() =>
|
||||
props.onClick(
|
||||
soa.stateOfApplicabilityId,
|
||||
soa.controlId,
|
||||
soa.stateOfApplicability.id,
|
||||
soa.control.id,
|
||||
)}
|
||||
icon={IconTrashCan}
|
||||
>
|
||||
|
||||
@@ -129,12 +129,6 @@ export const frameworkControlNodeQuery = graphql`
|
||||
canDeleteSnapshotMapping: permission(
|
||||
action: "core:control:delete-snapshot-mapping"
|
||||
)
|
||||
canCreateStateOfApplicabilityMapping: permission(
|
||||
action: "core:control:state-of-applicability-control-mapping:create"
|
||||
)
|
||||
canDeleteStateOfApplicabilityMapping: permission(
|
||||
action: "core:control:state-of-applicability-control-mapping:delete"
|
||||
)
|
||||
canCreateObligationMapping: permission(
|
||||
action: "core:control:obligation-control-mapping:create"
|
||||
)
|
||||
@@ -142,16 +136,6 @@ export const frameworkControlNodeQuery = graphql`
|
||||
action: "core:control:obligation-control-mapping:delete"
|
||||
)
|
||||
...FrameworkControlDialogFragment
|
||||
stateOfApplicabilityControls(first: 100)
|
||||
@connection(key: "FrameworkGraphControl_stateOfApplicabilityControls") {
|
||||
__id
|
||||
edges {
|
||||
node {
|
||||
id
|
||||
...LinkedStatesOfApplicabilityCardFragment
|
||||
}
|
||||
}
|
||||
}
|
||||
measures(first: 100)
|
||||
@connection(key: "FrameworkGraphControl_measures") {
|
||||
__id
|
||||
|
||||
@@ -1,244 +0,0 @@
|
||||
import {
|
||||
formatError,
|
||||
type GraphQLError,
|
||||
promisifyMutation,
|
||||
sprintf,
|
||||
} from "@probo/helpers";
|
||||
import { useTranslate } from "@probo/i18n";
|
||||
import { useConfirm, useToast } from "@probo/ui";
|
||||
import {
|
||||
type PreloadedQuery,
|
||||
useMutation,
|
||||
usePaginationFragment,
|
||||
usePreloadedQuery,
|
||||
} from "react-relay";
|
||||
import { graphql } from "relay-runtime";
|
||||
|
||||
import type { StateOfApplicabilityGraphDeleteMutation } from "#/__generated__/core/StateOfApplicabilityGraphDeleteMutation.graphql";
|
||||
import type { StateOfApplicabilityGraphPaginatedFragment$key } from "#/__generated__/core/StateOfApplicabilityGraphPaginatedFragment.graphql";
|
||||
import type { StateOfApplicabilityGraphPaginatedQuery } from "#/__generated__/core/StateOfApplicabilityGraphPaginatedQuery.graphql";
|
||||
|
||||
export const paginatedStateOfApplicabilityQuery = graphql`
|
||||
query StateOfApplicabilityGraphPaginatedQuery($organizationId: ID!) {
|
||||
organization: node(id: $organizationId) {
|
||||
__typename
|
||||
... on Organization {
|
||||
id
|
||||
canCreateStateOfApplicability: permission(action: "core:state-of-applicability:create")
|
||||
...StateOfApplicabilityGraphPaginatedFragment
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const paginatedStateOfApplicabilityFragment = graphql`
|
||||
fragment StateOfApplicabilityGraphPaginatedFragment on Organization
|
||||
@refetchable(queryName: "StateOfApplicabilityListQuery")
|
||||
@argumentDefinitions(
|
||||
first: { type: "Int", defaultValue: 50 }
|
||||
order: {
|
||||
type: "StateOfApplicabilityOrder"
|
||||
defaultValue: { direction: DESC, field: CREATED_AT }
|
||||
}
|
||||
after: { type: "CursorKey", defaultValue: null }
|
||||
before: { type: "CursorKey", defaultValue: null }
|
||||
last: { type: "Int", defaultValue: null }
|
||||
filter: { type: "StateOfApplicabilityFilter", defaultValue: { snapshotId: null } }
|
||||
) {
|
||||
statesOfApplicability(
|
||||
first: $first
|
||||
after: $after
|
||||
last: $last
|
||||
before: $before
|
||||
orderBy: $order
|
||||
filter: $filter
|
||||
) @connection(key: "StateOfApplicabilityGraphPaginatedQuery_statesOfApplicability") {
|
||||
__id
|
||||
edges {
|
||||
node {
|
||||
id
|
||||
name
|
||||
sourceId
|
||||
snapshotId
|
||||
createdAt
|
||||
updatedAt
|
||||
|
||||
canDelete: permission(action: "core:state-of-applicability:delete")
|
||||
|
||||
controlsInfo: controls(first: 0) {
|
||||
totalCount
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export function useStateOfApplicabilityQuery(
|
||||
queryRef: PreloadedQuery<StateOfApplicabilityGraphPaginatedQuery>,
|
||||
) {
|
||||
const data = usePreloadedQuery(paginatedStateOfApplicabilityQuery, queryRef);
|
||||
const pagination = usePaginationFragment(
|
||||
paginatedStateOfApplicabilityFragment,
|
||||
data.organization as StateOfApplicabilityGraphPaginatedFragment$key,
|
||||
);
|
||||
const statesOfApplicability = pagination.data.statesOfApplicability?.edges.map(edge => edge.node);
|
||||
return {
|
||||
...pagination,
|
||||
statesOfApplicability,
|
||||
connectionId: pagination.data.statesOfApplicability.__id,
|
||||
};
|
||||
}
|
||||
|
||||
export const deleteStateOfApplicabilityMutation = graphql`
|
||||
mutation StateOfApplicabilityGraphDeleteMutation(
|
||||
$input: DeleteStateOfApplicabilityInput!
|
||||
$connections: [ID!]!
|
||||
) {
|
||||
deleteStateOfApplicability(input: $input) {
|
||||
deletedStateOfApplicabilityId @deleteEdge(connections: $connections)
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const StateOfApplicabilityConnectionKey = "StateOfApplicabilityGraphPaginatedQuery_statesOfApplicability";
|
||||
|
||||
export const useDeleteStateOfApplicability = (
|
||||
stateOfApplicability: { id?: string; name?: string },
|
||||
connectionId: string,
|
||||
onSuccess?: () => void,
|
||||
) => {
|
||||
const [mutate] = useMutation<StateOfApplicabilityGraphDeleteMutation>(deleteStateOfApplicabilityMutation);
|
||||
const confirm = useConfirm();
|
||||
const { toast } = useToast();
|
||||
const { __ } = useTranslate();
|
||||
|
||||
return () => {
|
||||
if (!stateOfApplicability.id || !stateOfApplicability.name) {
|
||||
return alert(__("Failed to delete state of applicability: missing id or name"));
|
||||
}
|
||||
confirm(
|
||||
() =>
|
||||
promisifyMutation(mutate)({
|
||||
variables: {
|
||||
input: {
|
||||
stateOfApplicabilityId: stateOfApplicability.id!,
|
||||
},
|
||||
connections: [connectionId],
|
||||
},
|
||||
})
|
||||
.then(() => {
|
||||
onSuccess?.();
|
||||
})
|
||||
.catch((error) => {
|
||||
toast({
|
||||
title: __("Error"),
|
||||
description: formatError(
|
||||
__("Failed to delete state of applicability"),
|
||||
error as GraphQLError,
|
||||
),
|
||||
variant: "error",
|
||||
});
|
||||
}),
|
||||
{
|
||||
message: sprintf(
|
||||
__(
|
||||
"This will permanently delete \"%s\". This action cannot be undone.",
|
||||
),
|
||||
stateOfApplicability.name,
|
||||
),
|
||||
},
|
||||
);
|
||||
};
|
||||
};
|
||||
|
||||
export const createStateOfApplicabilityMutation = graphql`
|
||||
mutation StateOfApplicabilityGraphCreateMutation(
|
||||
$input: CreateStateOfApplicabilityInput!
|
||||
$connections: [ID!]!
|
||||
) {
|
||||
createStateOfApplicability(input: $input) {
|
||||
stateOfApplicabilityEdge @prependEdge(connections: $connections) {
|
||||
node {
|
||||
id
|
||||
name
|
||||
sourceId
|
||||
snapshotId
|
||||
createdAt
|
||||
updatedAt
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const updateStateOfApplicabilityMutation = graphql`
|
||||
mutation StateOfApplicabilityGraphUpdateMutation(
|
||||
$input: UpdateStateOfApplicabilityInput!
|
||||
) {
|
||||
updateStateOfApplicability(input: $input) {
|
||||
stateOfApplicability {
|
||||
id
|
||||
name
|
||||
sourceId
|
||||
snapshotId
|
||||
createdAt
|
||||
updatedAt
|
||||
owner {
|
||||
id
|
||||
fullName
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const stateOfApplicabilityNodeQuery = graphql`
|
||||
query StateOfApplicabilityGraphNodeQuery($stateOfApplicabilityId: ID!) {
|
||||
node(id: $stateOfApplicabilityId) {
|
||||
... on StateOfApplicability {
|
||||
id
|
||||
name
|
||||
sourceId
|
||||
snapshotId
|
||||
createdAt
|
||||
updatedAt
|
||||
canUpdate: permission(action: "core:state-of-applicability:update")
|
||||
canDelete: permission(action: "core:state-of-applicability:delete")
|
||||
canExport: permission(action: "core:state-of-applicability:export")
|
||||
organization {
|
||||
id
|
||||
}
|
||||
owner {
|
||||
id
|
||||
fullName
|
||||
}
|
||||
...StateOfApplicabilityControlsTabFragment
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const stateOfApplicabilityForEditQuery = graphql`
|
||||
query StateOfApplicabilityGraphForEditQuery($stateOfApplicabilityId: ID!) {
|
||||
node(id: $stateOfApplicabilityId) {
|
||||
... on StateOfApplicability {
|
||||
id
|
||||
name
|
||||
controls(first: 1000, orderBy: { field: SECTION_TITLE, direction: ASC }) {
|
||||
edges {
|
||||
node {
|
||||
id
|
||||
sectionTitle
|
||||
name
|
||||
framework {
|
||||
id
|
||||
name
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
@@ -26,187 +26,155 @@ import { LinkedDocumentsCard } from "#/components/documents/LinkedDocumentsCard"
|
||||
import { LinkedMeasuresCard } from "#/components/measures/LinkedMeasuresCard";
|
||||
import { LinkedObligationsCard } from "#/components/obligations/LinkedObligationsCard";
|
||||
import { LinkedSnapshotsCard } from "#/components/snapshots/LinkedSnapshotsCard";
|
||||
import { LinkedStatesOfApplicabilityCard } from "#/components/states-of-applicability/LinkedStatesOfApplicabilityCard";
|
||||
import { frameworkControlNodeQuery } from "#/hooks/graph/FrameworkGraph";
|
||||
import { useOrganizationId } from "#/hooks/useOrganizationId";
|
||||
|
||||
import { FrameworkControlDialog } from "./dialogs/FrameworkControlDialog";
|
||||
|
||||
const attachStateOfApplicabilityMutation = graphql`
|
||||
mutation FrameworkControlPageAttachStateOfApplicabilityMutation(
|
||||
$input: CreateStateOfApplicabilityControlMappingInput!
|
||||
$connections: [ID!]!
|
||||
) {
|
||||
createStateOfApplicabilityControlMapping(input: $input) {
|
||||
stateOfApplicabilityControlEdge
|
||||
@prependEdge(connections: $connections) {
|
||||
node {
|
||||
id
|
||||
...LinkedStatesOfApplicabilityCardFragment
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
const detachStateOfApplicabilityMutation = graphql`
|
||||
mutation FrameworkControlPageDetachStateOfApplicabilityMutation(
|
||||
$input: DeleteStateOfApplicabilityControlMappingInput!
|
||||
$connections: [ID!]!
|
||||
) {
|
||||
deleteStateOfApplicabilityControlMapping(input: $input) {
|
||||
deletedStateOfApplicabilityId
|
||||
deletedControlId
|
||||
deletedStateOfApplicabilityControlId
|
||||
@deleteEdge(connections: $connections)
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
const attachMeasureMutation = graphql`
|
||||
mutation FrameworkControlPageAttachMutation(
|
||||
$input: CreateControlMeasureMappingInput!
|
||||
$connections: [ID!]!
|
||||
) {
|
||||
createControlMeasureMapping(input: $input) {
|
||||
measureEdge @prependEdge(connections: $connections) {
|
||||
node {
|
||||
id
|
||||
...LinkedMeasuresCardFragment
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
mutation FrameworkControlPageAttachMutation(
|
||||
$input: CreateControlMeasureMappingInput!
|
||||
$connections: [ID!]!
|
||||
) {
|
||||
createControlMeasureMapping(input: $input) {
|
||||
measureEdge @prependEdge(connections: $connections) {
|
||||
node {
|
||||
id
|
||||
...LinkedMeasuresCardFragment
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
const detachMeasureMutation = graphql`
|
||||
mutation FrameworkControlPageDetachMutation(
|
||||
$input: DeleteControlMeasureMappingInput!
|
||||
$connections: [ID!]!
|
||||
) {
|
||||
deleteControlMeasureMapping(input: $input) {
|
||||
deletedMeasureId @deleteEdge(connections: $connections)
|
||||
}
|
||||
}
|
||||
mutation FrameworkControlPageDetachMutation(
|
||||
$input: DeleteControlMeasureMappingInput!
|
||||
$connections: [ID!]!
|
||||
) {
|
||||
deleteControlMeasureMapping(input: $input) {
|
||||
deletedMeasureId @deleteEdge(connections: $connections)
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
const attachDocumentMutation = graphql`
|
||||
mutation FrameworkControlPageAttachDocumentMutation(
|
||||
$input: CreateControlDocumentMappingInput!
|
||||
$connections: [ID!]!
|
||||
) {
|
||||
createControlDocumentMapping(input: $input) {
|
||||
documentEdge @prependEdge(connections: $connections) {
|
||||
node {
|
||||
id
|
||||
...LinkedDocumentsCardFragment
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
mutation FrameworkControlPageAttachDocumentMutation(
|
||||
$input: CreateControlDocumentMappingInput!
|
||||
$connections: [ID!]!
|
||||
) {
|
||||
createControlDocumentMapping(input: $input) {
|
||||
documentEdge @prependEdge(connections: $connections) {
|
||||
node {
|
||||
id
|
||||
...LinkedDocumentsCardFragment
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
const detachDocumentMutation = graphql`
|
||||
mutation FrameworkControlPageDetachDocumentMutation(
|
||||
$input: DeleteControlDocumentMappingInput!
|
||||
$connections: [ID!]!
|
||||
) {
|
||||
deleteControlDocumentMapping(input: $input) {
|
||||
deletedDocumentId @deleteEdge(connections: $connections)
|
||||
}
|
||||
}
|
||||
mutation FrameworkControlPageDetachDocumentMutation(
|
||||
$input: DeleteControlDocumentMappingInput!
|
||||
$connections: [ID!]!
|
||||
) {
|
||||
deleteControlDocumentMapping(input: $input) {
|
||||
deletedDocumentId @deleteEdge(connections: $connections)
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
const attachAuditMutation = graphql`
|
||||
mutation FrameworkControlPageAttachAuditMutation(
|
||||
$input: CreateControlAuditMappingInput!
|
||||
$connections: [ID!]!
|
||||
) {
|
||||
createControlAuditMapping(input: $input) {
|
||||
auditEdge @prependEdge(connections: $connections) {
|
||||
node {
|
||||
id
|
||||
...LinkedAuditsCardFragment
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
mutation FrameworkControlPageAttachAuditMutation(
|
||||
$input: CreateControlAuditMappingInput!
|
||||
$connections: [ID!]!
|
||||
) {
|
||||
createControlAuditMapping(input: $input) {
|
||||
auditEdge @prependEdge(connections: $connections) {
|
||||
node {
|
||||
id
|
||||
...LinkedAuditsCardFragment
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
const detachAuditMutation = graphql`
|
||||
mutation FrameworkControlPageDetachAuditMutation(
|
||||
$input: DeleteControlAuditMappingInput!
|
||||
$connections: [ID!]!
|
||||
) {
|
||||
deleteControlAuditMapping(input: $input) {
|
||||
deletedAuditId @deleteEdge(connections: $connections)
|
||||
}
|
||||
}
|
||||
mutation FrameworkControlPageDetachAuditMutation(
|
||||
$input: DeleteControlAuditMappingInput!
|
||||
$connections: [ID!]!
|
||||
) {
|
||||
deleteControlAuditMapping(input: $input) {
|
||||
deletedAuditId @deleteEdge(connections: $connections)
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
const attachObligationMutation = graphql`
|
||||
mutation FrameworkControlPageAttachObligationMutation(
|
||||
$input: CreateControlObligationMappingInput!
|
||||
$connections: [ID!]!
|
||||
) {
|
||||
createControlObligationMapping(input: $input) {
|
||||
obligationEdge @prependEdge(connections: $connections) {
|
||||
node {
|
||||
id
|
||||
...LinkedObligationsCardFragment
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
mutation FrameworkControlPageAttachObligationMutation(
|
||||
$input: CreateControlObligationMappingInput!
|
||||
$connections: [ID!]!
|
||||
) {
|
||||
createControlObligationMapping(input: $input) {
|
||||
obligationEdge @prependEdge(connections: $connections) {
|
||||
node {
|
||||
id
|
||||
...LinkedObligationsCardFragment
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
const detachObligationMutation = graphql`
|
||||
mutation FrameworkControlPageDetachObligationMutation(
|
||||
$input: DeleteControlObligationMappingInput!
|
||||
$connections: [ID!]!
|
||||
) {
|
||||
deleteControlObligationMapping(input: $input) {
|
||||
deletedObligationId @deleteEdge(connections: $connections)
|
||||
}
|
||||
}
|
||||
mutation FrameworkControlPageDetachObligationMutation(
|
||||
$input: DeleteControlObligationMappingInput!
|
||||
$connections: [ID!]!
|
||||
) {
|
||||
deleteControlObligationMapping(input: $input) {
|
||||
deletedObligationId @deleteEdge(connections: $connections)
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
const attachSnapshotMutation = graphql`
|
||||
mutation FrameworkControlPageAttachSnapshotMutation(
|
||||
$input: CreateControlSnapshotMappingInput!
|
||||
$connections: [ID!]!
|
||||
) {
|
||||
createControlSnapshotMapping(input: $input) {
|
||||
snapshotEdge @prependEdge(connections: $connections) {
|
||||
node {
|
||||
id
|
||||
...LinkedSnapshotsCardFragment
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
mutation FrameworkControlPageAttachSnapshotMutation(
|
||||
$input: CreateControlSnapshotMappingInput!
|
||||
$connections: [ID!]!
|
||||
) {
|
||||
createControlSnapshotMapping(input: $input) {
|
||||
snapshotEdge @prependEdge(connections: $connections) {
|
||||
node {
|
||||
id
|
||||
...LinkedSnapshotsCardFragment
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
const detachSnapshotMutation = graphql`
|
||||
mutation FrameworkControlPageDetachSnapshotMutation(
|
||||
$input: DeleteControlSnapshotMappingInput!
|
||||
$connections: [ID!]!
|
||||
) {
|
||||
deleteControlSnapshotMapping(input: $input) {
|
||||
deletedSnapshotId @deleteEdge(connections: $connections)
|
||||
}
|
||||
}
|
||||
mutation FrameworkControlPageDetachSnapshotMutation(
|
||||
$input: DeleteControlSnapshotMappingInput!
|
||||
$connections: [ID!]!
|
||||
) {
|
||||
deleteControlSnapshotMapping(input: $input) {
|
||||
deletedSnapshotId @deleteEdge(connections: $connections)
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
const deleteControlMutation = graphql`
|
||||
mutation FrameworkControlPageDeleteControlMutation(
|
||||
$input: DeleteControlInput!
|
||||
$connections: [ID!]!
|
||||
) {
|
||||
deleteControl(input: $input) {
|
||||
deletedControlId @deleteEdge(connections: $connections)
|
||||
}
|
||||
}
|
||||
mutation FrameworkControlPageDeleteControlMutation(
|
||||
$input: DeleteControlInput!
|
||||
$connections: [ID!]!
|
||||
) {
|
||||
deleteControl(input: $input) {
|
||||
deletedControlId @deleteEdge(connections: $connections)
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
type Props = {
|
||||
@@ -214,8 +182,8 @@ type Props = {
|
||||
};
|
||||
|
||||
/**
|
||||
* Display the control detail on the right panel
|
||||
*/
|
||||
* Display the control detail on the right panel
|
||||
*/
|
||||
export default function FrameworkControlPage({ queryRef }: Props) {
|
||||
const { __ } = useTranslate();
|
||||
const { toast } = useToast();
|
||||
@@ -249,10 +217,6 @@ export default function FrameworkControlPage({ queryRef }: Props) {
|
||||
);
|
||||
const [deleteControl] = useMutation(deleteControlMutation);
|
||||
|
||||
const [attachStateOfApplicability, isAttachingStateOfApplicability]
|
||||
= useMutation(attachStateOfApplicabilityMutation);
|
||||
const [detachStateOfApplicability, isDetachingStateOfApplicability]
|
||||
= useMutation(detachStateOfApplicabilityMutation);
|
||||
const [attachObligation, isAttachingObligation] = useMutation(
|
||||
attachObligationMutation,
|
||||
);
|
||||
@@ -260,13 +224,6 @@ export default function FrameworkControlPage({ queryRef }: Props) {
|
||||
detachObligationMutation,
|
||||
);
|
||||
|
||||
const canLinkStateOfApplicability
|
||||
= control.canCreateStateOfApplicabilityMapping;
|
||||
const canUnlinkStateOfApplicability
|
||||
= control.canDeleteStateOfApplicabilityMapping;
|
||||
const statesOfApplicabilityReadOnly
|
||||
= !canLinkStateOfApplicability && !canUnlinkStateOfApplicability;
|
||||
|
||||
const canLinkMeasure = control.canCreateMeasureMapping;
|
||||
const canUnlinkMeasure = control.canDeleteMeasureMapping;
|
||||
const measuresReadOnly = !canLinkMeasure && !canUnlinkMeasure;
|
||||
@@ -396,33 +353,6 @@ export default function FrameworkControlPage({ queryRef }: Props) {
|
||||
)}
|
||||
<div className={control.status === "EXCLUDED" ? "opacity-60" : ""}>
|
||||
<div className="text-base mb-4">{control.name}</div>
|
||||
<div className="mb-4">
|
||||
<LinkedStatesOfApplicabilityCard
|
||||
variant="card"
|
||||
statesOfApplicability={
|
||||
control.stateOfApplicabilityControls?.edges.map(
|
||||
edge => edge.node,
|
||||
) ?? []
|
||||
}
|
||||
params={{ controlId: control.id }}
|
||||
connectionId={
|
||||
control.stateOfApplicabilityControls?.__id ?? ""
|
||||
}
|
||||
onAttach={withErrorHandling(
|
||||
attachStateOfApplicability,
|
||||
__("Failed to link state of applicability"),
|
||||
)}
|
||||
onDetach={withErrorHandling(
|
||||
detachStateOfApplicability,
|
||||
__("Failed to unlink state of applicability"),
|
||||
)}
|
||||
disabled={
|
||||
isAttachingStateOfApplicability
|
||||
|| isDetachingStateOfApplicability
|
||||
}
|
||||
readOnly={statesOfApplicabilityReadOnly}
|
||||
/>
|
||||
</div>
|
||||
<div className="mb-4">
|
||||
<LinkedMeasuresCard
|
||||
variant="card"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { formatDate, validateSnapshotConsistency } from "@probo/helpers";
|
||||
import { formatDate, formatError, type GraphQLError, promisifyMutation, sprintf, validateSnapshotConsistency } from "@probo/helpers";
|
||||
import { usePageTitle } from "@probo/hooks";
|
||||
import { useTranslate } from "@probo/i18n";
|
||||
import {
|
||||
@@ -14,34 +14,59 @@ import {
|
||||
IconTrashCan,
|
||||
Input,
|
||||
PageHeader,
|
||||
useConfirm,
|
||||
useToast,
|
||||
} from "@probo/ui";
|
||||
import { Suspense, useState } from "react";
|
||||
import {
|
||||
ConnectionHandler,
|
||||
graphql,
|
||||
type PreloadedQuery,
|
||||
useMutation,
|
||||
usePreloadedQuery,
|
||||
} from "react-relay";
|
||||
import { useNavigate, useParams } from "react-router";
|
||||
import { z } from "zod";
|
||||
|
||||
import type { StateOfApplicabilityDetailPageDeleteMutation } from "#/__generated__/core/StateOfApplicabilityDetailPageDeleteMutation.graphql";
|
||||
import type { StateOfApplicabilityDetailPageExportMutation } from "#/__generated__/core/StateOfApplicabilityDetailPageExportMutation.graphql";
|
||||
import type { StateOfApplicabilityGraphNodeQuery } from "#/__generated__/core/StateOfApplicabilityGraphNodeQuery.graphql";
|
||||
import type { StateOfApplicabilityDetailPageQuery } from "#/__generated__/core/StateOfApplicabilityDetailPageQuery.graphql";
|
||||
import type { StateOfApplicabilityDetailPageUpdateMutation } from "#/__generated__/core/StateOfApplicabilityDetailPageUpdateMutation.graphql";
|
||||
import { PeopleSelectField } from "#/components/form/PeopleSelectField";
|
||||
import { SnapshotBanner } from "#/components/SnapshotBanner";
|
||||
import {
|
||||
StateOfApplicabilityConnectionKey,
|
||||
stateOfApplicabilityNodeQuery,
|
||||
updateStateOfApplicabilityMutation,
|
||||
useDeleteStateOfApplicability,
|
||||
} from "#/hooks/graph/StateOfApplicabilityGraph";
|
||||
import { useFormWithSchema } from "#/hooks/useFormWithSchema";
|
||||
import { useMutationWithToasts } from "#/hooks/useMutationWithToasts";
|
||||
import { useOrganizationId } from "#/hooks/useOrganizationId";
|
||||
|
||||
import StateOfApplicabilityControlsTab from "./tabs/StateOfApplicabilityControlsTab";
|
||||
|
||||
const exportStateOfApplicabilityPDFMutation = graphql`
|
||||
export const stateOfApplicabilityDetailPageQuery = graphql`
|
||||
query StateOfApplicabilityDetailPageQuery($stateOfApplicabilityId: ID!) {
|
||||
node(id: $stateOfApplicabilityId) {
|
||||
... on StateOfApplicability {
|
||||
id
|
||||
name
|
||||
sourceId
|
||||
snapshotId
|
||||
createdAt
|
||||
updatedAt
|
||||
canUpdate: permission(action: "core:state-of-applicability:update")
|
||||
canDelete: permission(action: "core:state-of-applicability:delete")
|
||||
canExport: permission(action: "core:state-of-applicability:export")
|
||||
organization {
|
||||
id
|
||||
}
|
||||
owner {
|
||||
id
|
||||
fullName
|
||||
}
|
||||
...StateOfApplicabilityControlsTabFragment
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
const exportMutation = graphql`
|
||||
mutation StateOfApplicabilityDetailPageExportMutation(
|
||||
$input: ExportStateOfApplicabilityPDFInput!
|
||||
) {
|
||||
@@ -51,8 +76,42 @@ const exportStateOfApplicabilityPDFMutation = graphql`
|
||||
}
|
||||
`;
|
||||
|
||||
const updateMutation = graphql`
|
||||
mutation StateOfApplicabilityDetailPageUpdateMutation(
|
||||
$input: UpdateStateOfApplicabilityInput!
|
||||
) {
|
||||
updateStateOfApplicability(input: $input) {
|
||||
stateOfApplicability {
|
||||
id
|
||||
name
|
||||
sourceId
|
||||
snapshotId
|
||||
createdAt
|
||||
updatedAt
|
||||
owner {
|
||||
id
|
||||
fullName
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
const deleteMutation = graphql`
|
||||
mutation StateOfApplicabilityDetailPageDeleteMutation(
|
||||
$input: DeleteStateOfApplicabilityInput!
|
||||
$connections: [ID!]!
|
||||
) {
|
||||
deleteStateOfApplicability(input: $input) {
|
||||
deletedStateOfApplicabilityId @deleteEdge(connections: $connections)
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
const StateOfApplicabilityConnectionKey = "StatesOfApplicabilityPage_statesOfApplicability";
|
||||
|
||||
type Props = {
|
||||
queryRef: PreloadedQuery<StateOfApplicabilityGraphNodeQuery>;
|
||||
queryRef: PreloadedQuery<StateOfApplicabilityDetailPageQuery>;
|
||||
};
|
||||
|
||||
export default function StateOfApplicabilityDetailPage(props: Props) {
|
||||
@@ -61,14 +120,13 @@ export default function StateOfApplicabilityDetailPage(props: Props) {
|
||||
snapshotId?: string;
|
||||
}>();
|
||||
const organizationId = useOrganizationId();
|
||||
const data = usePreloadedQuery(
|
||||
stateOfApplicabilityNodeQuery,
|
||||
props.queryRef,
|
||||
);
|
||||
const data = usePreloadedQuery(stateOfApplicabilityDetailPageQuery, props.queryRef);
|
||||
const stateOfApplicability = data.node;
|
||||
const { __ } = useTranslate();
|
||||
const navigate = useNavigate();
|
||||
const isSnapshotMode = Boolean(snapshotId);
|
||||
const confirm = useConfirm();
|
||||
const { toast } = useToast();
|
||||
|
||||
if (!stateOfApplicabilityId || !stateOfApplicability) {
|
||||
throw new Error(
|
||||
@@ -81,23 +139,55 @@ export default function StateOfApplicabilityDetailPage(props: Props) {
|
||||
const connectionId = ConnectionHandler.getConnectionID(
|
||||
organizationId,
|
||||
StateOfApplicabilityConnectionKey,
|
||||
{ filter: { snapshotId: snapshotId ?? null } },
|
||||
);
|
||||
|
||||
const deleteStateOfApplicability = useDeleteStateOfApplicability(
|
||||
stateOfApplicability,
|
||||
connectionId,
|
||||
() =>
|
||||
void navigate(
|
||||
`/organizations/${organizationId}/states-of-applicability`,
|
||||
),
|
||||
);
|
||||
const [deleteStateOfApplicability] = useMutation<StateOfApplicabilityDetailPageDeleteMutation>(deleteMutation);
|
||||
|
||||
const handleDelete = () => {
|
||||
if (!stateOfApplicability.id || !stateOfApplicability.name) {
|
||||
return alert(__("Failed to delete state of applicability: missing id or name"));
|
||||
}
|
||||
confirm(
|
||||
() =>
|
||||
promisifyMutation(deleteStateOfApplicability)({
|
||||
variables: {
|
||||
input: {
|
||||
stateOfApplicabilityId: stateOfApplicability.id!,
|
||||
},
|
||||
connections: [connectionId],
|
||||
},
|
||||
})
|
||||
.then(() => {
|
||||
void navigate(`/organizations/${organizationId}/states-of-applicability`);
|
||||
})
|
||||
.catch((error) => {
|
||||
toast({
|
||||
title: __("Error"),
|
||||
description: formatError(
|
||||
__("Failed to delete state of applicability"),
|
||||
error as GraphQLError,
|
||||
),
|
||||
variant: "error",
|
||||
});
|
||||
}),
|
||||
{
|
||||
message: sprintf(
|
||||
__(
|
||||
"This will permanently delete \"%s\". This action cannot be undone.",
|
||||
),
|
||||
stateOfApplicability.name,
|
||||
),
|
||||
},
|
||||
);
|
||||
};
|
||||
|
||||
usePageTitle(stateOfApplicability.name || __("State of Applicability"));
|
||||
|
||||
const [isEditingName, setIsEditingName] = useState(false);
|
||||
const [isEditingOwner, setIsEditingOwner] = useState(false);
|
||||
const [updateStateOfApplicability, isUpdating] = useMutationWithToasts(
|
||||
updateStateOfApplicabilityMutation,
|
||||
const [updateStateOfApplicability, isUpdating] = useMutationWithToasts<StateOfApplicabilityDetailPageUpdateMutation>(
|
||||
updateMutation,
|
||||
{
|
||||
successMessage: __("State of Applicability updated successfully."),
|
||||
errorMessage: __("Failed to update State of Applicability"),
|
||||
@@ -109,7 +199,7 @@ export default function StateOfApplicabilityDetailPage(props: Props) {
|
||||
|
||||
const [exportStateOfApplicabilityPDF, isExporting]
|
||||
= useMutationWithToasts<StateOfApplicabilityDetailPageExportMutation>(
|
||||
exportStateOfApplicabilityPDFMutation,
|
||||
exportMutation,
|
||||
{
|
||||
successMessage: __(
|
||||
"State of Applicability exported successfully.",
|
||||
@@ -298,7 +388,7 @@ export default function StateOfApplicabilityDetailPage(props: Props) {
|
||||
<DropdownItem
|
||||
variant="danger"
|
||||
icon={IconTrashCan}
|
||||
onClick={() => void deleteStateOfApplicability()}
|
||||
onClick={handleDelete}
|
||||
>
|
||||
{__("Delete")}
|
||||
</DropdownItem>
|
||||
@@ -384,7 +474,7 @@ export default function StateOfApplicabilityDetailPage(props: Props) {
|
||||
{stateOfApplicability.id && (
|
||||
<div className="space-y-4">
|
||||
<h2 className="text-base font-medium">
|
||||
{__("Controls")}
|
||||
{__("Statements")}
|
||||
</h2>
|
||||
<StateOfApplicabilityControlsTab
|
||||
stateOfApplicability={
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
import { Suspense, useEffect } from "react";
|
||||
import { useQueryLoader } from "react-relay";
|
||||
import { useParams } from "react-router";
|
||||
|
||||
import type { StateOfApplicabilityDetailPageQuery } from "#/__generated__/core/StateOfApplicabilityDetailPageQuery.graphql";
|
||||
import { PageSkeleton } from "#/components/skeletons/PageSkeleton";
|
||||
|
||||
import StateOfApplicabilityDetailPage, { stateOfApplicabilityDetailPageQuery } from "./StateOfApplicabilityDetailPage";
|
||||
|
||||
export default function StateOfApplicabilityDetailPageLoader() {
|
||||
const { stateOfApplicabilityId } = useParams<{ stateOfApplicabilityId: string }>();
|
||||
const [queryRef, loadQuery]
|
||||
= useQueryLoader<StateOfApplicabilityDetailPageQuery>(stateOfApplicabilityDetailPageQuery);
|
||||
|
||||
useEffect(() => {
|
||||
if (stateOfApplicabilityId) {
|
||||
loadQuery({ stateOfApplicabilityId });
|
||||
}
|
||||
}, [loadQuery, stateOfApplicabilityId]);
|
||||
|
||||
if (!queryRef) {
|
||||
return <PageSkeleton />;
|
||||
}
|
||||
|
||||
return (
|
||||
<Suspense fallback={<PageSkeleton />}>
|
||||
<StateOfApplicabilityDetailPage queryRef={queryRef} />
|
||||
</Suspense>
|
||||
);
|
||||
}
|
||||
@@ -1,54 +1,83 @@
|
||||
import { formatDate } from "@probo/helpers";
|
||||
import { usePageTitle } from "@probo/hooks";
|
||||
import { useTranslate } from "@probo/i18n";
|
||||
import {
|
||||
ActionDropdown,
|
||||
Button,
|
||||
Card,
|
||||
DropdownItem,
|
||||
IconPlusLarge,
|
||||
IconTrashCan,
|
||||
PageHeader,
|
||||
Table,
|
||||
Tbody,
|
||||
Td,
|
||||
Th,
|
||||
Thead,
|
||||
Tr,
|
||||
} from "@probo/ui";
|
||||
import { useEffect } from "react";
|
||||
import {
|
||||
graphql,
|
||||
type PreloadedQuery,
|
||||
usePaginationFragment,
|
||||
usePreloadedQuery,
|
||||
} from "react-relay";
|
||||
import { useParams } from "react-router";
|
||||
|
||||
import type {
|
||||
StateOfApplicabilityGraphPaginatedFragment$data,
|
||||
StateOfApplicabilityGraphPaginatedFragment$key,
|
||||
} from "#/__generated__/core/StateOfApplicabilityGraphPaginatedFragment.graphql";
|
||||
import type { StateOfApplicabilityGraphPaginatedQuery } from "#/__generated__/core/StateOfApplicabilityGraphPaginatedQuery.graphql";
|
||||
import type { StateOfApplicabilityListQuery } from "#/__generated__/core/StateOfApplicabilityListQuery.graphql";
|
||||
import type { StatesOfApplicabilityPageFragment$key } from "#/__generated__/core/StatesOfApplicabilityPageFragment.graphql";
|
||||
import type { StatesOfApplicabilityPagePaginationQuery } from "#/__generated__/core/StatesOfApplicabilityPagePaginationQuery.graphql";
|
||||
import type { StatesOfApplicabilityPageQuery } from "#/__generated__/core/StatesOfApplicabilityPageQuery.graphql";
|
||||
import { SnapshotBanner } from "#/components/SnapshotBanner";
|
||||
import {
|
||||
paginatedStateOfApplicabilityFragment,
|
||||
paginatedStateOfApplicabilityQuery,
|
||||
useDeleteStateOfApplicability,
|
||||
} from "#/hooks/graph/StateOfApplicabilityGraph";
|
||||
import { useOrganizationId } from "#/hooks/useOrganizationId";
|
||||
import type { NodeOf } from "#/types";
|
||||
|
||||
import { StateOfApplicabilityRow } from "./_components/StateOfApplicabilityRow";
|
||||
import { CreateStateOfApplicabilityDialog } from "./dialogs/CreateStateOfApplicabilityDialog";
|
||||
|
||||
type StateOfApplicability = NodeOf<
|
||||
StateOfApplicabilityGraphPaginatedFragment$data["statesOfApplicability"]
|
||||
>;
|
||||
export const statesOfApplicabilityPageQuery = graphql`
|
||||
query StatesOfApplicabilityPageQuery($organizationId: ID!) {
|
||||
organization: node(id: $organizationId) {
|
||||
__typename
|
||||
... on Organization {
|
||||
id
|
||||
canCreateStateOfApplicability: permission(action: "core:state-of-applicability:create")
|
||||
...StatesOfApplicabilityPageFragment
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
const paginatedFragment = graphql`
|
||||
fragment StatesOfApplicabilityPageFragment on Organization
|
||||
@refetchable(queryName: "StatesOfApplicabilityPagePaginationQuery")
|
||||
@argumentDefinitions(
|
||||
first: { type: "Int", defaultValue: 50 }
|
||||
order: {
|
||||
type: "StateOfApplicabilityOrder"
|
||||
defaultValue: { direction: DESC, field: CREATED_AT }
|
||||
}
|
||||
after: { type: "CursorKey", defaultValue: null }
|
||||
before: { type: "CursorKey", defaultValue: null }
|
||||
last: { type: "Int", defaultValue: null }
|
||||
filter: { type: "StateOfApplicabilityFilter", defaultValue: { snapshotId: null } }
|
||||
) {
|
||||
statesOfApplicability(
|
||||
first: $first
|
||||
after: $after
|
||||
last: $last
|
||||
before: $before
|
||||
orderBy: $order
|
||||
filter: $filter
|
||||
) @connection(key: "StatesOfApplicabilityPage_statesOfApplicability", filters: ["filter"]) {
|
||||
__id
|
||||
edges {
|
||||
node {
|
||||
id
|
||||
...StateOfApplicabilityRowFragment
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export default function StatesOfApplicabilityPage({
|
||||
queryRef,
|
||||
}: {
|
||||
queryRef: PreloadedQuery<StateOfApplicabilityGraphPaginatedQuery>;
|
||||
queryRef: PreloadedQuery<StatesOfApplicabilityPageQuery>;
|
||||
}) {
|
||||
const { __ } = useTranslate();
|
||||
const { snapshotId } = useParams<{ snapshotId?: string }>();
|
||||
@@ -56,11 +85,7 @@ export default function StatesOfApplicabilityPage({
|
||||
|
||||
usePageTitle(__("States of Applicability"));
|
||||
|
||||
const { organization }
|
||||
= usePreloadedQuery<StateOfApplicabilityGraphPaginatedQuery>(
|
||||
paginatedStateOfApplicabilityQuery,
|
||||
queryRef,
|
||||
);
|
||||
const { organization } = usePreloadedQuery(statesOfApplicabilityPageQuery, queryRef);
|
||||
|
||||
if (organization.__typename !== "Organization") {
|
||||
throw new Error("Organization not found");
|
||||
@@ -73,11 +98,10 @@ export default function StatesOfApplicabilityPage({
|
||||
refetch,
|
||||
isLoadingNext,
|
||||
} = usePaginationFragment<
|
||||
StateOfApplicabilityListQuery,
|
||||
StateOfApplicabilityGraphPaginatedFragment$key
|
||||
>(paginatedStateOfApplicabilityFragment, organization);
|
||||
StatesOfApplicabilityPagePaginationQuery,
|
||||
StatesOfApplicabilityPageFragment$key
|
||||
>(paginatedFragment, organization);
|
||||
|
||||
// Refetch with snapshot filter when in snapshot mode
|
||||
useEffect(() => {
|
||||
if (snapshotId) {
|
||||
refetch(
|
||||
@@ -87,12 +111,6 @@ export default function StatesOfApplicabilityPage({
|
||||
}
|
||||
}, [snapshotId, refetch]);
|
||||
|
||||
const hasAnyAction
|
||||
= !isSnapshotMode
|
||||
&& statesOfApplicability.edges
|
||||
.map(edge => edge.node)
|
||||
.some(({ canDelete }) => canDelete);
|
||||
|
||||
return (
|
||||
<div className="space-y-6">
|
||||
{snapshotId && <SnapshotBanner snapshotId={snapshotId} />}
|
||||
@@ -123,16 +141,14 @@ export default function StatesOfApplicabilityPage({
|
||||
<Th>{__("Name")}</Th>
|
||||
<Th>{__("Created at")}</Th>
|
||||
<Th>{__("Controls")}</Th>
|
||||
{hasAnyAction && <Th>{__("Actions")}</Th>}
|
||||
</Tr>
|
||||
</Thead>
|
||||
<Tbody>
|
||||
{statesOfApplicability.edges.map(edge => (
|
||||
<StateOfApplicabilityRow
|
||||
key={edge.node.id}
|
||||
stateOfApplicability={edge.node}
|
||||
fKey={edge.node}
|
||||
connectionId={statesOfApplicability.__id}
|
||||
hasAnyAction={hasAnyAction}
|
||||
/>
|
||||
))}
|
||||
</Tbody>
|
||||
@@ -170,56 +186,3 @@ export default function StatesOfApplicabilityPage({
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
function StateOfApplicabilityRow({
|
||||
stateOfApplicability,
|
||||
connectionId,
|
||||
hasAnyAction,
|
||||
}: {
|
||||
stateOfApplicability: StateOfApplicability;
|
||||
connectionId: string;
|
||||
hasAnyAction: boolean;
|
||||
}) {
|
||||
const { __ } = useTranslate();
|
||||
const organizationId = useOrganizationId();
|
||||
const { snapshotId } = useParams<{ snapshotId?: string }>();
|
||||
const deleteStateOfApplicability = useDeleteStateOfApplicability(
|
||||
stateOfApplicability,
|
||||
connectionId,
|
||||
);
|
||||
|
||||
const detailUrl = snapshotId
|
||||
? `/organizations/${organizationId}/snapshots/${snapshotId}/states-of-applicability/${stateOfApplicability.id}`
|
||||
: `/organizations/${organizationId}/states-of-applicability/${stateOfApplicability.id}`;
|
||||
|
||||
return (
|
||||
<Tr to={detailUrl}>
|
||||
<Td>{stateOfApplicability.name}</Td>
|
||||
<Td>
|
||||
<time dateTime={stateOfApplicability.createdAt}>
|
||||
{formatDate(stateOfApplicability.createdAt)}
|
||||
</time>
|
||||
</Td>
|
||||
<Td>{stateOfApplicability.controlsInfo?.totalCount ?? 0}</Td>
|
||||
{hasAnyAction && (
|
||||
<Td noLink width={50} className="text-end">
|
||||
<ActionDropdown>
|
||||
{stateOfApplicability.canDelete && (
|
||||
<DropdownItem
|
||||
icon={IconTrashCan}
|
||||
variant="danger"
|
||||
onSelect={(e) => {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
deleteStateOfApplicability();
|
||||
}}
|
||||
>
|
||||
{__("Delete")}
|
||||
</DropdownItem>
|
||||
)}
|
||||
</ActionDropdown>
|
||||
</Td>
|
||||
)}
|
||||
</Tr>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
import { Suspense, useEffect } from "react";
|
||||
import { useQueryLoader } from "react-relay";
|
||||
|
||||
import type { StatesOfApplicabilityPageQuery } from "#/__generated__/core/StatesOfApplicabilityPageQuery.graphql";
|
||||
import { PageSkeleton } from "#/components/skeletons/PageSkeleton";
|
||||
import { useOrganizationId } from "#/hooks/useOrganizationId";
|
||||
|
||||
import StatesOfApplicabilityPage, { statesOfApplicabilityPageQuery } from "./StatesOfApplicabilityPage";
|
||||
|
||||
export default function StatesOfApplicabilityPageLoader() {
|
||||
const organizationId = useOrganizationId();
|
||||
const [queryRef, loadQuery]
|
||||
= useQueryLoader<StatesOfApplicabilityPageQuery>(statesOfApplicabilityPageQuery);
|
||||
|
||||
useEffect(() => {
|
||||
loadQuery({ organizationId });
|
||||
}, [loadQuery, organizationId]);
|
||||
|
||||
if (!queryRef) {
|
||||
return <PageSkeleton />;
|
||||
}
|
||||
|
||||
return (
|
||||
<Suspense fallback={<PageSkeleton />}>
|
||||
<StatesOfApplicabilityPage queryRef={queryRef} />
|
||||
</Suspense>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,127 @@
|
||||
import { formatDate, formatError, type GraphQLError, promisifyMutation, sprintf } from "@probo/helpers";
|
||||
import { useTranslate } from "@probo/i18n";
|
||||
import {
|
||||
ActionDropdown,
|
||||
DropdownItem,
|
||||
IconTrashCan,
|
||||
Td,
|
||||
Tr,
|
||||
useConfirm,
|
||||
useToast,
|
||||
} from "@probo/ui";
|
||||
import { useFragment, useMutation } from "react-relay";
|
||||
import { useParams } from "react-router";
|
||||
import { graphql } from "relay-runtime";
|
||||
|
||||
import type { StateOfApplicabilityRowDeleteMutation } from "#/__generated__/core/StateOfApplicabilityRowDeleteMutation.graphql";
|
||||
import type { StateOfApplicabilityRowFragment$key } from "#/__generated__/core/StateOfApplicabilityRowFragment.graphql";
|
||||
import { useOrganizationId } from "#/hooks/useOrganizationId";
|
||||
|
||||
const fragment = graphql`
|
||||
fragment StateOfApplicabilityRowFragment on StateOfApplicability {
|
||||
id
|
||||
name
|
||||
createdAt
|
||||
canDelete: permission(action: "core:state-of-applicability:delete")
|
||||
statementsInfo: applicabilityStatements {
|
||||
totalCount
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
const deleteMutation = graphql`
|
||||
mutation StateOfApplicabilityRowDeleteMutation(
|
||||
$input: DeleteStateOfApplicabilityInput!
|
||||
$connections: [ID!]!
|
||||
) {
|
||||
deleteStateOfApplicability(input: $input) {
|
||||
deletedStateOfApplicabilityId @deleteEdge(connections: $connections)
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
type Props = {
|
||||
fKey: StateOfApplicabilityRowFragment$key;
|
||||
connectionId: string;
|
||||
};
|
||||
|
||||
export function StateOfApplicabilityRow({ fKey, connectionId }: Props) {
|
||||
const { __ } = useTranslate();
|
||||
const organizationId = useOrganizationId();
|
||||
const { snapshotId } = useParams<{ snapshotId?: string }>();
|
||||
const confirm = useConfirm();
|
||||
const { toast } = useToast();
|
||||
const isSnapshotMode = Boolean(snapshotId);
|
||||
|
||||
const stateOfApplicability = useFragment(fragment, fKey);
|
||||
const canDelete = !isSnapshotMode && stateOfApplicability.canDelete;
|
||||
|
||||
const [deleteStateOfApplicability] = useMutation<StateOfApplicabilityRowDeleteMutation>(deleteMutation);
|
||||
|
||||
const handleDelete = () => {
|
||||
if (!stateOfApplicability.id || !stateOfApplicability.name) {
|
||||
return alert(__("Failed to delete state of applicability: missing id or name"));
|
||||
}
|
||||
confirm(
|
||||
() =>
|
||||
promisifyMutation(deleteStateOfApplicability)({
|
||||
variables: {
|
||||
input: {
|
||||
stateOfApplicabilityId: stateOfApplicability.id,
|
||||
},
|
||||
connections: [connectionId],
|
||||
},
|
||||
}).catch((error) => {
|
||||
toast({
|
||||
title: __("Error"),
|
||||
description: formatError(
|
||||
__("Failed to delete state of applicability"),
|
||||
error as GraphQLError,
|
||||
),
|
||||
variant: "error",
|
||||
});
|
||||
}),
|
||||
{
|
||||
message: sprintf(
|
||||
__(
|
||||
"This will permanently delete \"%s\". This action cannot be undone.",
|
||||
),
|
||||
stateOfApplicability.name,
|
||||
),
|
||||
},
|
||||
);
|
||||
};
|
||||
|
||||
const detailUrl = snapshotId
|
||||
? `/organizations/${organizationId}/snapshots/${snapshotId}/states-of-applicability/${stateOfApplicability.id}`
|
||||
: `/organizations/${organizationId}/states-of-applicability/${stateOfApplicability.id}`;
|
||||
|
||||
return (
|
||||
<Tr to={detailUrl}>
|
||||
<Td>{stateOfApplicability.name}</Td>
|
||||
<Td>
|
||||
<time dateTime={stateOfApplicability.createdAt}>
|
||||
{formatDate(stateOfApplicability.createdAt)}
|
||||
</time>
|
||||
</Td>
|
||||
<Td>{stateOfApplicability.statementsInfo?.totalCount ?? 0}</Td>
|
||||
{canDelete && (
|
||||
<Td noLink width={50} className="text-end">
|
||||
<ActionDropdown>
|
||||
<DropdownItem
|
||||
icon={IconTrashCan}
|
||||
variant="danger"
|
||||
onSelect={(e) => {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
handleDelete();
|
||||
}}
|
||||
>
|
||||
{__("Delete")}
|
||||
</DropdownItem>
|
||||
</ActionDropdown>
|
||||
</Td>
|
||||
)}
|
||||
</Tr>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,525 @@
|
||||
import { useTranslate } from "@probo/i18n";
|
||||
import {
|
||||
Badge,
|
||||
Breadcrumb,
|
||||
Button,
|
||||
Dialog,
|
||||
DialogContent,
|
||||
DialogFooter,
|
||||
IconCheckmark1,
|
||||
IconChevronDown,
|
||||
IconChevronUp,
|
||||
IconMagnifyingGlass,
|
||||
Input,
|
||||
Option,
|
||||
Select,
|
||||
Spinner,
|
||||
Textarea,
|
||||
useDialogRef,
|
||||
} from "@probo/ui";
|
||||
import { forwardRef, Suspense, useImperativeHandle, useMemo, useState } from "react";
|
||||
import { graphql, useLazyLoadQuery } from "react-relay";
|
||||
|
||||
import type { AddApplicabilityStatementDialogQuery } from "#/__generated__/core/AddApplicabilityStatementDialogQuery.graphql";
|
||||
import { useMutationWithToasts } from "#/hooks/useMutationWithToasts";
|
||||
|
||||
const query = graphql`
|
||||
query AddApplicabilityStatementDialogQuery($stateOfApplicabilityId: ID!, $organizationId: ID!) {
|
||||
stateOfApplicability: node(id: $stateOfApplicabilityId) {
|
||||
... on StateOfApplicability {
|
||||
id
|
||||
applicabilityStatements(first: 10000) {
|
||||
edges {
|
||||
node {
|
||||
id
|
||||
applicability
|
||||
justification
|
||||
control {
|
||||
id
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
organization: node(id: $organizationId) {
|
||||
... on Organization {
|
||||
id
|
||||
controls(first: 10000, orderBy: { direction: ASC, field: CREATED_AT }) {
|
||||
edges {
|
||||
node {
|
||||
id
|
||||
sectionTitle
|
||||
name
|
||||
framework {
|
||||
id
|
||||
name
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
const createApplicabilityStatementMutation = graphql`
|
||||
mutation AddApplicabilityStatementDialogCreateMutation(
|
||||
$input: CreateApplicabilityStatementInput!
|
||||
$connections: [ID!]!
|
||||
) {
|
||||
createApplicabilityStatement(input: $input) {
|
||||
applicabilityStatementEdge @appendEdge(connections: $connections) {
|
||||
node {
|
||||
id
|
||||
applicability
|
||||
justification
|
||||
control {
|
||||
id
|
||||
sectionTitle
|
||||
name
|
||||
bestPractice
|
||||
regulatory
|
||||
contractual
|
||||
riskAssessment
|
||||
framework {
|
||||
id
|
||||
name
|
||||
}
|
||||
organization {
|
||||
id
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
const deleteApplicabilityStatementMutation = graphql`
|
||||
mutation AddApplicabilityStatementDialogDeleteMutation(
|
||||
$input: DeleteApplicabilityStatementInput!
|
||||
$connections: [ID!]!
|
||||
) {
|
||||
deleteApplicabilityStatement(input: $input) {
|
||||
deletedApplicabilityStatementId @deleteEdge(connections: $connections)
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
const updateApplicabilityStatementMutation = graphql`
|
||||
mutation AddApplicabilityStatementDialogUpdateMutation(
|
||||
$input: UpdateApplicabilityStatementInput!
|
||||
) {
|
||||
updateApplicabilityStatement(input: $input) {
|
||||
applicabilityStatement {
|
||||
id
|
||||
applicability
|
||||
justification
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export type AddApplicabilityStatementDialogRef = {
|
||||
open: (stateOfApplicabilityId: string, organizationId: string, connectionId: string) => void;
|
||||
};
|
||||
|
||||
type ControlWithStatement = {
|
||||
controlId: string;
|
||||
sectionTitle: string;
|
||||
name: string;
|
||||
frameworkId: string;
|
||||
frameworkName: string;
|
||||
applicabilityStatementId: string | null;
|
||||
applicability: boolean | null;
|
||||
justification: string | null;
|
||||
};
|
||||
|
||||
function ControlRow({
|
||||
control,
|
||||
stateOfApplicabilityId,
|
||||
connectionId,
|
||||
}: {
|
||||
control: ControlWithStatement;
|
||||
stateOfApplicabilityId: string;
|
||||
connectionId: string;
|
||||
}) {
|
||||
const { __ } = useTranslate();
|
||||
const isLinked = control.applicabilityStatementId !== null;
|
||||
const [selectedState, setSelectedState] = useState<string>(() => {
|
||||
if (!isLinked) return "not-linked";
|
||||
return control.applicability ? "applicable" : "not-applicable";
|
||||
});
|
||||
const [justification, setJustification] = useState(control.justification || "");
|
||||
const [showJustification, setShowJustification] = useState(false);
|
||||
|
||||
const [createApplicabilityStatement, isCreating] = useMutationWithToasts(
|
||||
createApplicabilityStatementMutation,
|
||||
{
|
||||
successMessage: __("Statement created successfully."),
|
||||
errorMessage: __("Failed to create statement"),
|
||||
},
|
||||
);
|
||||
|
||||
const [deleteApplicabilityStatement, isDeleting] = useMutationWithToasts(
|
||||
deleteApplicabilityStatementMutation,
|
||||
{
|
||||
successMessage: __("Statement removed successfully."),
|
||||
errorMessage: __("Failed to remove statement"),
|
||||
},
|
||||
);
|
||||
|
||||
const [updateApplicabilityStatement, isUpdating] = useMutationWithToasts(
|
||||
updateApplicabilityStatementMutation,
|
||||
{
|
||||
successMessage: __("Statement updated successfully."),
|
||||
errorMessage: __("Failed to update statement"),
|
||||
},
|
||||
);
|
||||
|
||||
const handleStateChange = async (newState: string) => {
|
||||
setSelectedState(newState);
|
||||
|
||||
if (newState === "not-linked") {
|
||||
if (!control.applicabilityStatementId) return;
|
||||
await deleteApplicabilityStatement({
|
||||
variables: {
|
||||
input: {
|
||||
applicabilityStatementId: control.applicabilityStatementId,
|
||||
},
|
||||
connections: [connectionId],
|
||||
},
|
||||
onSuccess: () => {
|
||||
setShowJustification(false);
|
||||
},
|
||||
});
|
||||
} else if (newState === "applicable") {
|
||||
setShowJustification(false);
|
||||
if (control.applicabilityStatementId) {
|
||||
// Statement already exists, use update mutation
|
||||
await updateApplicabilityStatement({
|
||||
variables: {
|
||||
input: {
|
||||
applicabilityStatementId: control.applicabilityStatementId,
|
||||
applicability: true,
|
||||
justification: null,
|
||||
},
|
||||
},
|
||||
});
|
||||
} else {
|
||||
// No statement exists, use create mutation
|
||||
await createApplicabilityStatement({
|
||||
variables: {
|
||||
input: {
|
||||
stateOfApplicabilityId,
|
||||
controlId: control.controlId,
|
||||
applicability: true,
|
||||
justification: null,
|
||||
},
|
||||
connections: [connectionId],
|
||||
},
|
||||
});
|
||||
}
|
||||
} else if (newState === "not-applicable") {
|
||||
setShowJustification(true);
|
||||
setJustification(control.justification || "");
|
||||
}
|
||||
};
|
||||
|
||||
const handleSaveJustification = async () => {
|
||||
if (control.applicabilityStatementId) {
|
||||
// Statement already exists, use update mutation
|
||||
await updateApplicabilityStatement({
|
||||
variables: {
|
||||
input: {
|
||||
applicabilityStatementId: control.applicabilityStatementId,
|
||||
applicability: false,
|
||||
justification: justification || null,
|
||||
},
|
||||
},
|
||||
onSuccess: () => {
|
||||
setShowJustification(false);
|
||||
},
|
||||
});
|
||||
} else {
|
||||
// No statement exists, use create mutation
|
||||
await createApplicabilityStatement({
|
||||
variables: {
|
||||
input: {
|
||||
stateOfApplicabilityId,
|
||||
controlId: control.controlId,
|
||||
applicability: false,
|
||||
justification: justification || null,
|
||||
},
|
||||
connections: [connectionId],
|
||||
},
|
||||
onSuccess: () => {
|
||||
setShowJustification(false);
|
||||
},
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="p-4 border-b border-border-low">
|
||||
<div className="flex items-start justify-between gap-4">
|
||||
<div className="flex-1 min-w-0">
|
||||
<div className="flex items-center gap-2">
|
||||
<Badge size="md">{control.sectionTitle}</Badge>
|
||||
<span className="text-sm font-medium text-txt-primary">
|
||||
{control.name}
|
||||
</span>
|
||||
</div>
|
||||
{isLinked
|
||||
&& control.applicability !== null
|
||||
&& !showJustification
|
||||
&& control.justification && (
|
||||
<div className="mt-2 text-sm text-txt-secondary">
|
||||
{control.justification}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
<div className="flex items-start gap-2">
|
||||
<Select
|
||||
variant="editor"
|
||||
value={selectedState}
|
||||
onValueChange={value => void handleStateChange(value)}
|
||||
disabled={isCreating || isDeleting || isUpdating}
|
||||
className="w-48"
|
||||
>
|
||||
<Option value="not-linked">{__("Not Linked")}</Option>
|
||||
<Option value="applicable">{__("Applicable")}</Option>
|
||||
<Option value="not-applicable">{__("Not Applicable")}</Option>
|
||||
</Select>
|
||||
</div>
|
||||
</div>
|
||||
{showJustification && (
|
||||
<div className="mt-3 flex items-start gap-2">
|
||||
<Textarea
|
||||
value={justification}
|
||||
onChange={e => setJustification(e.target.value)}
|
||||
placeholder={__("Reason for non-applicability")}
|
||||
className="flex-1"
|
||||
autogrow
|
||||
/>
|
||||
<Button
|
||||
variant="primary"
|
||||
icon={IconCheckmark1}
|
||||
onClick={() => void handleSaveJustification()}
|
||||
disabled={isCreating || isUpdating}
|
||||
aria-label={__("Save")}
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
function AddApplicabilityStatementDialogContent({
|
||||
stateOfApplicabilityId,
|
||||
organizationId,
|
||||
connectionId,
|
||||
}: {
|
||||
stateOfApplicabilityId: string;
|
||||
organizationId: string;
|
||||
connectionId: string;
|
||||
}) {
|
||||
const { __ } = useTranslate();
|
||||
const [search, setSearch] = useState("");
|
||||
const [collapsedFrameworks, setCollapsedFrameworks] = useState<Set<string>>(new Set());
|
||||
const data = useLazyLoadQuery<AddApplicabilityStatementDialogQuery>(
|
||||
query,
|
||||
{ stateOfApplicabilityId, organizationId },
|
||||
{ fetchPolicy: "store-or-network" },
|
||||
);
|
||||
|
||||
const applicabilityMap = useMemo(() => {
|
||||
const map = new Map<
|
||||
string,
|
||||
{ id: string; applicability: boolean; justification: string | null }
|
||||
>();
|
||||
data.stateOfApplicability?.applicabilityStatements?.edges.forEach((edge) => {
|
||||
map.set(edge.node.control.id, {
|
||||
id: edge.node.id,
|
||||
applicability: edge.node.applicability,
|
||||
justification: edge.node.justification,
|
||||
});
|
||||
});
|
||||
return map;
|
||||
}, [data.stateOfApplicability?.applicabilityStatements]);
|
||||
|
||||
const allControls = useMemo(() => {
|
||||
return (data.organization?.controls?.edges || []).map((edge) => {
|
||||
const applicability = applicabilityMap.get(edge.node.id);
|
||||
return {
|
||||
controlId: edge.node.id,
|
||||
sectionTitle: edge.node.sectionTitle,
|
||||
name: edge.node.name,
|
||||
frameworkId: edge.node.framework.id,
|
||||
frameworkName: edge.node.framework.name,
|
||||
applicabilityStatementId: applicability?.id ?? null,
|
||||
applicability: applicability?.applicability ?? null,
|
||||
justification: applicability?.justification ?? null,
|
||||
} as ControlWithStatement;
|
||||
});
|
||||
}, [data.organization?.controls, applicabilityMap]);
|
||||
|
||||
const filteredControls = useMemo(() => {
|
||||
if (!search) return allControls;
|
||||
const lowerSearch = search.toLowerCase();
|
||||
return allControls.filter(
|
||||
c =>
|
||||
c.name.toLowerCase().includes(lowerSearch)
|
||||
|| c.sectionTitle.toLowerCase().includes(lowerSearch)
|
||||
|| c.frameworkName.toLowerCase().includes(lowerSearch),
|
||||
);
|
||||
}, [allControls, search]);
|
||||
|
||||
const groupedControls = useMemo(() => {
|
||||
const groups: Record<string, Record<string, ControlWithStatement[]>> = {};
|
||||
filteredControls.forEach((control) => {
|
||||
if (!groups[control.frameworkName]) {
|
||||
groups[control.frameworkName] = {};
|
||||
}
|
||||
if (!groups[control.frameworkName][control.sectionTitle]) {
|
||||
groups[control.frameworkName][control.sectionTitle] = [];
|
||||
}
|
||||
groups[control.frameworkName][control.sectionTitle].push(control);
|
||||
});
|
||||
return groups;
|
||||
}, [filteredControls]);
|
||||
|
||||
const toggleFramework = (frameworkName: string) => {
|
||||
setCollapsedFrameworks((prev) => {
|
||||
const newSet = new Set(prev);
|
||||
if (newSet.has(frameworkName)) {
|
||||
newSet.delete(frameworkName);
|
||||
} else {
|
||||
newSet.add(frameworkName);
|
||||
}
|
||||
return newSet;
|
||||
});
|
||||
};
|
||||
|
||||
return (
|
||||
<>
|
||||
<DialogContent className="p-0">
|
||||
<div className="sticky top-0 bg-level-2 p-4 border-b border-border-low z-10">
|
||||
<Input
|
||||
icon={IconMagnifyingGlass}
|
||||
placeholder={__("Search controls...")}
|
||||
onValueChange={setSearch}
|
||||
/>
|
||||
</div>
|
||||
<div className="max-h-[60vh] overflow-y-auto">
|
||||
{filteredControls.length === 0
|
||||
? (
|
||||
<div className="p-8 text-center text-txt-secondary">
|
||||
{__("No controls found")}
|
||||
</div>
|
||||
)
|
||||
: (
|
||||
Object.entries(groupedControls).map(([frameworkName, sections]) => {
|
||||
const isCollapsed = collapsedFrameworks.has(frameworkName);
|
||||
return (
|
||||
<div key={frameworkName}>
|
||||
<div className="sticky top-0 bg-level-1 px-4 py-2 border-b border-border-low z-10 flex items-center justify-between">
|
||||
<h3 className="text-sm font-semibold text-txt-primary">
|
||||
{frameworkName}
|
||||
</h3>
|
||||
<Button
|
||||
variant="tertiary"
|
||||
icon={isCollapsed ? IconChevronDown : IconChevronUp}
|
||||
onClick={() => toggleFramework(frameworkName)}
|
||||
aria-label={isCollapsed ? __("Expand") : __("Collapse")}
|
||||
/>
|
||||
</div>
|
||||
{!isCollapsed
|
||||
&& Object.entries(sections).map(
|
||||
([sectionTitle, sectionControls]) => (
|
||||
<div key={`${frameworkName}-${sectionTitle}`}>
|
||||
{sectionControls.map(control => (
|
||||
<ControlRow
|
||||
key={control.controlId}
|
||||
control={control}
|
||||
stateOfApplicabilityId={stateOfApplicabilityId}
|
||||
connectionId={connectionId}
|
||||
/>
|
||||
))}
|
||||
</div>
|
||||
),
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
})
|
||||
)}
|
||||
</div>
|
||||
</DialogContent>
|
||||
<DialogFooter exitLabel={__("Close")}></DialogFooter>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
export const AddApplicabilityStatementDialog = forwardRef<AddApplicabilityStatementDialogRef>(
|
||||
(_props, ref) => {
|
||||
const { __ } = useTranslate();
|
||||
const dialogRef = useDialogRef();
|
||||
const [stateOfApplicabilityId, setStateOfApplicabilityId] = useState<string | null>(null);
|
||||
const [organizationId, setOrganizationId] = useState<string | null>(null);
|
||||
const [connectionId, setConnectionId] = useState<string | null>(null);
|
||||
|
||||
useImperativeHandle(
|
||||
ref,
|
||||
() => ({
|
||||
open: (soaId: string, orgId: string, connId: string) => {
|
||||
setStateOfApplicabilityId(soaId);
|
||||
setOrganizationId(orgId);
|
||||
setConnectionId(connId);
|
||||
dialogRef.current?.open();
|
||||
},
|
||||
}),
|
||||
[dialogRef],
|
||||
);
|
||||
|
||||
const handleClose = () => {
|
||||
setStateOfApplicabilityId(null);
|
||||
setOrganizationId(null);
|
||||
setConnectionId(null);
|
||||
};
|
||||
|
||||
return (
|
||||
<Dialog
|
||||
ref={dialogRef}
|
||||
className="max-w-3xl"
|
||||
title={(
|
||||
<Breadcrumb
|
||||
items={[__("States of Applicability"), __("Add Statement")]}
|
||||
/>
|
||||
)}
|
||||
onClose={handleClose}
|
||||
>
|
||||
{stateOfApplicabilityId && organizationId && connectionId
|
||||
? (
|
||||
<Suspense
|
||||
fallback={(
|
||||
<DialogContent
|
||||
padded
|
||||
className="flex items-center justify-center py-8"
|
||||
>
|
||||
<Spinner />
|
||||
</DialogContent>
|
||||
)}
|
||||
>
|
||||
<AddApplicabilityStatementDialogContent
|
||||
stateOfApplicabilityId={stateOfApplicabilityId}
|
||||
organizationId={organizationId}
|
||||
connectionId={connectionId}
|
||||
/>
|
||||
</Suspense>
|
||||
)
|
||||
: null}
|
||||
</Dialog>
|
||||
);
|
||||
},
|
||||
);
|
||||
@@ -10,16 +10,38 @@ import {
|
||||
} from "@probo/ui";
|
||||
import type { ReactNode } from "react";
|
||||
import { Suspense } from "react";
|
||||
import { graphql } from "react-relay";
|
||||
import { useNavigate } from "react-router";
|
||||
import { z } from "zod";
|
||||
import z from "zod";
|
||||
|
||||
import type { StateOfApplicabilityGraphCreateMutation } from "#/__generated__/core/StateOfApplicabilityGraphCreateMutation.graphql";
|
||||
import type { CreateStateOfApplicabilityDialogMutation } from "#/__generated__/core/CreateStateOfApplicabilityDialogMutation.graphql";
|
||||
import { PeopleSelectField } from "#/components/form/PeopleSelectField";
|
||||
import { createStateOfApplicabilityMutation } from "#/hooks/graph/StateOfApplicabilityGraph";
|
||||
import { useFormWithSchema } from "#/hooks/useFormWithSchema";
|
||||
import { useMutationWithToasts } from "#/hooks/useMutationWithToasts";
|
||||
import { useOrganizationId } from "#/hooks/useOrganizationId";
|
||||
|
||||
const createMutation = graphql`
|
||||
mutation CreateStateOfApplicabilityDialogMutation(
|
||||
$input: CreateStateOfApplicabilityInput!
|
||||
$connections: [ID!]!
|
||||
) {
|
||||
createStateOfApplicability(input: $input) {
|
||||
stateOfApplicabilityEdge @prependEdge(connections: $connections) {
|
||||
node {
|
||||
id
|
||||
name
|
||||
sourceId
|
||||
snapshotId
|
||||
createdAt
|
||||
updatedAt
|
||||
canDelete: permission(action: "core:state-of-applicability:delete")
|
||||
...StateOfApplicabilityRowFragment
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
type Props = {
|
||||
children: ReactNode;
|
||||
connectionId: string;
|
||||
@@ -48,9 +70,9 @@ export function CreateStateOfApplicabilityDialog({
|
||||
);
|
||||
const ref = useDialogRef();
|
||||
|
||||
const [mutate, isMutating]
|
||||
= useMutationWithToasts<StateOfApplicabilityGraphCreateMutation>(
|
||||
createStateOfApplicabilityMutation,
|
||||
const [createStateOfApplicability, isCreating]
|
||||
= useMutationWithToasts<CreateStateOfApplicabilityDialogMutation>(
|
||||
createMutation,
|
||||
{
|
||||
successMessage: __(
|
||||
"State of applicability created successfully.",
|
||||
@@ -60,7 +82,7 @@ export function CreateStateOfApplicabilityDialog({
|
||||
);
|
||||
|
||||
const onSubmit = async (data: z.infer<typeof schema>) => {
|
||||
await mutate({
|
||||
await createStateOfApplicability({
|
||||
variables: {
|
||||
input: {
|
||||
name: data.name,
|
||||
@@ -114,7 +136,7 @@ export function CreateStateOfApplicabilityDialog({
|
||||
</Field>
|
||||
</DialogContent>
|
||||
<DialogFooter>
|
||||
<Button disabled={isMutating} type="submit">
|
||||
<Button disabled={isCreating} type="submit">
|
||||
{__("Create")}
|
||||
</Button>
|
||||
</DialogFooter>
|
||||
|
||||
@@ -19,25 +19,21 @@ import { z } from "zod";
|
||||
import { useFormWithSchema } from "#/hooks/useFormWithSchema";
|
||||
import { useMutationWithToasts } from "#/hooks/useMutationWithToasts";
|
||||
|
||||
const linkControlMutation = graphql`
|
||||
mutation EditControlDialogLinkMutation($input: CreateStateOfApplicabilityControlMappingInput!) {
|
||||
createStateOfApplicabilityControlMapping(input: $input) {
|
||||
stateOfApplicabilityControlEdge {
|
||||
node {
|
||||
stateOfApplicabilityId
|
||||
controlId
|
||||
applicability
|
||||
justification
|
||||
const updateApplicabilityStatementMutation = graphql`
|
||||
mutation EditControlDialogUpdateMutation($input: UpdateApplicabilityStatementInput!) {
|
||||
updateApplicabilityStatement(input: $input) {
|
||||
applicabilityStatement {
|
||||
id
|
||||
applicability
|
||||
justification
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export type EditControlDialogRef = {
|
||||
open: (control: {
|
||||
stateOfApplicabilityId: string;
|
||||
controlId: string;
|
||||
applicabilityStatementId: string;
|
||||
sectionTitle: string;
|
||||
name: string;
|
||||
frameworkName: string;
|
||||
@@ -51,129 +47,122 @@ const schema = z.object({
|
||||
justification: z.string().optional(),
|
||||
});
|
||||
|
||||
export const EditControlDialog = forwardRef<EditControlDialogRef, { onSuccess?: () => void }>(
|
||||
({ onSuccess }, ref) => {
|
||||
const { __ } = useTranslate();
|
||||
const dialogRef = useDialogRef();
|
||||
const [control, setControl] = useState<{
|
||||
stateOfApplicabilityId: string;
|
||||
controlId: string;
|
||||
sectionTitle: string;
|
||||
name: string;
|
||||
frameworkName: string;
|
||||
applicability: boolean;
|
||||
justification: string | null;
|
||||
} | null>(null);
|
||||
export const EditControlDialog = forwardRef<EditControlDialogRef>((_props, ref) => {
|
||||
const { __ } = useTranslate();
|
||||
const dialogRef = useDialogRef();
|
||||
const [control, setControl] = useState<{
|
||||
applicabilityStatementId: string;
|
||||
sectionTitle: string;
|
||||
name: string;
|
||||
frameworkName: string;
|
||||
applicability: boolean;
|
||||
justification: string | null;
|
||||
} | null>(null);
|
||||
|
||||
const [linkMutate, isLinking] = useMutationWithToasts(linkControlMutation, {
|
||||
successMessage: __("Control updated successfully."),
|
||||
errorMessage: __("Failed to update control"),
|
||||
});
|
||||
const [updateApplicabilityStatement, isUpdating] = useMutationWithToasts(
|
||||
updateApplicabilityStatementMutation,
|
||||
{
|
||||
successMessage: __("Statement updated successfully."),
|
||||
errorMessage: __("Failed to update statement"),
|
||||
},
|
||||
);
|
||||
|
||||
const { register, handleSubmit, setValue, watch } = useFormWithSchema(schema, {
|
||||
defaultValues: {
|
||||
applicability: true,
|
||||
justification: "",
|
||||
const { register, handleSubmit, setValue, watch } = useFormWithSchema(schema, {
|
||||
defaultValues: {
|
||||
applicability: true,
|
||||
justification: "",
|
||||
},
|
||||
});
|
||||
const applicability = watch("applicability");
|
||||
|
||||
useImperativeHandle(ref, () => ({
|
||||
open: (ctrl) => {
|
||||
setControl(ctrl);
|
||||
setValue("applicability", ctrl.applicability);
|
||||
setValue("justification", ctrl.justification || "");
|
||||
dialogRef.current?.open();
|
||||
},
|
||||
}));
|
||||
|
||||
const onSubmit = async (data: z.infer<typeof schema>) => {
|
||||
if (!control) return;
|
||||
|
||||
await updateApplicabilityStatement({
|
||||
variables: {
|
||||
input: {
|
||||
applicabilityStatementId: control.applicabilityStatementId,
|
||||
applicability: data.applicability,
|
||||
justification: !data.applicability ? data.justification || null : null,
|
||||
},
|
||||
},
|
||||
onSuccess: () => {
|
||||
dialogRef.current?.close();
|
||||
setControl(null);
|
||||
},
|
||||
});
|
||||
const applicability = watch("applicability");
|
||||
};
|
||||
|
||||
useImperativeHandle(ref, () => ({
|
||||
open: (ctrl) => {
|
||||
setControl(ctrl);
|
||||
setValue("applicability", ctrl.applicability);
|
||||
setValue("justification", ctrl.justification || "");
|
||||
dialogRef.current?.open();
|
||||
},
|
||||
}));
|
||||
|
||||
const onSubmit = async (data: z.infer<typeof schema>) => {
|
||||
if (!control) return;
|
||||
|
||||
await linkMutate({
|
||||
variables: {
|
||||
input: {
|
||||
stateOfApplicabilityId: control.stateOfApplicabilityId,
|
||||
controlId: control.controlId,
|
||||
applicability: data.applicability,
|
||||
justification: !data.applicability ? data.justification || null : null,
|
||||
},
|
||||
},
|
||||
onSuccess: () => {
|
||||
dialogRef.current?.close();
|
||||
setControl(null);
|
||||
onSuccess?.();
|
||||
},
|
||||
updater: (store) => {
|
||||
const stateOfApplicability = store.get(control.stateOfApplicabilityId);
|
||||
if (stateOfApplicability) {
|
||||
stateOfApplicability.invalidateRecord();
|
||||
}
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
return (
|
||||
<Dialog
|
||||
ref={dialogRef}
|
||||
className="max-w-lg"
|
||||
title={(
|
||||
<Breadcrumb
|
||||
items={[__("States of Applicability"), __("Edit Control")]}
|
||||
/>
|
||||
)}
|
||||
>
|
||||
{control
|
||||
? (
|
||||
<form onSubmit={e => void handleSubmit(onSubmit)(e)}>
|
||||
<DialogContent padded className="space-y-4">
|
||||
<div className="space-y-2">
|
||||
<div className="text-sm font-medium text-txt-secondary">
|
||||
{control.frameworkName}
|
||||
</div>
|
||||
<div className="flex items-center gap-2">
|
||||
<Badge size="md">{control.sectionTitle}</Badge>
|
||||
<span className="text-base font-medium text-txt-primary">{control.name}</span>
|
||||
</div>
|
||||
return (
|
||||
<Dialog
|
||||
ref={dialogRef}
|
||||
className="max-w-lg"
|
||||
title={
|
||||
<Breadcrumb items={[__("States of Applicability"), __("Edit Statement")]} />
|
||||
}
|
||||
>
|
||||
{control
|
||||
? (
|
||||
<form onSubmit={e => void handleSubmit(onSubmit)(e)}>
|
||||
<DialogContent padded className="space-y-4">
|
||||
<div className="space-y-2">
|
||||
<div className="text-sm font-medium text-txt-secondary">
|
||||
{control.frameworkName}
|
||||
</div>
|
||||
<div className="flex items-center gap-2">
|
||||
<Badge size="md">{control.sectionTitle}</Badge>
|
||||
<span className="text-base font-medium text-txt-primary">
|
||||
{control.name}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<Field label={__("Applicability")}>
|
||||
<Select
|
||||
variant="editor"
|
||||
value={applicability ? "yes" : "no"}
|
||||
onValueChange={value => setValue("applicability", value === "yes")}
|
||||
>
|
||||
<Option value="yes">{__("Yes")}</Option>
|
||||
<Option value="no">{__("No")}</Option>
|
||||
</Select>
|
||||
</Field>
|
||||
|
||||
{!applicability && (
|
||||
<Field label={__("Justification")}>
|
||||
<Textarea
|
||||
{...register("justification")}
|
||||
placeholder={__("Reason for non-applicability")}
|
||||
autogrow
|
||||
/>
|
||||
</Field>
|
||||
)}
|
||||
</DialogContent>
|
||||
<DialogFooter>
|
||||
<Button
|
||||
type="button"
|
||||
variant="secondary"
|
||||
onClick={() => dialogRef.current?.close()}
|
||||
<Field label={__("Applicability")}>
|
||||
<Select
|
||||
variant="editor"
|
||||
value={applicability ? "yes" : "no"}
|
||||
onValueChange={value =>
|
||||
setValue("applicability", value === "yes")}
|
||||
>
|
||||
{__("Cancel")}
|
||||
</Button>
|
||||
<Button type="submit" disabled={isLinking}>
|
||||
{__("Save")}
|
||||
</Button>
|
||||
</DialogFooter>
|
||||
</form>
|
||||
)
|
||||
: null}
|
||||
</Dialog>
|
||||
);
|
||||
},
|
||||
);
|
||||
<Option value="yes">{__("Yes")}</Option>
|
||||
<Option value="no">{__("No")}</Option>
|
||||
</Select>
|
||||
</Field>
|
||||
|
||||
{!applicability && (
|
||||
<Field label={__("Justification")}>
|
||||
<Textarea
|
||||
{...register("justification")}
|
||||
placeholder={__("Reason for non-applicability")}
|
||||
autogrow
|
||||
/>
|
||||
</Field>
|
||||
)}
|
||||
</DialogContent>
|
||||
<DialogFooter>
|
||||
<Button
|
||||
type="button"
|
||||
variant="secondary"
|
||||
onClick={() => dialogRef.current?.close()}
|
||||
>
|
||||
{__("Cancel")}
|
||||
</Button>
|
||||
<Button type="submit" disabled={isUpdating}>
|
||||
{__("Save")}
|
||||
</Button>
|
||||
</DialogFooter>
|
||||
</form>
|
||||
)
|
||||
: null}
|
||||
</Dialog>
|
||||
);
|
||||
});
|
||||
|
||||
@@ -23,20 +23,39 @@ import { graphql, useLazyLoadQuery } from "react-relay";
|
||||
import { useMutationWithToasts } from "#/hooks/useMutationWithToasts";
|
||||
|
||||
const linkControlQuery = graphql`
|
||||
query LinkControlDialogQuery($stateOfApplicabilityId: ID!) {
|
||||
node(id: $stateOfApplicabilityId) {
|
||||
query LinkControlDialogQuery($stateOfApplicabilityId: ID!, $organizationId: ID!) {
|
||||
stateOfApplicability: node(id: $stateOfApplicabilityId) {
|
||||
... on StateOfApplicability {
|
||||
id
|
||||
availableControls {
|
||||
controlId
|
||||
sectionTitle
|
||||
name
|
||||
frameworkId
|
||||
frameworkName
|
||||
organizationId
|
||||
stateOfApplicabilityId
|
||||
applicability
|
||||
justification
|
||||
applicabilityStatements(first: 10000) {
|
||||
edges {
|
||||
node {
|
||||
id
|
||||
applicability
|
||||
justification
|
||||
control {
|
||||
id
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
organization: node(id: $organizationId) {
|
||||
... on Organization {
|
||||
id
|
||||
controls(first: 10000, orderBy: { direction: ASC, field: CREATED_AT }) {
|
||||
edges {
|
||||
node {
|
||||
id
|
||||
sectionTitle
|
||||
name
|
||||
framework {
|
||||
id
|
||||
name
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -44,14 +63,16 @@ const linkControlQuery = graphql`
|
||||
`;
|
||||
|
||||
const linkControlMutation = graphql`
|
||||
mutation LinkControlDialogLinkMutation($input: CreateStateOfApplicabilityControlMappingInput!) {
|
||||
createStateOfApplicabilityControlMapping(input: $input) {
|
||||
stateOfApplicabilityControlEdge {
|
||||
mutation LinkControlDialogLinkMutation($input: CreateApplicabilityStatementInput!) {
|
||||
createApplicabilityStatement(input: $input) {
|
||||
applicabilityStatementEdge {
|
||||
node {
|
||||
stateOfApplicabilityId
|
||||
controlId
|
||||
id
|
||||
applicability
|
||||
justification
|
||||
control {
|
||||
id
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -59,17 +80,15 @@ const linkControlMutation = graphql`
|
||||
`;
|
||||
|
||||
const unlinkControlMutation = graphql`
|
||||
mutation LinkControlDialogUnlinkMutation($input: DeleteStateOfApplicabilityControlMappingInput!) {
|
||||
deleteStateOfApplicabilityControlMapping(input: $input) {
|
||||
deletedStateOfApplicabilityId
|
||||
deletedControlId
|
||||
deletedStateOfApplicabilityControlId
|
||||
mutation LinkControlDialogUnlinkMutation($input: DeleteApplicabilityStatementInput!) {
|
||||
deleteApplicabilityStatement(input: $input) {
|
||||
deletedApplicabilityStatementId
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export type LinkControlDialogRef = {
|
||||
open: (stateOfApplicabilityId: string, onUpdate?: () => void) => void;
|
||||
open: (stateOfApplicabilityId: string, organizationId: string, onUpdate?: () => void) => void;
|
||||
};
|
||||
|
||||
type Control = {
|
||||
@@ -78,8 +97,7 @@ type Control = {
|
||||
name: string;
|
||||
frameworkId: string;
|
||||
frameworkName: string;
|
||||
organizationId: string;
|
||||
stateOfApplicabilityId: string | null;
|
||||
applicabilityStatementId: string | null;
|
||||
applicability: boolean | null;
|
||||
justification: string | null;
|
||||
};
|
||||
@@ -119,11 +137,11 @@ function ControlRow({
|
||||
setSelectedState(newState);
|
||||
|
||||
if (newState === "not-linked") {
|
||||
if (!control.applicabilityStatementId) return;
|
||||
await unlinkMutate({
|
||||
variables: {
|
||||
input: {
|
||||
stateOfApplicabilityId,
|
||||
controlId: control.controlId,
|
||||
applicabilityStatementId: control.applicabilityStatementId,
|
||||
},
|
||||
},
|
||||
onSuccess: () => {
|
||||
@@ -227,9 +245,11 @@ function ControlRow({
|
||||
|
||||
function LinkControlDialogContent({
|
||||
stateOfApplicabilityId,
|
||||
organizationId,
|
||||
onUpdate,
|
||||
}: {
|
||||
stateOfApplicabilityId: string;
|
||||
organizationId: string;
|
||||
onUpdate?: () => void;
|
||||
}) {
|
||||
const { __ } = useTranslate();
|
||||
@@ -237,25 +257,80 @@ function LinkControlDialogContent({
|
||||
const [collapsedFrameworks, setCollapsedFrameworks] = useState<Set<string>>(new Set());
|
||||
const data = useLazyLoadQuery(
|
||||
linkControlQuery,
|
||||
{ stateOfApplicabilityId },
|
||||
{ stateOfApplicabilityId, organizationId },
|
||||
{ fetchPolicy: "store-or-network" },
|
||||
) as {
|
||||
node: {
|
||||
availableControls?: Control[];
|
||||
stateOfApplicability: {
|
||||
id: string;
|
||||
applicabilityStatements?: {
|
||||
edges: Array<{
|
||||
node: {
|
||||
id: string;
|
||||
applicability: boolean;
|
||||
justification: string | null;
|
||||
control: { id: string };
|
||||
};
|
||||
}>;
|
||||
};
|
||||
} | null;
|
||||
organization: {
|
||||
id: string;
|
||||
controls?: {
|
||||
edges: Array<{
|
||||
node: {
|
||||
id: string;
|
||||
sectionTitle: string;
|
||||
name: string;
|
||||
framework: {
|
||||
id: string;
|
||||
name: string;
|
||||
};
|
||||
};
|
||||
}>;
|
||||
};
|
||||
} | null;
|
||||
};
|
||||
|
||||
// Build a map of control ID -> applicability statement
|
||||
const applicabilityMap = useMemo(() => {
|
||||
const map = new Map<string, { id: string; applicability: boolean; justification: string | null }>();
|
||||
data.stateOfApplicability?.applicabilityStatements?.edges.forEach((edge) => {
|
||||
map.set(edge.node.control.id, {
|
||||
id: edge.node.id,
|
||||
applicability: edge.node.applicability,
|
||||
justification: edge.node.justification,
|
||||
});
|
||||
});
|
||||
return map;
|
||||
}, [data.stateOfApplicability?.applicabilityStatements]);
|
||||
|
||||
// Merge controls with applicability info
|
||||
const allControls = useMemo(() => {
|
||||
return (data.organization?.controls?.edges || []).map((edge) => {
|
||||
const applicability = applicabilityMap.get(edge.node.id);
|
||||
return {
|
||||
controlId: edge.node.id,
|
||||
sectionTitle: edge.node.sectionTitle,
|
||||
name: edge.node.name,
|
||||
frameworkId: edge.node.framework.id,
|
||||
frameworkName: edge.node.framework.name,
|
||||
applicabilityStatementId: applicability?.id ?? null,
|
||||
applicability: applicability?.applicability ?? null,
|
||||
justification: applicability?.justification ?? null,
|
||||
} as Control;
|
||||
});
|
||||
}, [data.organization?.controls, applicabilityMap]);
|
||||
|
||||
const filteredControls = useMemo(() => {
|
||||
const controls = data.node?.availableControls || [];
|
||||
if (!search) return controls;
|
||||
if (!search) return allControls;
|
||||
const lowerSearch = search.toLowerCase();
|
||||
return controls.filter(
|
||||
return allControls.filter(
|
||||
c =>
|
||||
c.name.toLowerCase().includes(lowerSearch)
|
||||
|| c.sectionTitle.toLowerCase().includes(lowerSearch)
|
||||
|| c.frameworkName.toLowerCase().includes(lowerSearch),
|
||||
);
|
||||
}, [data.node?.availableControls, search]);
|
||||
}, [allControls, search]);
|
||||
|
||||
const groupedControls = useMemo(() => {
|
||||
const groups: Record<string, Record<string, Control[]>> = {};
|
||||
@@ -321,7 +396,7 @@ function LinkControlDialogContent({
|
||||
key={control.controlId}
|
||||
control={control}
|
||||
stateOfApplicabilityId={stateOfApplicabilityId}
|
||||
isLinked={control.stateOfApplicabilityId !== null}
|
||||
isLinked={control.applicabilityStatementId !== null}
|
||||
onUpdate={onUpdate}
|
||||
/>
|
||||
))}
|
||||
@@ -342,11 +417,13 @@ export const LinkControlDialog = forwardRef<LinkControlDialogRef>((_props, ref)
|
||||
const { __ } = useTranslate();
|
||||
const dialogRef = useDialogRef();
|
||||
const [stateOfApplicabilityId, setStateOfApplicabilityId] = useState<string | null>(null);
|
||||
const [organizationId, setOrganizationId] = useState<string | null>(null);
|
||||
const [onUpdateCallback, setOnUpdateCallback] = useState<(() => void) | undefined>(undefined);
|
||||
|
||||
useImperativeHandle(ref, () => ({
|
||||
open: (soaId: string, callback?: () => void) => {
|
||||
open: (soaId: string, orgId: string, callback?: () => void) => {
|
||||
setStateOfApplicabilityId(soaId);
|
||||
setOrganizationId(orgId);
|
||||
setOnUpdateCallback(() => callback);
|
||||
dialogRef.current?.open();
|
||||
},
|
||||
@@ -354,6 +431,7 @@ export const LinkControlDialog = forwardRef<LinkControlDialogRef>((_props, ref)
|
||||
|
||||
const handleClose = () => {
|
||||
setStateOfApplicabilityId(null);
|
||||
setOrganizationId(null);
|
||||
setOnUpdateCallback(undefined);
|
||||
};
|
||||
|
||||
@@ -368,7 +446,7 @@ export const LinkControlDialog = forwardRef<LinkControlDialogRef>((_props, ref)
|
||||
)}
|
||||
onClose={handleClose}
|
||||
>
|
||||
{stateOfApplicabilityId
|
||||
{stateOfApplicabilityId && organizationId
|
||||
? (
|
||||
<Suspense
|
||||
fallback={(
|
||||
@@ -379,6 +457,7 @@ export const LinkControlDialog = forwardRef<LinkControlDialogRef>((_props, ref)
|
||||
>
|
||||
<LinkControlDialogContent
|
||||
stateOfApplicabilityId={stateOfApplicabilityId}
|
||||
organizationId={organizationId}
|
||||
onUpdate={onUpdateCallback}
|
||||
/>
|
||||
</Suspense>
|
||||
|
||||
@@ -14,63 +14,76 @@ import {
|
||||
Thead,
|
||||
Tr,
|
||||
} from "@probo/ui";
|
||||
import { Suspense, useMemo, useRef } from "react";
|
||||
import { graphql, useRefetchableFragment } from "react-relay";
|
||||
import { Suspense, useRef } from "react";
|
||||
import { graphql, useFragment } from "react-relay";
|
||||
|
||||
import type { StateOfApplicabilityControlsTabFragment$key } from "#/__generated__/core/StateOfApplicabilityControlsTabFragment.graphql";
|
||||
import { useMutationWithToasts } from "#/hooks/useMutationWithToasts";
|
||||
import { useOrganizationId } from "#/hooks/useOrganizationId";
|
||||
|
||||
import {
|
||||
AddApplicabilityStatementDialog,
|
||||
type AddApplicabilityStatementDialogRef,
|
||||
} from "../dialogs/AddApplicabilityStatementDialog";
|
||||
import {
|
||||
EditControlDialog,
|
||||
type EditControlDialogRef,
|
||||
} from "../dialogs/EditControlDialog";
|
||||
import {
|
||||
LinkControlDialog,
|
||||
type LinkControlDialogRef,
|
||||
} from "../dialogs/LinkControlDialog";
|
||||
|
||||
export const controlsFragment = graphql`
|
||||
fragment StateOfApplicabilityControlsTabFragment on StateOfApplicability
|
||||
@refetchable(queryName: "StateOfApplicabilityControlsTabRefetchQuery") {
|
||||
fragment StateOfApplicabilityControlsTabFragment on StateOfApplicability {
|
||||
id
|
||||
controlsInfo: controls(first: 0) {
|
||||
totalCount
|
||||
organization {
|
||||
id
|
||||
}
|
||||
|
||||
canCreateStateOfApplicabilityControlMapping: permission(
|
||||
action: "core:state-of-applicability-control-mapping:create"
|
||||
canCreateApplicabilityStatement: permission(
|
||||
action: "core:applicability-statement:create"
|
||||
)
|
||||
canDeleteStateOfApplicabilityControlMapping: permission(
|
||||
action: "core:state-of-applicability-control-mapping:delete"
|
||||
canUpdateApplicabilityStatement: permission(
|
||||
action: "core:applicability-statement:update"
|
||||
)
|
||||
canDeleteApplicabilityStatement: permission(
|
||||
action: "core:applicability-statement:delete"
|
||||
)
|
||||
|
||||
availableControls {
|
||||
controlId
|
||||
sectionTitle
|
||||
name
|
||||
frameworkId
|
||||
frameworkName
|
||||
organizationId
|
||||
stateOfApplicabilityId
|
||||
applicability
|
||||
justification
|
||||
bestPractice
|
||||
regulatory
|
||||
contractual
|
||||
riskAssessment
|
||||
applicabilityStatements(first: 1000, orderBy: { direction: ASC, field: CREATED_AT })
|
||||
@connection(key: "StateOfApplicabilityControlsTab_applicabilityStatements") {
|
||||
__id
|
||||
edges {
|
||||
node {
|
||||
id
|
||||
applicability
|
||||
justification
|
||||
control {
|
||||
id
|
||||
sectionTitle
|
||||
name
|
||||
bestPractice
|
||||
regulatory
|
||||
contractual
|
||||
riskAssessment
|
||||
framework {
|
||||
id
|
||||
name
|
||||
}
|
||||
organization {
|
||||
id
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
const unlinkControlMutation = graphql`
|
||||
mutation StateOfApplicabilityControlsTabUnlinkMutation(
|
||||
$input: DeleteStateOfApplicabilityControlMappingInput!
|
||||
const deleteApplicabilityStatementMutation = graphql`
|
||||
mutation StateOfApplicabilityControlsTabDeleteMutation(
|
||||
$input: DeleteApplicabilityStatementInput!
|
||||
$connections: [ID!]!
|
||||
) {
|
||||
deleteStateOfApplicabilityControlMapping(input: $input) {
|
||||
deletedStateOfApplicabilityId
|
||||
deletedControlId
|
||||
deletedStateOfApplicabilityControlId
|
||||
deleteApplicabilityStatement(input: $input) {
|
||||
deletedApplicabilityStatementId @deleteEdge(connections: $connections)
|
||||
}
|
||||
}
|
||||
`;
|
||||
@@ -85,43 +98,51 @@ export default function StateOfApplicabilityControlsTab({
|
||||
isSnapshotMode?: boolean;
|
||||
}) {
|
||||
const { __ } = useTranslate();
|
||||
const [data, refetch] = useRefetchableFragment(
|
||||
controlsFragment,
|
||||
stateOfApplicability,
|
||||
);
|
||||
const data = useFragment(controlsFragment, stateOfApplicability);
|
||||
const organizationId = useOrganizationId();
|
||||
const manageDialogRef = useRef<LinkControlDialogRef>(null);
|
||||
const addStatementDialogRef = useRef<AddApplicabilityStatementDialogRef>(null);
|
||||
const editDialogRef = useRef<EditControlDialogRef>(null);
|
||||
|
||||
const linkedControls = useMemo(
|
||||
() =>
|
||||
(data.availableControls || []).filter(
|
||||
c => c.stateOfApplicabilityId !== null,
|
||||
),
|
||||
[data.availableControls],
|
||||
);
|
||||
const connectionId = data.applicabilityStatements?.__id;
|
||||
|
||||
const [unlinkControl, isUnlinking] = useMutationWithToasts(
|
||||
unlinkControlMutation,
|
||||
const linkedControls = (data.applicabilityStatements?.edges || []).map(edge => ({
|
||||
applicabilityStatementId: edge.node.id,
|
||||
controlId: edge.node.control.id,
|
||||
sectionTitle: edge.node.control.sectionTitle,
|
||||
name: edge.node.control.name,
|
||||
frameworkId: edge.node.control.framework.id,
|
||||
frameworkName: edge.node.control.framework.name,
|
||||
organizationId: edge.node.control.organization?.id,
|
||||
applicability: edge.node.applicability,
|
||||
justification: edge.node.justification,
|
||||
bestPractice: edge.node.control.bestPractice,
|
||||
regulatory: edge.node.control.regulatory,
|
||||
contractual: edge.node.control.contractual,
|
||||
riskAssessment: edge.node.control.riskAssessment,
|
||||
}));
|
||||
|
||||
const [deleteApplicabilityStatement, isDeleting] = useMutationWithToasts(
|
||||
deleteApplicabilityStatementMutation,
|
||||
{
|
||||
successMessage: __("Control removed successfully."),
|
||||
errorMessage: __("Failed to remove control"),
|
||||
successMessage: __("Statement removed successfully."),
|
||||
errorMessage: __("Failed to remove statement"),
|
||||
},
|
||||
);
|
||||
|
||||
const canLink
|
||||
= !isSnapshotMode && data.canCreateStateOfApplicabilityControlMapping;
|
||||
const canUnlink
|
||||
= !isSnapshotMode && data.canDeleteStateOfApplicabilityControlMapping;
|
||||
const canCreate
|
||||
= !isSnapshotMode && data.canCreateApplicabilityStatement;
|
||||
const canUpdate
|
||||
= !isSnapshotMode && data.canUpdateApplicabilityStatement;
|
||||
const canDelete
|
||||
= !isSnapshotMode && data.canDeleteApplicabilityStatement;
|
||||
|
||||
const handleOpenManageDialog = () => {
|
||||
manageDialogRef.current?.open(data.id, () => {
|
||||
refetch({}, { fetchPolicy: "store-and-network" });
|
||||
});
|
||||
const handleOpenAddStatementDialog = () => {
|
||||
if (!data.organization || !connectionId) return;
|
||||
addStatementDialogRef.current?.open(data.id, data.organization.id, connectionId);
|
||||
};
|
||||
|
||||
const handleOpenEditDialog = (control: {
|
||||
controlId: string;
|
||||
applicabilityStatementId: string;
|
||||
sectionTitle: string;
|
||||
name: string;
|
||||
frameworkName: string;
|
||||
@@ -129,8 +150,7 @@ export default function StateOfApplicabilityControlsTab({
|
||||
justification: string | null;
|
||||
}) => {
|
||||
editDialogRef.current?.open({
|
||||
stateOfApplicabilityId: data.id,
|
||||
controlId: control.controlId,
|
||||
applicabilityStatementId: control.applicabilityStatementId,
|
||||
sectionTitle: control.sectionTitle,
|
||||
name: control.name,
|
||||
frameworkName: control.frameworkName,
|
||||
@@ -139,16 +159,14 @@ export default function StateOfApplicabilityControlsTab({
|
||||
});
|
||||
};
|
||||
|
||||
const handleUnlink = async (controlId: string) => {
|
||||
await unlinkControl({
|
||||
const handleDelete = async (applicabilityStatementId: string) => {
|
||||
if (!connectionId) return;
|
||||
await deleteApplicabilityStatement({
|
||||
variables: {
|
||||
input: {
|
||||
stateOfApplicabilityId: data.id,
|
||||
controlId,
|
||||
applicabilityStatementId,
|
||||
},
|
||||
},
|
||||
onSuccess: () => {
|
||||
refetch({}, { fetchPolicy: "network-only" });
|
||||
connections: [connectionId],
|
||||
},
|
||||
});
|
||||
};
|
||||
@@ -156,13 +174,13 @@ export default function StateOfApplicabilityControlsTab({
|
||||
return (
|
||||
<>
|
||||
<div className="space-y-4">
|
||||
{canLink && (
|
||||
{canCreate && (
|
||||
<div className="flex justify-end">
|
||||
<Button
|
||||
icon={IconPlusLarge}
|
||||
onClick={handleOpenManageDialog}
|
||||
onClick={handleOpenAddStatementDialog}
|
||||
>
|
||||
{__("Add Controls")}
|
||||
{__("Create Statement")}
|
||||
</Button>
|
||||
</div>
|
||||
)}
|
||||
@@ -188,7 +206,7 @@ export default function StateOfApplicabilityControlsTab({
|
||||
<Th className="w-36 text-center">
|
||||
{__("Risk Assessment")}
|
||||
</Th>
|
||||
{(canLink || canUnlink) && (
|
||||
{(canUpdate || canDelete) && (
|
||||
<Th className="w-12"></Th>
|
||||
)}
|
||||
</Tr>
|
||||
@@ -197,7 +215,7 @@ export default function StateOfApplicabilityControlsTab({
|
||||
{linkedControls.length === 0 && (
|
||||
<Tr>
|
||||
<Td
|
||||
colSpan={canLink || canUnlink ? 9 : 8}
|
||||
colSpan={canUpdate || canDelete ? 9 : 8}
|
||||
className="text-center text-txt-secondary py-12"
|
||||
>
|
||||
{__("No controls linked")}
|
||||
@@ -319,10 +337,10 @@ export default function StateOfApplicabilityControlsTab({
|
||||
</Badge>
|
||||
</div>
|
||||
</Td>
|
||||
{(canLink || canUnlink) && (
|
||||
{(canUpdate || canDelete) && (
|
||||
<Td noLink className="text-end">
|
||||
<ActionDropdown>
|
||||
{canLink && (
|
||||
{canUpdate && control.applicabilityStatementId && (
|
||||
<DropdownItem
|
||||
icon={IconPencil}
|
||||
onClick={(e) => {
|
||||
@@ -331,15 +349,22 @@ export default function StateOfApplicabilityControlsTab({
|
||||
if (
|
||||
typeof control.applicability
|
||||
=== "boolean"
|
||||
&& control.applicabilityStatementId
|
||||
) {
|
||||
handleOpenEditDialog(
|
||||
{
|
||||
controlId: control.controlId,
|
||||
sectionTitle: control.sectionTitle,
|
||||
applicabilityStatementId:
|
||||
control.applicabilityStatementId,
|
||||
sectionTitle:
|
||||
control.sectionTitle,
|
||||
name: control.name,
|
||||
frameworkName: control.frameworkName,
|
||||
applicability: control.applicability,
|
||||
justification: control.justification ?? null,
|
||||
frameworkName:
|
||||
control.frameworkName,
|
||||
applicability:
|
||||
control.applicability,
|
||||
justification:
|
||||
control.justification
|
||||
?? null,
|
||||
},
|
||||
);
|
||||
}
|
||||
@@ -348,16 +373,20 @@ export default function StateOfApplicabilityControlsTab({
|
||||
{__("Edit")}
|
||||
</DropdownItem>
|
||||
)}
|
||||
{canUnlink && (
|
||||
{canDelete && control.applicabilityStatementId && (
|
||||
<DropdownItem
|
||||
icon={IconTrashCan}
|
||||
variant="danger"
|
||||
onClick={(e) => {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
void handleUnlink(control.controlId);
|
||||
if (control.applicabilityStatementId) {
|
||||
void handleDelete(
|
||||
control.applicabilityStatementId,
|
||||
);
|
||||
}
|
||||
}}
|
||||
disabled={isUnlinking}
|
||||
disabled={isDeleting}
|
||||
>
|
||||
{__("Remove")}
|
||||
</DropdownItem>
|
||||
@@ -372,13 +401,8 @@ export default function StateOfApplicabilityControlsTab({
|
||||
</div>
|
||||
|
||||
<Suspense fallback={null}>
|
||||
<LinkControlDialog ref={manageDialogRef} />
|
||||
<EditControlDialog
|
||||
ref={editDialogRef}
|
||||
onSuccess={() => {
|
||||
refetch({}, { fetchPolicy: "network-only" });
|
||||
}}
|
||||
/>
|
||||
<AddApplicabilityStatementDialog ref={addStatementDialogRef} />
|
||||
<EditControlDialog ref={editDialogRef} />
|
||||
</Suspense>
|
||||
</>
|
||||
);
|
||||
|
||||
@@ -1,56 +0,0 @@
|
||||
import { formatDate } from "@probo/helpers";
|
||||
import { useTranslate } from "@probo/i18n";
|
||||
import { Card, Field } from "@probo/ui";
|
||||
import { useOutletContext } from "react-router";
|
||||
|
||||
import type { StateOfApplicabilityGraphNodeQuery$data } from "#/__generated__/core/StateOfApplicabilityGraphNodeQuery.graphql";
|
||||
|
||||
type StateOfApplicabilityNode = NonNullable<
|
||||
StateOfApplicabilityGraphNodeQuery$data["node"]
|
||||
>;
|
||||
|
||||
export default function StateOfApplicabilityOverviewTab() {
|
||||
const { stateOfApplicability } = useOutletContext<{
|
||||
stateOfApplicability: StateOfApplicabilityNode;
|
||||
}>();
|
||||
const { __ } = useTranslate();
|
||||
|
||||
return (
|
||||
<div className="space-y-4">
|
||||
<h2 className="text-base font-medium">
|
||||
{__("State of Applicability details")}
|
||||
</h2>
|
||||
<Card className="space-y-4" padded>
|
||||
<Field
|
||||
label={__("Name")}
|
||||
value={stateOfApplicability.name}
|
||||
disabled
|
||||
/>
|
||||
{stateOfApplicability.sourceId && (
|
||||
<Field
|
||||
label={__("Source")}
|
||||
value={stateOfApplicability.sourceId}
|
||||
disabled
|
||||
/>
|
||||
)}
|
||||
{stateOfApplicability.snapshotId && (
|
||||
<Field
|
||||
label={__("Snapshot")}
|
||||
value={stateOfApplicability.snapshotId}
|
||||
disabled
|
||||
/>
|
||||
)}
|
||||
<Field
|
||||
label={__("Created at")}
|
||||
value={formatDate(stateOfApplicability.createdAt)}
|
||||
disabled
|
||||
/>
|
||||
<Field
|
||||
label={__("Updated at")}
|
||||
value={formatDate(stateOfApplicability.updatedAt)}
|
||||
disabled
|
||||
/>
|
||||
</Card>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -1,71 +1,35 @@
|
||||
import { lazy } from "@probo/react-lazy";
|
||||
import { type AppRoute, loaderFromQueryLoader, withQueryRef } from "@probo/routes";
|
||||
import { loadQuery } from "react-relay";
|
||||
import type { AppRoute } from "@probo/routes";
|
||||
|
||||
import type { StateOfApplicabilityGraphNodeQuery } from "#/__generated__/core/StateOfApplicabilityGraphNodeQuery.graphql";
|
||||
import type { StateOfApplicabilityGraphPaginatedQuery } from "#/__generated__/core/StateOfApplicabilityGraphPaginatedQuery.graphql";
|
||||
import { PageSkeleton } from "#/components/skeletons/PageSkeleton.tsx";
|
||||
import { coreEnvironment } from "#/environments";
|
||||
import {
|
||||
paginatedStateOfApplicabilityQuery,
|
||||
stateOfApplicabilityNodeQuery,
|
||||
} from "#/hooks/graph/StateOfApplicabilityGraph";
|
||||
|
||||
export const statesOfApplicabilityRoutes = [
|
||||
{
|
||||
path: "states-of-applicability",
|
||||
Fallback: PageSkeleton,
|
||||
loader: loaderFromQueryLoader(({ organizationId }) =>
|
||||
loadQuery<StateOfApplicabilityGraphPaginatedQuery>(
|
||||
coreEnvironment,
|
||||
paginatedStateOfApplicabilityQuery,
|
||||
{ organizationId: organizationId },
|
||||
),
|
||||
),
|
||||
Component: withQueryRef(
|
||||
lazy(() => import("#/pages/organizations/states-of-applicability/StatesOfApplicabilityPage")),
|
||||
Component: lazy(
|
||||
() => import("#/pages/organizations/states-of-applicability/StatesOfApplicabilityPageLoader"),
|
||||
),
|
||||
},
|
||||
{
|
||||
path: "snapshots/:snapshotId/states-of-applicability",
|
||||
Fallback: PageSkeleton,
|
||||
loader: loaderFromQueryLoader(({ organizationId }) =>
|
||||
loadQuery<StateOfApplicabilityGraphPaginatedQuery>(
|
||||
coreEnvironment,
|
||||
paginatedStateOfApplicabilityQuery,
|
||||
{ organizationId: organizationId },
|
||||
),
|
||||
),
|
||||
Component: withQueryRef(
|
||||
lazy(() => import("#/pages/organizations/states-of-applicability/StatesOfApplicabilityPage")),
|
||||
Component: lazy(
|
||||
() => import("#/pages/organizations/states-of-applicability/StatesOfApplicabilityPageLoader"),
|
||||
),
|
||||
},
|
||||
{
|
||||
path: "states-of-applicability/:stateOfApplicabilityId",
|
||||
Fallback: PageSkeleton,
|
||||
loader: loaderFromQueryLoader(({ stateOfApplicabilityId }) =>
|
||||
loadQuery<StateOfApplicabilityGraphNodeQuery>(
|
||||
coreEnvironment,
|
||||
stateOfApplicabilityNodeQuery,
|
||||
{ stateOfApplicabilityId: stateOfApplicabilityId },
|
||||
),
|
||||
),
|
||||
Component: withQueryRef(
|
||||
lazy(() => import("#/pages/organizations/states-of-applicability/StateOfApplicabilityDetailPage")),
|
||||
Component: lazy(
|
||||
() => import("#/pages/organizations/states-of-applicability/StateOfApplicabilityDetailPageLoader"),
|
||||
),
|
||||
},
|
||||
{
|
||||
path: "snapshots/:snapshotId/states-of-applicability/:stateOfApplicabilityId",
|
||||
Fallback: PageSkeleton,
|
||||
loader: loaderFromQueryLoader(({ stateOfApplicabilityId }) =>
|
||||
loadQuery<StateOfApplicabilityGraphNodeQuery>(
|
||||
coreEnvironment,
|
||||
stateOfApplicabilityNodeQuery,
|
||||
{ stateOfApplicabilityId: stateOfApplicabilityId },
|
||||
),
|
||||
),
|
||||
Component: withQueryRef(
|
||||
lazy(() => import("#/pages/organizations/states-of-applicability/StateOfApplicabilityDetailPage")),
|
||||
Component: lazy(
|
||||
() => import("#/pages/organizations/states-of-applicability/StateOfApplicabilityDetailPageLoader"),
|
||||
),
|
||||
},
|
||||
] satisfies AppRoute[];
|
||||
|
||||
Reference in New Issue
Block a user