Fix control order in SOA
Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @generated SignedSource<<6a0d32b2293db5f05fee4b79e61db4b6>>
|
||||
* @generated SignedSource<<3eedb29b73b6e2c450d59f1d1ae0d88a>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
@@ -144,7 +144,7 @@ return {
|
||||
"name": "orderBy",
|
||||
"value": {
|
||||
"direction": "ASC",
|
||||
"field": "CREATED_AT"
|
||||
"field": "CONTROL_SECTION_TITLE"
|
||||
}
|
||||
}
|
||||
],
|
||||
@@ -304,7 +304,7 @@ return {
|
||||
]
|
||||
}
|
||||
],
|
||||
"storageKey": "__StateOfApplicabilityControlsTab_applicabilityStatements_connection(orderBy:{\"direction\":\"ASC\",\"field\":\"CREATED_AT\"})"
|
||||
"storageKey": "__StateOfApplicabilityControlsTab_applicabilityStatements_connection(orderBy:{\"direction\":\"ASC\",\"field\":\"CONTROL_SECTION_TITLE\"})"
|
||||
}
|
||||
],
|
||||
"type": "StateOfApplicability",
|
||||
@@ -312,6 +312,6 @@ return {
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "b5a28520cb7a702b208cbfad2c904a99";
|
||||
(node as any).hash = "b80671ffb8f18997cb72a9beddd6cad3";
|
||||
|
||||
export default node;
|
||||
|
||||
370
apps/console/src/__generated__/core/StateOfApplicabilityControlsTabRefetchQuery.graphql.ts
generated
Normal file
370
apps/console/src/__generated__/core/StateOfApplicabilityControlsTabRefetchQuery.graphql.ts
generated
Normal file
@@ -0,0 +1,370 @@
|
||||
/**
|
||||
* @generated SignedSource<<6205c318cd1e934de3d61bd54de6e67d>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
// @ts-nocheck
|
||||
|
||||
import { ConcreteRequest } from 'relay-runtime';
|
||||
import { FragmentRefs } from "relay-runtime";
|
||||
export type StateOfApplicabilityControlsTabRefetchQuery$variables = {
|
||||
stateOfApplicabilityId: 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": "stateOfApplicabilityId"
|
||||
}
|
||||
],
|
||||
v1 = [
|
||||
{
|
||||
"kind": "Variable",
|
||||
"name": "id",
|
||||
"variableName": "stateOfApplicabilityId"
|
||||
}
|
||||
],
|
||||
v2 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "__typename",
|
||||
"storageKey": null
|
||||
},
|
||||
v3 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "id",
|
||||
"storageKey": null
|
||||
},
|
||||
v4 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "Organization",
|
||||
"kind": "LinkedField",
|
||||
"name": "organization",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v3/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
v5 = [
|
||||
{
|
||||
"kind": "Literal",
|
||||
"name": "first",
|
||||
"value": 1000
|
||||
},
|
||||
{
|
||||
"kind": "Literal",
|
||||
"name": "orderBy",
|
||||
"value": {
|
||||
"direction": "ASC",
|
||||
"field": "CONTROL_SECTION_TITLE"
|
||||
}
|
||||
}
|
||||
],
|
||||
v6 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "name",
|
||||
"storageKey": null
|
||||
};
|
||||
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": [
|
||||
{
|
||||
"kind": "InlineFragment",
|
||||
"selections": [
|
||||
{
|
||||
"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": "StateOfApplicabilityControlsTabRefetchQuery",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v1/*: any*/),
|
||||
"concreteType": null,
|
||||
"kind": "LinkedField",
|
||||
"name": "node",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v2/*: any*/),
|
||||
(v3/*: any*/),
|
||||
{
|
||||
"kind": "InlineFragment",
|
||||
"selections": [
|
||||
(v4/*: 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": (v5/*: 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*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "sectionTitle",
|
||||
"storageKey": null
|
||||
},
|
||||
(v6/*: 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*/),
|
||||
(v6/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
(v4/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
(v2/*: 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\":\"CONTROL_SECTION_TITLE\"})"
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v5/*: any*/),
|
||||
"filters": [
|
||||
"orderBy"
|
||||
],
|
||||
"handle": "connection",
|
||||
"key": "StateOfApplicabilityControlsTab_applicabilityStatements",
|
||||
"kind": "LinkedHandle",
|
||||
"name": "applicabilityStatements"
|
||||
}
|
||||
],
|
||||
"type": "StateOfApplicability",
|
||||
"abstractKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
]
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "33994a831b0a5b34f01e96337e1a638d",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "StateOfApplicabilityControlsTabRefetchQuery",
|
||||
"operationKind": "query",
|
||||
"text": "query StateOfApplicabilityControlsTabRefetchQuery(\n $stateOfApplicabilityId: ID!\n) {\n node(id: $stateOfApplicabilityId) {\n __typename\n ... on StateOfApplicability {\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: CONTROL_SECTION_TITLE}) {\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 = "e0895b7dc7342b7df2d310a3a316bac1";
|
||||
|
||||
export default node;
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @generated SignedSource<<eba2fad98effd0d92aa3d1451a71497c>>
|
||||
* @generated SignedSource<<06d20e72b67288c86573caa22b15adff>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
@@ -184,7 +184,7 @@ v14 = [
|
||||
"name": "orderBy",
|
||||
"value": {
|
||||
"direction": "ASC",
|
||||
"field": "CREATED_AT"
|
||||
"field": "CONTROL_SECTION_TITLE"
|
||||
}
|
||||
}
|
||||
];
|
||||
@@ -454,7 +454,7 @@ return {
|
||||
]
|
||||
}
|
||||
],
|
||||
"storageKey": "applicabilityStatements(first:1000,orderBy:{\"direction\":\"ASC\",\"field\":\"CREATED_AT\"})"
|
||||
"storageKey": "applicabilityStatements(first:1000,orderBy:{\"direction\":\"ASC\",\"field\":\"CONTROL_SECTION_TITLE\"})"
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
@@ -477,12 +477,12 @@ return {
|
||||
]
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "ae9d15bd80281c127b74f1a0a32099ee",
|
||||
"cacheID": "dceee9f818236953e28441fb1bbde7aa",
|
||||
"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"
|
||||
"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: CONTROL_SECTION_TITLE}) {\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"
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @generated SignedSource<<d3e3309eefb502b19d48c61f9f162d18>>
|
||||
* @generated SignedSource<<240851e53a2871e13a6e19a5b327684c>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
@@ -189,7 +189,7 @@ return {
|
||||
]
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "478c002a1f98dd87f23c6af0269ea2c6",
|
||||
"cacheID": "680c8a1d89c3f45d06e203072c68e593",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "WebhooksSettingsPage_createMutation",
|
||||
@@ -199,6 +199,6 @@ return {
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "f47b849f8cad710922bf62eb6aebdd93";
|
||||
(node as any).hash = "ba13f2e1f417d449aa7d959c6411f858";
|
||||
|
||||
export default node;
|
||||
|
||||
@@ -461,8 +461,12 @@ function AddApplicabilityStatementDialogContent({
|
||||
);
|
||||
}
|
||||
|
||||
export const AddApplicabilityStatementDialog = forwardRef<AddApplicabilityStatementDialogRef>(
|
||||
(_props, ref) => {
|
||||
type AddApplicabilityStatementDialogProps = {
|
||||
onClose?: () => void;
|
||||
};
|
||||
|
||||
export const AddApplicabilityStatementDialog = forwardRef<AddApplicabilityStatementDialogRef, AddApplicabilityStatementDialogProps>(
|
||||
({ onClose }, ref) => {
|
||||
const { __ } = useTranslate();
|
||||
const dialogRef = useDialogRef();
|
||||
const [stateOfApplicabilityId, setStateOfApplicabilityId] = useState<string | null>(null);
|
||||
@@ -486,6 +490,7 @@ export const AddApplicabilityStatementDialog = forwardRef<AddApplicabilityStatem
|
||||
setStateOfApplicabilityId(null);
|
||||
setOrganizationId(null);
|
||||
setConnectionId(null);
|
||||
onClose?.();
|
||||
};
|
||||
|
||||
return (
|
||||
|
||||
@@ -149,13 +149,6 @@ export const EditControlDialog = forwardRef<EditControlDialogRef>((_props, ref)
|
||||
)}
|
||||
</DialogContent>
|
||||
<DialogFooter>
|
||||
<Button
|
||||
type="button"
|
||||
variant="secondary"
|
||||
onClick={() => dialogRef.current?.close()}
|
||||
>
|
||||
{__("Cancel")}
|
||||
</Button>
|
||||
<Button type="submit" disabled={isUpdating}>
|
||||
{__("Save")}
|
||||
</Button>
|
||||
|
||||
@@ -14,8 +14,9 @@ import {
|
||||
Thead,
|
||||
Tr,
|
||||
} from "@probo/ui";
|
||||
import { Suspense, useRef } from "react";
|
||||
import { graphql, useFragment } from "react-relay";
|
||||
import { Suspense, useCallback, useRef } from "react";
|
||||
import { graphql, useFragment, useRelayEnvironment } from "react-relay";
|
||||
import { fetchQuery } from "relay-runtime";
|
||||
|
||||
import type { StateOfApplicabilityControlsTabFragment$key } from "#/__generated__/core/StateOfApplicabilityControlsTabFragment.graphql";
|
||||
import { useMutationWithToasts } from "#/hooks/useMutationWithToasts";
|
||||
@@ -30,6 +31,16 @@ import {
|
||||
type EditControlDialogRef,
|
||||
} from "../dialogs/EditControlDialog";
|
||||
|
||||
const refetchStatementsQuery = graphql`
|
||||
query StateOfApplicabilityControlsTabRefetchQuery($stateOfApplicabilityId: ID!) {
|
||||
node(id: $stateOfApplicabilityId) {
|
||||
... on StateOfApplicability {
|
||||
...StateOfApplicabilityControlsTabFragment
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const controlsFragment = graphql`
|
||||
fragment StateOfApplicabilityControlsTabFragment on StateOfApplicability {
|
||||
id
|
||||
@@ -47,7 +58,7 @@ export const controlsFragment = graphql`
|
||||
action: "core:applicability-statement:delete"
|
||||
)
|
||||
|
||||
applicabilityStatements(first: 1000, orderBy: { direction: ASC, field: CREATED_AT })
|
||||
applicabilityStatements(first: 1000, orderBy: { direction: ASC, field: CONTROL_SECTION_TITLE })
|
||||
@connection(key: "StateOfApplicabilityControlsTab_applicabilityStatements") {
|
||||
__id
|
||||
edges {
|
||||
@@ -99,10 +110,18 @@ export default function StateOfApplicabilityControlsTab({
|
||||
}) {
|
||||
const { __ } = useTranslate();
|
||||
const data = useFragment(controlsFragment, stateOfApplicability);
|
||||
const environment = useRelayEnvironment();
|
||||
const organizationId = useOrganizationId();
|
||||
const addStatementDialogRef = useRef<AddApplicabilityStatementDialogRef>(null);
|
||||
const editDialogRef = useRef<EditControlDialogRef>(null);
|
||||
|
||||
const handleDialogClose = useCallback(() => {
|
||||
if (!data.id) return;
|
||||
fetchQuery(environment, refetchStatementsQuery, {
|
||||
stateOfApplicabilityId: data.id,
|
||||
}).subscribe({});
|
||||
}, [environment, data.id]);
|
||||
|
||||
const connectionId = data.applicabilityStatements?.__id;
|
||||
|
||||
const linkedControls = (data.applicabilityStatements?.edges || []).map(edge => ({
|
||||
@@ -401,7 +420,7 @@ export default function StateOfApplicabilityControlsTab({
|
||||
</div>
|
||||
|
||||
<Suspense fallback={null}>
|
||||
<AddApplicabilityStatementDialog ref={addStatementDialogRef} />
|
||||
<AddApplicabilityStatementDialog ref={addStatementDialogRef} onClose={handleDialogClose} />
|
||||
<EditControlDialog ref={editDialogRef} />
|
||||
</Suspense>
|
||||
</>
|
||||
|
||||
Reference in New Issue
Block a user