Add controls tab on risks
Signed-off-by: Bryan Frimin <bryan@getprobo.com> Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
This commit is contained in:
committed by
Sacha Al Himdani
parent
86da13d275
commit
00a5665a46
@@ -1,13 +1,16 @@
|
|||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
|
||||||
<meta charset="UTF-8" />
|
<head>
|
||||||
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
<meta charset="UTF-8" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
||||||
<title>Vite + React + TS</title>
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
</head>
|
<title>Probo Console</title>
|
||||||
<body>
|
</head>
|
||||||
<div id="root"></div>
|
|
||||||
<script type="module" src="/src/main.tsx"></script>
|
<body>
|
||||||
</body>
|
<div id="root"></div>
|
||||||
|
<script type="module" src="/src/main.tsx"></script>
|
||||||
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
@@ -63,6 +63,9 @@ const controlsFragment = graphql`
|
|||||||
id
|
id
|
||||||
name
|
name
|
||||||
sectionTitle
|
sectionTitle
|
||||||
|
framework {
|
||||||
|
name
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -179,9 +182,8 @@ function ControlRow(
|
|||||||
className="py-4 flex items-center gap-4 hover:bg-subtle cursor-pointer px-6 w-full text-start"
|
className="py-4 flex items-center gap-4 hover:bg-subtle cursor-pointer px-6 w-full text-start"
|
||||||
onClick={() => onClick(props.control.id)}
|
onClick={() => onClick(props.control.id)}
|
||||||
>
|
>
|
||||||
<Badge size="md">{props.control.sectionTitle}</Badge>
|
{props.control.sectionTitle} : {props.control.name}
|
||||||
{props.control.name}
|
<Badge>{props.control.framework.name}</Badge>
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
disabled={props.disabled}
|
disabled={props.disabled}
|
||||||
className="ml-auto"
|
className="ml-auto"
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* @generated SignedSource<<abe97be0de1c878a30ced882c0d22fee>>
|
* @generated SignedSource<<68d29ea810c69f34b0da8d3e66b4eb5e>>
|
||||||
* @lightSyntaxTransform
|
* @lightSyntaxTransform
|
||||||
* @nogrep
|
* @nogrep
|
||||||
*/
|
*/
|
||||||
@@ -131,7 +131,14 @@ v15 = [
|
|||||||
"name": "orderBy",
|
"name": "orderBy",
|
||||||
"variableName": "order"
|
"variableName": "order"
|
||||||
}
|
}
|
||||||
];
|
],
|
||||||
|
v16 = {
|
||||||
|
"alias": null,
|
||||||
|
"args": null,
|
||||||
|
"kind": "ScalarField",
|
||||||
|
"name": "name",
|
||||||
|
"storageKey": null
|
||||||
|
};
|
||||||
return {
|
return {
|
||||||
"fragment": {
|
"fragment": {
|
||||||
"argumentDefinitions": [
|
"argumentDefinitions": [
|
||||||
@@ -230,13 +237,7 @@ return {
|
|||||||
"plural": false,
|
"plural": false,
|
||||||
"selections": [
|
"selections": [
|
||||||
(v14/*: any*/),
|
(v14/*: any*/),
|
||||||
{
|
(v16/*: any*/),
|
||||||
"alias": null,
|
|
||||||
"args": null,
|
|
||||||
"kind": "ScalarField",
|
|
||||||
"name": "name",
|
|
||||||
"storageKey": null
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"alias": null,
|
"alias": null,
|
||||||
"args": null,
|
"args": null,
|
||||||
@@ -244,6 +245,19 @@ return {
|
|||||||
"name": "sectionTitle",
|
"name": "sectionTitle",
|
||||||
"storageKey": null
|
"storageKey": null
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"alias": null,
|
||||||
|
"args": null,
|
||||||
|
"concreteType": "Framework",
|
||||||
|
"kind": "LinkedField",
|
||||||
|
"name": "framework",
|
||||||
|
"plural": false,
|
||||||
|
"selections": [
|
||||||
|
(v16/*: any*/),
|
||||||
|
(v14/*: any*/)
|
||||||
|
],
|
||||||
|
"storageKey": null
|
||||||
|
},
|
||||||
(v13/*: any*/)
|
(v13/*: any*/)
|
||||||
],
|
],
|
||||||
"storageKey": null
|
"storageKey": null
|
||||||
@@ -322,16 +336,16 @@ return {
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"params": {
|
"params": {
|
||||||
"cacheID": "ececbd47b66b771cf95244ee81dae1f7",
|
"cacheID": "e9bcdc36129e6a05c59f344433459b66",
|
||||||
"id": null,
|
"id": null,
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"name": "LinkedControlsDialogControlsQuery",
|
"name": "LinkedControlsDialogControlsQuery",
|
||||||
"operationKind": "query",
|
"operationKind": "query",
|
||||||
"text": "query LinkedControlsDialogControlsQuery(\n $after: CursorKey\n $before: CursorKey = null\n $filter: ControlFilter = null\n $first: Int = 1\n $last: Int = null\n $order: ControlOrder = null\n $id: ID!\n) {\n node(id: $id) {\n __typename\n ...LinkedControlsDialogFragment_4cFWzS\n id\n }\n}\n\nfragment LinkedControlsDialogFragment_4cFWzS on Organization {\n controls(first: $first, after: $after, last: $last, before: $before, orderBy: $order, filter: $filter) {\n edges {\n node {\n id\n name\n sectionTitle\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n hasPreviousPage\n startCursor\n }\n }\n id\n}\n"
|
"text": "query LinkedControlsDialogControlsQuery(\n $after: CursorKey\n $before: CursorKey = null\n $filter: ControlFilter = null\n $first: Int = 1\n $last: Int = null\n $order: ControlOrder = null\n $id: ID!\n) {\n node(id: $id) {\n __typename\n ...LinkedControlsDialogFragment_4cFWzS\n id\n }\n}\n\nfragment LinkedControlsDialogFragment_4cFWzS on Organization {\n controls(first: $first, after: $after, last: $last, before: $before, orderBy: $order, filter: $filter) {\n edges {\n node {\n id\n name\n sectionTitle\n framework {\n name\n id\n }\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 = "b4dbf5c3271581e4317726870476da8d";
|
(node as any).hash = "9fc0bfbfc461d56748750b180bc232fc";
|
||||||
|
|
||||||
export default node;
|
export default node;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* @generated SignedSource<<0be68327d7fa04dbceb53404ed1d5df4>>
|
* @generated SignedSource<<06b39b49e82019064bd42a03c903fd93>>
|
||||||
* @lightSyntaxTransform
|
* @lightSyntaxTransform
|
||||||
* @nogrep
|
* @nogrep
|
||||||
*/
|
*/
|
||||||
@@ -14,6 +14,9 @@ export type LinkedControlsDialogFragment$data = {
|
|||||||
readonly controls: {
|
readonly controls: {
|
||||||
readonly edges: ReadonlyArray<{
|
readonly edges: ReadonlyArray<{
|
||||||
readonly node: {
|
readonly node: {
|
||||||
|
readonly framework: {
|
||||||
|
readonly name: string;
|
||||||
|
};
|
||||||
readonly id: string;
|
readonly id: string;
|
||||||
readonly name: string;
|
readonly name: string;
|
||||||
readonly sectionTitle: string;
|
readonly sectionTitle: string;
|
||||||
@@ -40,6 +43,13 @@ v1 = {
|
|||||||
"kind": "ScalarField",
|
"kind": "ScalarField",
|
||||||
"name": "id",
|
"name": "id",
|
||||||
"storageKey": null
|
"storageKey": null
|
||||||
|
},
|
||||||
|
v2 = {
|
||||||
|
"alias": null,
|
||||||
|
"args": null,
|
||||||
|
"kind": "ScalarField",
|
||||||
|
"name": "name",
|
||||||
|
"storageKey": null
|
||||||
};
|
};
|
||||||
return {
|
return {
|
||||||
"argumentDefinitions": [
|
"argumentDefinitions": [
|
||||||
@@ -144,13 +154,7 @@ return {
|
|||||||
"plural": false,
|
"plural": false,
|
||||||
"selections": [
|
"selections": [
|
||||||
(v1/*: any*/),
|
(v1/*: any*/),
|
||||||
{
|
(v2/*: any*/),
|
||||||
"alias": null,
|
|
||||||
"args": null,
|
|
||||||
"kind": "ScalarField",
|
|
||||||
"name": "name",
|
|
||||||
"storageKey": null
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"alias": null,
|
"alias": null,
|
||||||
"args": null,
|
"args": null,
|
||||||
@@ -158,6 +162,18 @@ return {
|
|||||||
"name": "sectionTitle",
|
"name": "sectionTitle",
|
||||||
"storageKey": null
|
"storageKey": null
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"alias": null,
|
||||||
|
"args": null,
|
||||||
|
"concreteType": "Framework",
|
||||||
|
"kind": "LinkedField",
|
||||||
|
"name": "framework",
|
||||||
|
"plural": false,
|
||||||
|
"selections": [
|
||||||
|
(v2/*: any*/)
|
||||||
|
],
|
||||||
|
"storageKey": null
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"alias": null,
|
"alias": null,
|
||||||
"args": null,
|
"args": null,
|
||||||
@@ -227,6 +243,6 @@ return {
|
|||||||
};
|
};
|
||||||
})();
|
})();
|
||||||
|
|
||||||
(node as any).hash = "b4dbf5c3271581e4317726870476da8d";
|
(node as any).hash = "9fc0bfbfc461d56748750b180bc232fc";
|
||||||
|
|
||||||
export default node;
|
export default node;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* @generated SignedSource<<ed40a9cdded98d98bf3d626f9d645d54>>
|
* @generated SignedSource<<f8a28e26c1260135c13f22f9d35019c2>>
|
||||||
* @lightSyntaxTransform
|
* @lightSyntaxTransform
|
||||||
* @nogrep
|
* @nogrep
|
||||||
*/
|
*/
|
||||||
@@ -59,7 +59,14 @@ v4 = [
|
|||||||
"name": "first",
|
"name": "first",
|
||||||
"value": 1
|
"value": 1
|
||||||
}
|
}
|
||||||
];
|
],
|
||||||
|
v5 = {
|
||||||
|
"alias": null,
|
||||||
|
"args": null,
|
||||||
|
"kind": "ScalarField",
|
||||||
|
"name": "name",
|
||||||
|
"storageKey": null
|
||||||
|
};
|
||||||
return {
|
return {
|
||||||
"fragment": {
|
"fragment": {
|
||||||
"argumentDefinitions": (v0/*: any*/),
|
"argumentDefinitions": (v0/*: any*/),
|
||||||
@@ -132,13 +139,7 @@ return {
|
|||||||
"plural": false,
|
"plural": false,
|
||||||
"selections": [
|
"selections": [
|
||||||
(v2/*: any*/),
|
(v2/*: any*/),
|
||||||
{
|
(v5/*: any*/),
|
||||||
"alias": null,
|
|
||||||
"args": null,
|
|
||||||
"kind": "ScalarField",
|
|
||||||
"name": "name",
|
|
||||||
"storageKey": null
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"alias": null,
|
"alias": null,
|
||||||
"args": null,
|
"args": null,
|
||||||
@@ -146,6 +147,19 @@ return {
|
|||||||
"name": "sectionTitle",
|
"name": "sectionTitle",
|
||||||
"storageKey": null
|
"storageKey": null
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"alias": null,
|
||||||
|
"args": null,
|
||||||
|
"concreteType": "Framework",
|
||||||
|
"kind": "LinkedField",
|
||||||
|
"name": "framework",
|
||||||
|
"plural": false,
|
||||||
|
"selections": [
|
||||||
|
(v5/*: any*/),
|
||||||
|
(v2/*: any*/)
|
||||||
|
],
|
||||||
|
"storageKey": null
|
||||||
|
},
|
||||||
(v3/*: any*/)
|
(v3/*: any*/)
|
||||||
],
|
],
|
||||||
"storageKey": null
|
"storageKey": null
|
||||||
@@ -224,12 +238,12 @@ return {
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"params": {
|
"params": {
|
||||||
"cacheID": "1b0f918add0dcf173a84255896a3b46c",
|
"cacheID": "a36d424a3b8a087dbb40149bdbc2b6a2",
|
||||||
"id": null,
|
"id": null,
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"name": "LinkedControlsDialogQuery",
|
"name": "LinkedControlsDialogQuery",
|
||||||
"operationKind": "query",
|
"operationKind": "query",
|
||||||
"text": "query LinkedControlsDialogQuery(\n $organizationId: ID!\n) {\n organization: node(id: $organizationId) {\n __typename\n id\n ...LinkedControlsDialogFragment\n }\n}\n\nfragment LinkedControlsDialogFragment on Organization {\n controls(first: 1) {\n edges {\n node {\n id\n name\n sectionTitle\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n hasPreviousPage\n startCursor\n }\n }\n id\n}\n"
|
"text": "query LinkedControlsDialogQuery(\n $organizationId: ID!\n) {\n organization: node(id: $organizationId) {\n __typename\n id\n ...LinkedControlsDialogFragment\n }\n}\n\nfragment LinkedControlsDialogFragment on Organization {\n controls(first: 1) {\n edges {\n node {\n id\n name\n sectionTitle\n framework {\n name\n id\n }\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n hasPreviousPage\n startCursor\n }\n }\n id\n}\n"
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
})();
|
})();
|
||||||
|
|||||||
@@ -46,6 +46,18 @@ export const measureNodeQuery = graphql`
|
|||||||
description
|
description
|
||||||
state
|
state
|
||||||
category
|
category
|
||||||
|
evidencesInfos: evidences(first: 0) {
|
||||||
|
totalCount
|
||||||
|
}
|
||||||
|
risksInfos: risks(first: 0) {
|
||||||
|
totalCount
|
||||||
|
}
|
||||||
|
tasksInfos: tasks(first: 0) {
|
||||||
|
totalCount
|
||||||
|
}
|
||||||
|
controlsInfos: controls(first: 0) {
|
||||||
|
totalCount
|
||||||
|
}
|
||||||
...MeasureRisksTabFragment
|
...MeasureRisksTabFragment
|
||||||
...MeasureTasksTabFragment
|
...MeasureTasksTabFragment
|
||||||
...MeasureControlsTabFragment
|
...MeasureControlsTabFragment
|
||||||
|
|||||||
@@ -81,7 +81,7 @@ export function useRisksQuery(queryRef: PreloadedQuery<RiskGraphListQuery>) {
|
|||||||
const data = usePreloadedQuery(risksQuery, queryRef);
|
const data = usePreloadedQuery(risksQuery, queryRef);
|
||||||
const [dataFragment, refetch] = useRefetchableFragment(
|
const [dataFragment, refetch] = useRefetchableFragment(
|
||||||
risksFragment,
|
risksFragment,
|
||||||
data.organization as RiskGraphFragment$key
|
data.organization as RiskGraphFragment$key,
|
||||||
);
|
);
|
||||||
const risks = dataFragment?.risks?.edges.map((edge) => edge.node);
|
const risks = dataFragment?.risks?.edges.map((edge) => edge.node);
|
||||||
return {
|
return {
|
||||||
@@ -89,7 +89,7 @@ export function useRisksQuery(queryRef: PreloadedQuery<RiskGraphListQuery>) {
|
|||||||
refetch,
|
refetch,
|
||||||
connectionId: ConnectionHandler.getConnectionID(
|
connectionId: ConnectionHandler.getConnectionID(
|
||||||
data.organization.id,
|
data.organization.id,
|
||||||
RisksConnectionKey
|
RisksConnectionKey,
|
||||||
),
|
),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -106,10 +106,20 @@ export const riskNodeQuery = graphql`
|
|||||||
fullName
|
fullName
|
||||||
}
|
}
|
||||||
note
|
note
|
||||||
|
measuresInfo: measures(first: 0) {
|
||||||
|
totalCount
|
||||||
|
}
|
||||||
|
documentsInfo: documents(first: 0) {
|
||||||
|
totalCount
|
||||||
|
}
|
||||||
|
controlsInfo: controls(first: 0) {
|
||||||
|
totalCount
|
||||||
|
}
|
||||||
...useRiskFormFragment
|
...useRiskFormFragment
|
||||||
...RiskOverviewTabFragment
|
...RiskOverviewTabFragment
|
||||||
...RiskMeasuresTabFragment
|
...RiskMeasuresTabFragment
|
||||||
...RiskDocumentsTabFragment
|
...RiskDocumentsTabFragment
|
||||||
|
...RiskControlsTabFragment
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* @generated SignedSource<<3bb1ec7019c6c8cea50060568e814acc>>
|
* @generated SignedSource<<91fae4ffa86907530e46f054c89f36c3>>
|
||||||
* @lightSyntaxTransform
|
* @lightSyntaxTransform
|
||||||
* @nogrep
|
* @nogrep
|
||||||
*/
|
*/
|
||||||
@@ -296,6 +296,30 @@ return {
|
|||||||
"kind": "LinkedHandle",
|
"kind": "LinkedHandle",
|
||||||
"name": "controls"
|
"name": "controls"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"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": null,
|
"alias": null,
|
||||||
"args": (v5/*: any*/),
|
"args": (v5/*: any*/),
|
||||||
@@ -496,12 +520,12 @@ return {
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"params": {
|
"params": {
|
||||||
"cacheID": "4fee77bf44296ec1d731ba85a61e26bf",
|
"cacheID": "389866b9db384ce6c9f4e79caab3a6fd",
|
||||||
"id": null,
|
"id": null,
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"name": "DocumentGraphNodeQuery",
|
"name": "DocumentGraphNodeQuery",
|
||||||
"operationKind": "query",
|
"operationKind": "query",
|
||||||
"text": "query DocumentGraphNodeQuery(\n $documentId: ID!\n) {\n node(id: $documentId) {\n __typename\n ... on Document {\n ...DocumentDetailPageDocumentFragment\n }\n id\n }\n}\n\nfragment DocumentControlsTabFragment on Document {\n id\n controls(first: 20) {\n edges {\n node {\n id\n ...LinkedControlsCardFragment\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n hasPreviousPage\n startCursor\n }\n }\n}\n\nfragment DocumentDetailPageDocumentFragment on Document {\n id\n title\n owner {\n id\n fullName\n }\n ...DocumentControlsTabFragment\n versions(first: 20) {\n edges {\n node {\n id\n content\n status\n publishedAt\n version\n updatedAt\n signatures(first: 100) {\n edges {\n node {\n id\n state\n signedBy {\n id\n }\n ...DocumentSignaturesDialog_signature\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n }\n }\n ...DocumentVersionHistoryDialogFragment\n ...DocumentSignaturesDialog_version\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n }\n }\n}\n\nfragment DocumentSignaturesDialog_signature on DocumentVersionSignature {\n id\n state\n signedAt\n requestedAt\n signedBy {\n fullName\n primaryEmailAddress\n id\n }\n}\n\nfragment DocumentSignaturesDialog_version on DocumentVersion {\n version\n status\n publishedAt\n updatedAt\n}\n\nfragment DocumentVersionHistoryDialogFragment on DocumentVersion {\n id\n version\n status\n content\n changelog\n publishedAt\n updatedAt\n publishedBy {\n fullName\n id\n }\n}\n\nfragment LinkedControlsCardFragment on Control {\n id\n name\n sectionTitle\n framework {\n id\n name\n }\n}\n"
|
"text": "query DocumentGraphNodeQuery(\n $documentId: ID!\n) {\n node(id: $documentId) {\n __typename\n ... on Document {\n ...DocumentDetailPageDocumentFragment\n }\n id\n }\n}\n\nfragment DocumentControlsTabFragment on Document {\n id\n controls(first: 20) {\n edges {\n node {\n id\n ...LinkedControlsCardFragment\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n hasPreviousPage\n startCursor\n }\n }\n}\n\nfragment DocumentDetailPageDocumentFragment on Document {\n id\n title\n owner {\n id\n fullName\n }\n ...DocumentControlsTabFragment\n controlsInfo: controls(first: 0) {\n totalCount\n }\n versions(first: 20) {\n edges {\n node {\n id\n content\n status\n publishedAt\n version\n updatedAt\n signatures(first: 100) {\n edges {\n node {\n id\n state\n signedBy {\n id\n }\n ...DocumentSignaturesDialog_signature\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n }\n }\n ...DocumentVersionHistoryDialogFragment\n ...DocumentSignaturesDialog_version\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n }\n }\n}\n\nfragment DocumentSignaturesDialog_signature on DocumentVersionSignature {\n id\n state\n signedAt\n requestedAt\n signedBy {\n fullName\n primaryEmailAddress\n id\n }\n}\n\nfragment DocumentSignaturesDialog_version on DocumentVersion {\n version\n status\n publishedAt\n updatedAt\n}\n\nfragment DocumentVersionHistoryDialogFragment on DocumentVersion {\n id\n version\n status\n content\n changelog\n publishedAt\n updatedAt\n publishedBy {\n fullName\n id\n }\n}\n\nfragment LinkedControlsCardFragment on Control {\n id\n name\n sectionTitle\n framework {\n id\n name\n }\n}\n"
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
})();
|
})();
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* @generated SignedSource<<70372622c717225f055cc422e4a2ee39>>
|
* @generated SignedSource<<7e91345490d4b70ef6668bb6504be1e3>>
|
||||||
* @lightSyntaxTransform
|
* @lightSyntaxTransform
|
||||||
* @nogrep
|
* @nogrep
|
||||||
*/
|
*/
|
||||||
@@ -17,10 +17,22 @@ export type MeasureGraphNodeQuery$variables = {
|
|||||||
export type MeasureGraphNodeQuery$data = {
|
export type MeasureGraphNodeQuery$data = {
|
||||||
readonly node: {
|
readonly node: {
|
||||||
readonly category?: string;
|
readonly category?: string;
|
||||||
|
readonly controlsInfos?: {
|
||||||
|
readonly totalCount: number;
|
||||||
|
};
|
||||||
readonly description?: string;
|
readonly description?: string;
|
||||||
|
readonly evidencesInfos?: {
|
||||||
|
readonly totalCount: number;
|
||||||
|
};
|
||||||
readonly id?: string;
|
readonly id?: string;
|
||||||
readonly name?: string;
|
readonly name?: string;
|
||||||
|
readonly risksInfos?: {
|
||||||
|
readonly totalCount: number;
|
||||||
|
};
|
||||||
readonly state?: MeasureState;
|
readonly state?: MeasureState;
|
||||||
|
readonly tasksInfos?: {
|
||||||
|
readonly totalCount: number;
|
||||||
|
};
|
||||||
readonly " $fragmentSpreads": FragmentRefs<"MeasureControlsTabFragment" | "MeasureEvidencesTabFragment" | "MeasureFormDialogMeasureFragment" | "MeasureRisksTabFragment" | "MeasureTasksTabFragment">;
|
readonly " $fragmentSpreads": FragmentRefs<"MeasureControlsTabFragment" | "MeasureEvidencesTabFragment" | "MeasureFormDialogMeasureFragment" | "MeasureRisksTabFragment" | "MeasureTasksTabFragment">;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@@ -79,42 +91,98 @@ v6 = {
|
|||||||
"name": "category",
|
"name": "category",
|
||||||
"storageKey": null
|
"storageKey": null
|
||||||
},
|
},
|
||||||
v7 = {
|
v7 = [
|
||||||
|
{
|
||||||
|
"kind": "Literal",
|
||||||
|
"name": "first",
|
||||||
|
"value": 0
|
||||||
|
}
|
||||||
|
],
|
||||||
|
v8 = [
|
||||||
|
{
|
||||||
|
"alias": null,
|
||||||
|
"args": null,
|
||||||
|
"kind": "ScalarField",
|
||||||
|
"name": "totalCount",
|
||||||
|
"storageKey": null
|
||||||
|
}
|
||||||
|
],
|
||||||
|
v9 = {
|
||||||
|
"alias": "evidencesInfos",
|
||||||
|
"args": (v7/*: any*/),
|
||||||
|
"concreteType": "EvidenceConnection",
|
||||||
|
"kind": "LinkedField",
|
||||||
|
"name": "evidences",
|
||||||
|
"plural": false,
|
||||||
|
"selections": (v8/*: any*/),
|
||||||
|
"storageKey": "evidences(first:0)"
|
||||||
|
},
|
||||||
|
v10 = {
|
||||||
|
"alias": "risksInfos",
|
||||||
|
"args": (v7/*: any*/),
|
||||||
|
"concreteType": "RiskConnection",
|
||||||
|
"kind": "LinkedField",
|
||||||
|
"name": "risks",
|
||||||
|
"plural": false,
|
||||||
|
"selections": (v8/*: any*/),
|
||||||
|
"storageKey": "risks(first:0)"
|
||||||
|
},
|
||||||
|
v11 = {
|
||||||
|
"alias": "tasksInfos",
|
||||||
|
"args": (v7/*: any*/),
|
||||||
|
"concreteType": "TaskConnection",
|
||||||
|
"kind": "LinkedField",
|
||||||
|
"name": "tasks",
|
||||||
|
"plural": false,
|
||||||
|
"selections": (v8/*: any*/),
|
||||||
|
"storageKey": "tasks(first:0)"
|
||||||
|
},
|
||||||
|
v12 = {
|
||||||
|
"alias": "controlsInfos",
|
||||||
|
"args": (v7/*: any*/),
|
||||||
|
"concreteType": "ControlConnection",
|
||||||
|
"kind": "LinkedField",
|
||||||
|
"name": "controls",
|
||||||
|
"plural": false,
|
||||||
|
"selections": (v8/*: any*/),
|
||||||
|
"storageKey": "controls(first:0)"
|
||||||
|
},
|
||||||
|
v13 = {
|
||||||
"alias": null,
|
"alias": null,
|
||||||
"args": null,
|
"args": null,
|
||||||
"kind": "ScalarField",
|
"kind": "ScalarField",
|
||||||
"name": "__typename",
|
"name": "__typename",
|
||||||
"storageKey": null
|
"storageKey": null
|
||||||
},
|
},
|
||||||
v8 = [
|
v14 = [
|
||||||
{
|
{
|
||||||
"kind": "Literal",
|
"kind": "Literal",
|
||||||
"name": "first",
|
"name": "first",
|
||||||
"value": 100
|
"value": 100
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
v9 = {
|
v15 = {
|
||||||
"alias": null,
|
"alias": null,
|
||||||
"args": null,
|
"args": null,
|
||||||
"kind": "ScalarField",
|
"kind": "ScalarField",
|
||||||
"name": "cursor",
|
"name": "cursor",
|
||||||
"storageKey": null
|
"storageKey": null
|
||||||
},
|
},
|
||||||
v10 = {
|
v16 = {
|
||||||
"alias": null,
|
"alias": null,
|
||||||
"args": null,
|
"args": null,
|
||||||
"kind": "ScalarField",
|
"kind": "ScalarField",
|
||||||
"name": "endCursor",
|
"name": "endCursor",
|
||||||
"storageKey": null
|
"storageKey": null
|
||||||
},
|
},
|
||||||
v11 = {
|
v17 = {
|
||||||
"alias": null,
|
"alias": null,
|
||||||
"args": null,
|
"args": null,
|
||||||
"kind": "ScalarField",
|
"kind": "ScalarField",
|
||||||
"name": "hasNextPage",
|
"name": "hasNextPage",
|
||||||
"storageKey": null
|
"storageKey": null
|
||||||
},
|
},
|
||||||
v12 = {
|
v18 = {
|
||||||
"alias": null,
|
"alias": null,
|
||||||
"args": null,
|
"args": null,
|
||||||
"concreteType": "PageInfo",
|
"concreteType": "PageInfo",
|
||||||
@@ -122,12 +190,12 @@ v12 = {
|
|||||||
"name": "pageInfo",
|
"name": "pageInfo",
|
||||||
"plural": false,
|
"plural": false,
|
||||||
"selections": [
|
"selections": [
|
||||||
(v10/*: any*/),
|
(v16/*: any*/),
|
||||||
(v11/*: any*/)
|
(v17/*: any*/)
|
||||||
],
|
],
|
||||||
"storageKey": null
|
"storageKey": null
|
||||||
},
|
},
|
||||||
v13 = {
|
v19 = {
|
||||||
"kind": "ClientExtension",
|
"kind": "ClientExtension",
|
||||||
"selections": [
|
"selections": [
|
||||||
{
|
{
|
||||||
@@ -139,14 +207,14 @@ v13 = {
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
v14 = [
|
v20 = [
|
||||||
{
|
{
|
||||||
"kind": "Literal",
|
"kind": "Literal",
|
||||||
"name": "first",
|
"name": "first",
|
||||||
"value": 20
|
"value": 20
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
v15 = {
|
v21 = {
|
||||||
"alias": null,
|
"alias": null,
|
||||||
"args": null,
|
"args": null,
|
||||||
"concreteType": "PageInfo",
|
"concreteType": "PageInfo",
|
||||||
@@ -154,8 +222,8 @@ v15 = {
|
|||||||
"name": "pageInfo",
|
"name": "pageInfo",
|
||||||
"plural": false,
|
"plural": false,
|
||||||
"selections": [
|
"selections": [
|
||||||
(v10/*: any*/),
|
(v16/*: any*/),
|
||||||
(v11/*: any*/),
|
(v17/*: any*/),
|
||||||
{
|
{
|
||||||
"alias": null,
|
"alias": null,
|
||||||
"args": null,
|
"args": null,
|
||||||
@@ -173,7 +241,7 @@ v15 = {
|
|||||||
],
|
],
|
||||||
"storageKey": null
|
"storageKey": null
|
||||||
},
|
},
|
||||||
v16 = [
|
v22 = [
|
||||||
{
|
{
|
||||||
"kind": "Literal",
|
"kind": "Literal",
|
||||||
"name": "first",
|
"name": "first",
|
||||||
@@ -203,6 +271,10 @@ return {
|
|||||||
(v4/*: any*/),
|
(v4/*: any*/),
|
||||||
(v5/*: any*/),
|
(v5/*: any*/),
|
||||||
(v6/*: any*/),
|
(v6/*: any*/),
|
||||||
|
(v9/*: any*/),
|
||||||
|
(v10/*: any*/),
|
||||||
|
(v11/*: any*/),
|
||||||
|
(v12/*: any*/),
|
||||||
{
|
{
|
||||||
"args": null,
|
"args": null,
|
||||||
"kind": "FragmentSpread",
|
"kind": "FragmentSpread",
|
||||||
@@ -253,7 +325,7 @@ return {
|
|||||||
"name": "node",
|
"name": "node",
|
||||||
"plural": false,
|
"plural": false,
|
||||||
"selections": [
|
"selections": [
|
||||||
(v7/*: any*/),
|
(v13/*: any*/),
|
||||||
(v2/*: any*/),
|
(v2/*: any*/),
|
||||||
{
|
{
|
||||||
"kind": "InlineFragment",
|
"kind": "InlineFragment",
|
||||||
@@ -262,9 +334,13 @@ return {
|
|||||||
(v4/*: any*/),
|
(v4/*: any*/),
|
||||||
(v5/*: any*/),
|
(v5/*: any*/),
|
||||||
(v6/*: any*/),
|
(v6/*: any*/),
|
||||||
|
(v9/*: any*/),
|
||||||
|
(v10/*: any*/),
|
||||||
|
(v11/*: any*/),
|
||||||
|
(v12/*: any*/),
|
||||||
{
|
{
|
||||||
"alias": null,
|
"alias": null,
|
||||||
"args": (v8/*: any*/),
|
"args": (v14/*: any*/),
|
||||||
"concreteType": "RiskConnection",
|
"concreteType": "RiskConnection",
|
||||||
"kind": "LinkedField",
|
"kind": "LinkedField",
|
||||||
"name": "risks",
|
"name": "risks",
|
||||||
@@ -302,22 +378,22 @@ return {
|
|||||||
"name": "residualRiskScore",
|
"name": "residualRiskScore",
|
||||||
"storageKey": null
|
"storageKey": null
|
||||||
},
|
},
|
||||||
(v7/*: any*/)
|
(v13/*: any*/)
|
||||||
],
|
],
|
||||||
"storageKey": null
|
"storageKey": null
|
||||||
},
|
},
|
||||||
(v9/*: any*/)
|
(v15/*: any*/)
|
||||||
],
|
],
|
||||||
"storageKey": null
|
"storageKey": null
|
||||||
},
|
},
|
||||||
(v12/*: any*/),
|
(v18/*: any*/),
|
||||||
(v13/*: any*/)
|
(v19/*: any*/)
|
||||||
],
|
],
|
||||||
"storageKey": "risks(first:100)"
|
"storageKey": "risks(first:100)"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"alias": null,
|
"alias": null,
|
||||||
"args": (v8/*: any*/),
|
"args": (v14/*: any*/),
|
||||||
"filters": null,
|
"filters": null,
|
||||||
"handle": "connection",
|
"handle": "connection",
|
||||||
"key": "Measure__risks",
|
"key": "Measure__risks",
|
||||||
@@ -326,7 +402,7 @@ return {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"alias": null,
|
"alias": null,
|
||||||
"args": (v8/*: any*/),
|
"args": (v14/*: any*/),
|
||||||
"concreteType": "TaskConnection",
|
"concreteType": "TaskConnection",
|
||||||
"kind": "LinkedField",
|
"kind": "LinkedField",
|
||||||
"name": "tasks",
|
"name": "tasks",
|
||||||
@@ -397,22 +473,22 @@ return {
|
|||||||
],
|
],
|
||||||
"storageKey": null
|
"storageKey": null
|
||||||
},
|
},
|
||||||
(v7/*: any*/)
|
(v13/*: any*/)
|
||||||
],
|
],
|
||||||
"storageKey": null
|
"storageKey": null
|
||||||
},
|
},
|
||||||
(v9/*: any*/)
|
(v15/*: any*/)
|
||||||
],
|
],
|
||||||
"storageKey": null
|
"storageKey": null
|
||||||
},
|
},
|
||||||
(v12/*: any*/),
|
(v18/*: any*/),
|
||||||
(v13/*: any*/)
|
(v19/*: any*/)
|
||||||
],
|
],
|
||||||
"storageKey": "tasks(first:100)"
|
"storageKey": "tasks(first:100)"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"alias": null,
|
"alias": null,
|
||||||
"args": (v8/*: any*/),
|
"args": (v14/*: any*/),
|
||||||
"filters": null,
|
"filters": null,
|
||||||
"handle": "connection",
|
"handle": "connection",
|
||||||
"key": "Measure__tasks",
|
"key": "Measure__tasks",
|
||||||
@@ -421,7 +497,7 @@ return {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"alias": null,
|
"alias": null,
|
||||||
"args": (v14/*: any*/),
|
"args": (v20/*: any*/),
|
||||||
"concreteType": "ControlConnection",
|
"concreteType": "ControlConnection",
|
||||||
"kind": "LinkedField",
|
"kind": "LinkedField",
|
||||||
"name": "controls",
|
"name": "controls",
|
||||||
@@ -465,22 +541,22 @@ return {
|
|||||||
],
|
],
|
||||||
"storageKey": null
|
"storageKey": null
|
||||||
},
|
},
|
||||||
(v7/*: any*/)
|
(v13/*: any*/)
|
||||||
],
|
],
|
||||||
"storageKey": null
|
"storageKey": null
|
||||||
},
|
},
|
||||||
(v9/*: any*/)
|
(v15/*: any*/)
|
||||||
],
|
],
|
||||||
"storageKey": null
|
"storageKey": null
|
||||||
},
|
},
|
||||||
(v15/*: any*/),
|
(v21/*: any*/),
|
||||||
(v13/*: any*/)
|
(v19/*: any*/)
|
||||||
],
|
],
|
||||||
"storageKey": "controls(first:20)"
|
"storageKey": "controls(first:20)"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"alias": null,
|
"alias": null,
|
||||||
"args": (v14/*: any*/),
|
"args": (v20/*: any*/),
|
||||||
"filters": [
|
"filters": [
|
||||||
"orderBy",
|
"orderBy",
|
||||||
"filter"
|
"filter"
|
||||||
@@ -492,7 +568,7 @@ return {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"alias": null,
|
"alias": null,
|
||||||
"args": (v16/*: any*/),
|
"args": (v22/*: any*/),
|
||||||
"concreteType": "EvidenceConnection",
|
"concreteType": "EvidenceConnection",
|
||||||
"kind": "LinkedField",
|
"kind": "LinkedField",
|
||||||
"name": "evidences",
|
"name": "evidences",
|
||||||
@@ -557,22 +633,22 @@ return {
|
|||||||
"name": "mimeType",
|
"name": "mimeType",
|
||||||
"storageKey": null
|
"storageKey": null
|
||||||
},
|
},
|
||||||
(v7/*: any*/)
|
(v13/*: any*/)
|
||||||
],
|
],
|
||||||
"storageKey": null
|
"storageKey": null
|
||||||
},
|
},
|
||||||
(v9/*: any*/)
|
(v15/*: any*/)
|
||||||
],
|
],
|
||||||
"storageKey": null
|
"storageKey": null
|
||||||
},
|
},
|
||||||
(v15/*: any*/),
|
(v21/*: any*/),
|
||||||
(v13/*: any*/)
|
(v19/*: any*/)
|
||||||
],
|
],
|
||||||
"storageKey": "evidences(first:50)"
|
"storageKey": "evidences(first:50)"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"alias": null,
|
"alias": null,
|
||||||
"args": (v16/*: any*/),
|
"args": (v22/*: any*/),
|
||||||
"filters": [
|
"filters": [
|
||||||
"orderBy"
|
"orderBy"
|
||||||
],
|
],
|
||||||
@@ -591,16 +667,16 @@ return {
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"params": {
|
"params": {
|
||||||
"cacheID": "89371663df31f5d410b2556da8472d53",
|
"cacheID": "4a923b265801da22c605af53e744d543",
|
||||||
"id": null,
|
"id": null,
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"name": "MeasureGraphNodeQuery",
|
"name": "MeasureGraphNodeQuery",
|
||||||
"operationKind": "query",
|
"operationKind": "query",
|
||||||
"text": "query MeasureGraphNodeQuery(\n $measureId: ID!\n) {\n node(id: $measureId) {\n __typename\n ... on Measure {\n id\n name\n description\n state\n category\n ...MeasureRisksTabFragment\n ...MeasureTasksTabFragment\n ...MeasureControlsTabFragment\n ...MeasureFormDialogMeasureFragment\n ...MeasureEvidencesTabFragment\n }\n id\n }\n}\n\nfragment LinkedControlsCardFragment on Control {\n id\n name\n sectionTitle\n framework {\n id\n name\n }\n}\n\nfragment LinkedRisksCardFragment on Risk {\n id\n name\n inherentRiskScore\n residualRiskScore\n}\n\nfragment MeasureControlsTabFragment on Measure {\n id\n controls(first: 20) {\n edges {\n node {\n id\n ...LinkedControlsCardFragment\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n hasPreviousPage\n startCursor\n }\n }\n}\n\nfragment MeasureEvidencesTabFragment on Measure {\n id\n evidences(first: 50) {\n edges {\n node {\n id\n ...MeasureEvidencesTabFragment_evidence\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n hasPreviousPage\n startCursor\n }\n }\n}\n\nfragment MeasureEvidencesTabFragment_evidence on Evidence {\n id\n filename\n size\n type\n createdAt\n fileUrl\n mimeType\n}\n\nfragment MeasureFormDialogMeasureFragment on Measure {\n id\n description\n name\n category\n state\n}\n\nfragment MeasureRisksTabFragment on Measure {\n id\n risks(first: 100) {\n edges {\n node {\n id\n ...LinkedRisksCardFragment\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n }\n }\n}\n\nfragment MeasureTasksTabFragment on Measure {\n tasks(first: 100) {\n edges {\n node {\n id\n name\n state\n description\n ...TaskFormDialogFragment\n assignedTo {\n id\n fullName\n }\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n }\n }\n}\n\nfragment TaskFormDialogFragment on Task {\n id\n description\n name\n state\n timeEstimate\n deadline\n assignedTo {\n id\n }\n measure {\n id\n }\n}\n"
|
"text": "query MeasureGraphNodeQuery(\n $measureId: ID!\n) {\n node(id: $measureId) {\n __typename\n ... on Measure {\n id\n name\n description\n state\n category\n evidencesInfos: evidences(first: 0) {\n totalCount\n }\n risksInfos: risks(first: 0) {\n totalCount\n }\n tasksInfos: tasks(first: 0) {\n totalCount\n }\n controlsInfos: controls(first: 0) {\n totalCount\n }\n ...MeasureRisksTabFragment\n ...MeasureTasksTabFragment\n ...MeasureControlsTabFragment\n ...MeasureFormDialogMeasureFragment\n ...MeasureEvidencesTabFragment\n }\n id\n }\n}\n\nfragment LinkedControlsCardFragment on Control {\n id\n name\n sectionTitle\n framework {\n id\n name\n }\n}\n\nfragment LinkedRisksCardFragment on Risk {\n id\n name\n inherentRiskScore\n residualRiskScore\n}\n\nfragment MeasureControlsTabFragment on Measure {\n id\n controls(first: 20) {\n edges {\n node {\n id\n ...LinkedControlsCardFragment\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n hasPreviousPage\n startCursor\n }\n }\n}\n\nfragment MeasureEvidencesTabFragment on Measure {\n id\n evidences(first: 50) {\n edges {\n node {\n id\n ...MeasureEvidencesTabFragment_evidence\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n hasPreviousPage\n startCursor\n }\n }\n}\n\nfragment MeasureEvidencesTabFragment_evidence on Evidence {\n id\n filename\n size\n type\n createdAt\n fileUrl\n mimeType\n}\n\nfragment MeasureFormDialogMeasureFragment on Measure {\n id\n description\n name\n category\n state\n}\n\nfragment MeasureRisksTabFragment on Measure {\n id\n risks(first: 100) {\n edges {\n node {\n id\n ...LinkedRisksCardFragment\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n }\n }\n}\n\nfragment MeasureTasksTabFragment on Measure {\n tasks(first: 100) {\n edges {\n node {\n id\n name\n state\n description\n ...TaskFormDialogFragment\n assignedTo {\n id\n fullName\n }\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n }\n }\n}\n\nfragment TaskFormDialogFragment on Task {\n id\n description\n name\n state\n timeEstimate\n deadline\n assignedTo {\n id\n }\n measure {\n id\n }\n}\n"
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
})();
|
})();
|
||||||
|
|
||||||
(node as any).hash = "d5f21c1b7cd6cd1997018b1c0cfaee39";
|
(node as any).hash = "34931b0c662961228537121bf18bab4e";
|
||||||
|
|
||||||
export default node;
|
export default node;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* @generated SignedSource<<1fce2cc80e82f95488675ab257cb1087>>
|
* @generated SignedSource<<a2f706d85c38022af0a3eb5e61409e7e>>
|
||||||
* @lightSyntaxTransform
|
* @lightSyntaxTransform
|
||||||
* @nogrep
|
* @nogrep
|
||||||
*/
|
*/
|
||||||
@@ -16,7 +16,16 @@ export type RiskGraphNodeQuery$variables = {
|
|||||||
};
|
};
|
||||||
export type RiskGraphNodeQuery$data = {
|
export type RiskGraphNodeQuery$data = {
|
||||||
readonly node: {
|
readonly node: {
|
||||||
|
readonly controlsInfo?: {
|
||||||
|
readonly totalCount: number;
|
||||||
|
};
|
||||||
readonly description?: string;
|
readonly description?: string;
|
||||||
|
readonly documentsInfo?: {
|
||||||
|
readonly totalCount: number;
|
||||||
|
};
|
||||||
|
readonly measuresInfo?: {
|
||||||
|
readonly totalCount: number;
|
||||||
|
};
|
||||||
readonly name?: string;
|
readonly name?: string;
|
||||||
readonly note?: string;
|
readonly note?: string;
|
||||||
readonly owner?: {
|
readonly owner?: {
|
||||||
@@ -24,7 +33,7 @@ export type RiskGraphNodeQuery$data = {
|
|||||||
readonly id: string;
|
readonly id: string;
|
||||||
} | null | undefined;
|
} | null | undefined;
|
||||||
readonly treatment?: RiskTreatment;
|
readonly treatment?: RiskTreatment;
|
||||||
readonly " $fragmentSpreads": FragmentRefs<"RiskDocumentsTabFragment" | "RiskMeasuresTabFragment" | "RiskOverviewTabFragment" | "useRiskFormFragment">;
|
readonly " $fragmentSpreads": FragmentRefs<"RiskControlsTabFragment" | "RiskDocumentsTabFragment" | "RiskMeasuresTabFragment" | "RiskOverviewTabFragment" | "useRiskFormFragment">;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
export type RiskGraphNodeQuery = {
|
export type RiskGraphNodeQuery = {
|
||||||
@@ -101,28 +110,88 @@ v7 = {
|
|||||||
"name": "note",
|
"name": "note",
|
||||||
"storageKey": null
|
"storageKey": null
|
||||||
},
|
},
|
||||||
v8 = {
|
v8 = [
|
||||||
|
{
|
||||||
|
"kind": "Literal",
|
||||||
|
"name": "first",
|
||||||
|
"value": 0
|
||||||
|
}
|
||||||
|
],
|
||||||
|
v9 = [
|
||||||
|
{
|
||||||
|
"alias": null,
|
||||||
|
"args": null,
|
||||||
|
"kind": "ScalarField",
|
||||||
|
"name": "totalCount",
|
||||||
|
"storageKey": null
|
||||||
|
}
|
||||||
|
],
|
||||||
|
v10 = {
|
||||||
|
"alias": "measuresInfo",
|
||||||
|
"args": (v8/*: any*/),
|
||||||
|
"concreteType": "MeasureConnection",
|
||||||
|
"kind": "LinkedField",
|
||||||
|
"name": "measures",
|
||||||
|
"plural": false,
|
||||||
|
"selections": (v9/*: any*/),
|
||||||
|
"storageKey": "measures(first:0)"
|
||||||
|
},
|
||||||
|
v11 = {
|
||||||
|
"alias": "documentsInfo",
|
||||||
|
"args": (v8/*: any*/),
|
||||||
|
"concreteType": "DocumentConnection",
|
||||||
|
"kind": "LinkedField",
|
||||||
|
"name": "documents",
|
||||||
|
"plural": false,
|
||||||
|
"selections": (v9/*: any*/),
|
||||||
|
"storageKey": "documents(first:0)"
|
||||||
|
},
|
||||||
|
v12 = {
|
||||||
|
"alias": "controlsInfo",
|
||||||
|
"args": (v8/*: any*/),
|
||||||
|
"concreteType": "ControlConnection",
|
||||||
|
"kind": "LinkedField",
|
||||||
|
"name": "controls",
|
||||||
|
"plural": false,
|
||||||
|
"selections": (v9/*: any*/),
|
||||||
|
"storageKey": "controls(first:0)"
|
||||||
|
},
|
||||||
|
v13 = {
|
||||||
"alias": null,
|
"alias": null,
|
||||||
"args": null,
|
"args": null,
|
||||||
"kind": "ScalarField",
|
"kind": "ScalarField",
|
||||||
"name": "__typename",
|
"name": "__typename",
|
||||||
"storageKey": null
|
"storageKey": null
|
||||||
},
|
},
|
||||||
v9 = [
|
v14 = [
|
||||||
{
|
{
|
||||||
"kind": "Literal",
|
"kind": "Literal",
|
||||||
"name": "first",
|
"name": "first",
|
||||||
"value": 100
|
"value": 100
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
v10 = {
|
v15 = {
|
||||||
"alias": null,
|
"alias": null,
|
||||||
"args": null,
|
"args": null,
|
||||||
"kind": "ScalarField",
|
"kind": "ScalarField",
|
||||||
"name": "cursor",
|
"name": "cursor",
|
||||||
"storageKey": null
|
"storageKey": null
|
||||||
},
|
},
|
||||||
v11 = {
|
v16 = {
|
||||||
|
"alias": null,
|
||||||
|
"args": null,
|
||||||
|
"kind": "ScalarField",
|
||||||
|
"name": "endCursor",
|
||||||
|
"storageKey": null
|
||||||
|
},
|
||||||
|
v17 = {
|
||||||
|
"alias": null,
|
||||||
|
"args": null,
|
||||||
|
"kind": "ScalarField",
|
||||||
|
"name": "hasNextPage",
|
||||||
|
"storageKey": null
|
||||||
|
},
|
||||||
|
v18 = {
|
||||||
"alias": null,
|
"alias": null,
|
||||||
"args": null,
|
"args": null,
|
||||||
"concreteType": "PageInfo",
|
"concreteType": "PageInfo",
|
||||||
@@ -130,24 +199,12 @@ v11 = {
|
|||||||
"name": "pageInfo",
|
"name": "pageInfo",
|
||||||
"plural": false,
|
"plural": false,
|
||||||
"selections": [
|
"selections": [
|
||||||
{
|
(v16/*: any*/),
|
||||||
"alias": null,
|
(v17/*: any*/)
|
||||||
"args": null,
|
|
||||||
"kind": "ScalarField",
|
|
||||||
"name": "endCursor",
|
|
||||||
"storageKey": null
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"alias": null,
|
|
||||||
"args": null,
|
|
||||||
"kind": "ScalarField",
|
|
||||||
"name": "hasNextPage",
|
|
||||||
"storageKey": null
|
|
||||||
}
|
|
||||||
],
|
],
|
||||||
"storageKey": null
|
"storageKey": null
|
||||||
},
|
},
|
||||||
v12 = {
|
v19 = {
|
||||||
"kind": "ClientExtension",
|
"kind": "ClientExtension",
|
||||||
"selections": [
|
"selections": [
|
||||||
{
|
{
|
||||||
@@ -158,7 +215,14 @@ v12 = {
|
|||||||
"storageKey": null
|
"storageKey": null
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
};
|
},
|
||||||
|
v20 = [
|
||||||
|
{
|
||||||
|
"kind": "Literal",
|
||||||
|
"name": "first",
|
||||||
|
"value": 20
|
||||||
|
}
|
||||||
|
];
|
||||||
return {
|
return {
|
||||||
"fragment": {
|
"fragment": {
|
||||||
"argumentDefinitions": (v0/*: any*/),
|
"argumentDefinitions": (v0/*: any*/),
|
||||||
@@ -182,6 +246,9 @@ return {
|
|||||||
(v4/*: any*/),
|
(v4/*: any*/),
|
||||||
(v6/*: any*/),
|
(v6/*: any*/),
|
||||||
(v7/*: any*/),
|
(v7/*: any*/),
|
||||||
|
(v10/*: any*/),
|
||||||
|
(v11/*: any*/),
|
||||||
|
(v12/*: any*/),
|
||||||
{
|
{
|
||||||
"args": null,
|
"args": null,
|
||||||
"kind": "FragmentSpread",
|
"kind": "FragmentSpread",
|
||||||
@@ -201,6 +268,11 @@ return {
|
|||||||
"args": null,
|
"args": null,
|
||||||
"kind": "FragmentSpread",
|
"kind": "FragmentSpread",
|
||||||
"name": "RiskDocumentsTabFragment"
|
"name": "RiskDocumentsTabFragment"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"args": null,
|
||||||
|
"kind": "FragmentSpread",
|
||||||
|
"name": "RiskControlsTabFragment"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"type": "Risk",
|
"type": "Risk",
|
||||||
@@ -227,7 +299,7 @@ return {
|
|||||||
"name": "node",
|
"name": "node",
|
||||||
"plural": false,
|
"plural": false,
|
||||||
"selections": [
|
"selections": [
|
||||||
(v8/*: any*/),
|
(v13/*: any*/),
|
||||||
(v5/*: any*/),
|
(v5/*: any*/),
|
||||||
{
|
{
|
||||||
"kind": "InlineFragment",
|
"kind": "InlineFragment",
|
||||||
@@ -237,6 +309,9 @@ return {
|
|||||||
(v4/*: any*/),
|
(v4/*: any*/),
|
||||||
(v6/*: any*/),
|
(v6/*: any*/),
|
||||||
(v7/*: any*/),
|
(v7/*: any*/),
|
||||||
|
(v10/*: any*/),
|
||||||
|
(v11/*: any*/),
|
||||||
|
(v12/*: any*/),
|
||||||
{
|
{
|
||||||
"alias": null,
|
"alias": null,
|
||||||
"args": null,
|
"args": null,
|
||||||
@@ -288,7 +363,7 @@ return {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"alias": null,
|
"alias": null,
|
||||||
"args": (v9/*: any*/),
|
"args": (v14/*: any*/),
|
||||||
"concreteType": "MeasureConnection",
|
"concreteType": "MeasureConnection",
|
||||||
"kind": "LinkedField",
|
"kind": "LinkedField",
|
||||||
"name": "measures",
|
"name": "measures",
|
||||||
@@ -319,22 +394,22 @@ return {
|
|||||||
"name": "state",
|
"name": "state",
|
||||||
"storageKey": null
|
"storageKey": null
|
||||||
},
|
},
|
||||||
(v8/*: any*/)
|
(v13/*: any*/)
|
||||||
],
|
],
|
||||||
"storageKey": null
|
"storageKey": null
|
||||||
},
|
},
|
||||||
(v10/*: any*/)
|
(v15/*: any*/)
|
||||||
],
|
],
|
||||||
"storageKey": null
|
"storageKey": null
|
||||||
},
|
},
|
||||||
(v11/*: any*/),
|
(v18/*: any*/),
|
||||||
(v12/*: any*/)
|
(v19/*: any*/)
|
||||||
],
|
],
|
||||||
"storageKey": "measures(first:100)"
|
"storageKey": "measures(first:100)"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"alias": null,
|
"alias": null,
|
||||||
"args": (v9/*: any*/),
|
"args": (v14/*: any*/),
|
||||||
"filters": null,
|
"filters": null,
|
||||||
"handle": "connection",
|
"handle": "connection",
|
||||||
"key": "Risk__measures",
|
"key": "Risk__measures",
|
||||||
@@ -343,7 +418,7 @@ return {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"alias": null,
|
"alias": null,
|
||||||
"args": (v9/*: any*/),
|
"args": (v14/*: any*/),
|
||||||
"concreteType": "DocumentConnection",
|
"concreteType": "DocumentConnection",
|
||||||
"kind": "LinkedField",
|
"kind": "LinkedField",
|
||||||
"name": "documents",
|
"name": "documents",
|
||||||
@@ -434,27 +509,123 @@ return {
|
|||||||
],
|
],
|
||||||
"storageKey": "versions(first:1)"
|
"storageKey": "versions(first:1)"
|
||||||
},
|
},
|
||||||
(v8/*: any*/)
|
(v13/*: any*/)
|
||||||
],
|
],
|
||||||
"storageKey": null
|
"storageKey": null
|
||||||
},
|
},
|
||||||
(v10/*: any*/)
|
(v15/*: any*/)
|
||||||
],
|
],
|
||||||
"storageKey": null
|
"storageKey": null
|
||||||
},
|
},
|
||||||
(v11/*: any*/),
|
(v18/*: any*/),
|
||||||
(v12/*: any*/)
|
(v19/*: any*/)
|
||||||
],
|
],
|
||||||
"storageKey": "documents(first:100)"
|
"storageKey": "documents(first:100)"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"alias": null,
|
"alias": null,
|
||||||
"args": (v9/*: any*/),
|
"args": (v14/*: any*/),
|
||||||
"filters": null,
|
"filters": null,
|
||||||
"handle": "connection",
|
"handle": "connection",
|
||||||
"key": "Risk__documents",
|
"key": "Risk__documents",
|
||||||
"kind": "LinkedHandle",
|
"kind": "LinkedHandle",
|
||||||
"name": "documents"
|
"name": "documents"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"alias": null,
|
||||||
|
"args": (v20/*: any*/),
|
||||||
|
"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": [
|
||||||
|
(v5/*: any*/),
|
||||||
|
{
|
||||||
|
"alias": null,
|
||||||
|
"args": null,
|
||||||
|
"kind": "ScalarField",
|
||||||
|
"name": "sectionTitle",
|
||||||
|
"storageKey": null
|
||||||
|
},
|
||||||
|
(v2/*: any*/),
|
||||||
|
{
|
||||||
|
"alias": null,
|
||||||
|
"args": null,
|
||||||
|
"concreteType": "Framework",
|
||||||
|
"kind": "LinkedField",
|
||||||
|
"name": "framework",
|
||||||
|
"plural": false,
|
||||||
|
"selections": [
|
||||||
|
(v5/*: any*/),
|
||||||
|
(v2/*: any*/)
|
||||||
|
],
|
||||||
|
"storageKey": null
|
||||||
|
},
|
||||||
|
(v13/*: any*/)
|
||||||
|
],
|
||||||
|
"storageKey": null
|
||||||
|
},
|
||||||
|
(v15/*: any*/)
|
||||||
|
],
|
||||||
|
"storageKey": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"alias": null,
|
||||||
|
"args": null,
|
||||||
|
"concreteType": "PageInfo",
|
||||||
|
"kind": "LinkedField",
|
||||||
|
"name": "pageInfo",
|
||||||
|
"plural": false,
|
||||||
|
"selections": [
|
||||||
|
(v16/*: any*/),
|
||||||
|
(v17/*: any*/),
|
||||||
|
{
|
||||||
|
"alias": null,
|
||||||
|
"args": null,
|
||||||
|
"kind": "ScalarField",
|
||||||
|
"name": "hasPreviousPage",
|
||||||
|
"storageKey": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"alias": null,
|
||||||
|
"args": null,
|
||||||
|
"kind": "ScalarField",
|
||||||
|
"name": "startCursor",
|
||||||
|
"storageKey": null
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"storageKey": null
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"storageKey": "controls(first:20)"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"alias": null,
|
||||||
|
"args": (v20/*: any*/),
|
||||||
|
"filters": [
|
||||||
|
"orderBy",
|
||||||
|
"filter"
|
||||||
|
],
|
||||||
|
"handle": "connection",
|
||||||
|
"key": "RiskControlsTab_controls",
|
||||||
|
"kind": "LinkedHandle",
|
||||||
|
"name": "controls"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"type": "Risk",
|
"type": "Risk",
|
||||||
@@ -466,16 +637,16 @@ return {
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"params": {
|
"params": {
|
||||||
"cacheID": "bb52cb7161bdf1bbba40f782f5ff22c2",
|
"cacheID": "6cfdb65a1c2cced451e5fa888cb4fc6d",
|
||||||
"id": null,
|
"id": null,
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"name": "RiskGraphNodeQuery",
|
"name": "RiskGraphNodeQuery",
|
||||||
"operationKind": "query",
|
"operationKind": "query",
|
||||||
"text": "query RiskGraphNodeQuery(\n $riskId: ID!\n) {\n node(id: $riskId) {\n __typename\n ... on Risk {\n name\n description\n treatment\n owner {\n id\n fullName\n }\n note\n ...useRiskFormFragment\n ...RiskOverviewTabFragment\n ...RiskMeasuresTabFragment\n ...RiskDocumentsTabFragment\n }\n id\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 RiskDocumentsTabFragment on Risk {\n id\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}\n\nfragment RiskMeasuresTabFragment on Risk {\n id\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}\n\nfragment RiskOverviewTabFragment on Risk {\n inherentLikelihood\n inherentImpact\n residualLikelihood\n residualImpact\n inherentRiskScore\n residualRiskScore\n}\n\nfragment useRiskFormFragment on Risk {\n id\n name\n category\n description\n treatment\n inherentLikelihood\n inherentImpact\n residualLikelihood\n residualImpact\n note\n owner {\n id\n }\n}\n"
|
"text": "query RiskGraphNodeQuery(\n $riskId: ID!\n) {\n node(id: $riskId) {\n __typename\n ... on Risk {\n name\n description\n treatment\n owner {\n id\n fullName\n }\n note\n measuresInfo: measures(first: 0) {\n totalCount\n }\n documentsInfo: documents(first: 0) {\n totalCount\n }\n controlsInfo: controls(first: 0) {\n totalCount\n }\n ...useRiskFormFragment\n ...RiskOverviewTabFragment\n ...RiskMeasuresTabFragment\n ...RiskDocumentsTabFragment\n ...RiskControlsTabFragment\n }\n id\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 RiskControlsTabFragment on Risk {\n id\n controls(first: 20) {\n edges {\n node {\n id\n sectionTitle\n name\n framework {\n id\n name\n }\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n hasPreviousPage\n startCursor\n }\n }\n}\n\nfragment RiskDocumentsTabFragment on Risk {\n id\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}\n\nfragment RiskMeasuresTabFragment on Risk {\n id\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}\n\nfragment RiskOverviewTabFragment on Risk {\n inherentLikelihood\n inherentImpact\n residualLikelihood\n residualImpact\n inherentRiskScore\n residualRiskScore\n}\n\nfragment useRiskFormFragment on Risk {\n id\n name\n category\n description\n treatment\n inherentLikelihood\n inherentImpact\n residualLikelihood\n residualImpact\n note\n owner {\n id\n }\n}\n"
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
})();
|
})();
|
||||||
|
|
||||||
(node as any).hash = "fad84c61c3943be5d63e810325aa8f62";
|
(node as any).hash = "fdb501cd1a50f825e325ed673e2ed311";
|
||||||
|
|
||||||
export default node;
|
export default node;
|
||||||
|
|||||||
@@ -43,8 +43,6 @@ import UpdateVersionDialog from "./dialogs/UpdateVersionDialog";
|
|||||||
import { useRef } from "react";
|
import { useRef } from "react";
|
||||||
import { DocumentVersionHistoryDialog } from "./dialogs/DocumentVersionHistoryDialog";
|
import { DocumentVersionHistoryDialog } from "./dialogs/DocumentVersionHistoryDialog";
|
||||||
import { DocumentSignaturesDialog } from "./dialogs/DocumentSignaturesDialog";
|
import { DocumentSignaturesDialog } from "./dialogs/DocumentSignaturesDialog";
|
||||||
import { controlsFragment } from "./tabs/DocumentControlsTab";
|
|
||||||
import type { DocumentControlsTabFragment$key } from "./tabs/__generated__/DocumentControlsTabFragment.graphql";
|
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
queryRef: PreloadedQuery<DocumentGraphNodeQuery>;
|
queryRef: PreloadedQuery<DocumentGraphNodeQuery>;
|
||||||
@@ -59,6 +57,9 @@ const documentFragment = graphql`
|
|||||||
fullName
|
fullName
|
||||||
}
|
}
|
||||||
...DocumentControlsTabFragment
|
...DocumentControlsTabFragment
|
||||||
|
controlsInfo: controls(first: 0) {
|
||||||
|
totalCount
|
||||||
|
}
|
||||||
versions(first: 20) @connection(key: "DocumentDetailPage_versions") {
|
versions(first: 20) @connection(key: "DocumentDetailPage_versions") {
|
||||||
__id
|
__id
|
||||||
edges {
|
edges {
|
||||||
@@ -176,10 +177,7 @@ export default function DocumentDetailPage(props: Props) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const updateDialogRef = useRef<{ open: () => void }>(null);
|
const updateDialogRef = useRef<{ open: () => void }>(null);
|
||||||
const controls = useFragment(
|
const controlsCount = document.controlsInfo.totalCount;
|
||||||
controlsFragment,
|
|
||||||
document as DocumentControlsTabFragment$key
|
|
||||||
).controls;
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
@@ -252,7 +250,7 @@ export default function DocumentDetailPage(props: Props) {
|
|||||||
to={`/organizations/${organizationId}/documents/${document.id}/controls`}
|
to={`/organizations/${organizationId}/documents/${document.id}/controls`}
|
||||||
>
|
>
|
||||||
{__("Controls")}
|
{__("Controls")}
|
||||||
<TabBadge>{controls.edges.length}</TabBadge>
|
<TabBadge>{controlsCount}</TabBadge>
|
||||||
</TabLink>
|
</TabLink>
|
||||||
</Tabs>
|
</Tabs>
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* @generated SignedSource<<6c0262b14b79c61016ad404fab7a1da0>>
|
* @generated SignedSource<<de19bed523a0a3e24807f5e7ecfef466>>
|
||||||
* @lightSyntaxTransform
|
* @lightSyntaxTransform
|
||||||
* @nogrep
|
* @nogrep
|
||||||
*/
|
*/
|
||||||
@@ -13,6 +13,9 @@ export type DocumentStatus = "DRAFT" | "PUBLISHED";
|
|||||||
export type DocumentVersionSignatureState = "REQUESTED" | "SIGNED";
|
export type DocumentVersionSignatureState = "REQUESTED" | "SIGNED";
|
||||||
import { FragmentRefs } from "relay-runtime";
|
import { FragmentRefs } from "relay-runtime";
|
||||||
export type DocumentDetailPageDocumentFragment$data = {
|
export type DocumentDetailPageDocumentFragment$data = {
|
||||||
|
readonly controlsInfo: {
|
||||||
|
readonly totalCount: number;
|
||||||
|
};
|
||||||
readonly id: string;
|
readonly id: string;
|
||||||
readonly owner: {
|
readonly owner: {
|
||||||
readonly fullName: string;
|
readonly fullName: string;
|
||||||
@@ -168,6 +171,30 @@ return {
|
|||||||
"kind": "FragmentSpread",
|
"kind": "FragmentSpread",
|
||||||
"name": "DocumentControlsTabFragment"
|
"name": "DocumentControlsTabFragment"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"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": "versions",
|
"alias": "versions",
|
||||||
"args": null,
|
"args": null,
|
||||||
@@ -319,6 +346,6 @@ return {
|
|||||||
};
|
};
|
||||||
})();
|
})();
|
||||||
|
|
||||||
(node as any).hash = "02b0af2263f78304097136c2466be18c";
|
(node as any).hash = "ffd58750acd50c91d62a674ba158836c";
|
||||||
|
|
||||||
export default node;
|
export default node;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { Outlet, useParams } from "react-router";
|
import { Outlet, useNavigate, useParams } from "react-router";
|
||||||
import { useOrganizationId } from "/hooks/useOrganizationId";
|
import { useOrganizationId } from "/hooks/useOrganizationId";
|
||||||
import {
|
import {
|
||||||
ActionDropdown,
|
ActionDropdown,
|
||||||
@@ -14,6 +14,7 @@ import {
|
|||||||
IconWarning,
|
IconWarning,
|
||||||
MeasureBadge,
|
MeasureBadge,
|
||||||
Option,
|
Option,
|
||||||
|
PageHeader,
|
||||||
PropertyRow,
|
PropertyRow,
|
||||||
Select,
|
Select,
|
||||||
TabBadge,
|
TabBadge,
|
||||||
@@ -24,9 +25,8 @@ import {
|
|||||||
import { useTranslate } from "@probo/i18n";
|
import { useTranslate } from "@probo/i18n";
|
||||||
import {
|
import {
|
||||||
ConnectionHandler,
|
ConnectionHandler,
|
||||||
useFragment,
|
|
||||||
usePreloadedQuery,
|
|
||||||
type PreloadedQuery,
|
type PreloadedQuery,
|
||||||
|
usePreloadedQuery,
|
||||||
} from "react-relay";
|
} from "react-relay";
|
||||||
import type { MeasureGraphNodeQuery } from "/hooks/graph/__generated__/MeasureGraphNodeQuery.graphql";
|
import type { MeasureGraphNodeQuery } from "/hooks/graph/__generated__/MeasureGraphNodeQuery.graphql";
|
||||||
import {
|
import {
|
||||||
@@ -35,19 +35,13 @@ import {
|
|||||||
useDeleteMeasureMutation,
|
useDeleteMeasureMutation,
|
||||||
useUpdateMeasure,
|
useUpdateMeasure,
|
||||||
} from "/hooks/graph/MeasureGraph";
|
} from "/hooks/graph/MeasureGraph";
|
||||||
import { PageHeader } from "@probo/ui";
|
import {
|
||||||
import { getMeasureStateLabel, measureStates, slugify } from "@probo/helpers";
|
getMeasureStateLabel,
|
||||||
|
measureStates,
|
||||||
|
slugify,
|
||||||
|
sprintf,
|
||||||
|
} from "@probo/helpers";
|
||||||
import MeasureFormDialog from "./dialog/MeasureFormDialog";
|
import MeasureFormDialog from "./dialog/MeasureFormDialog";
|
||||||
import { sprintf } from "@probo/helpers";
|
|
||||||
import { useNavigate } from "react-router";
|
|
||||||
import { tasksFragment } from "./tabs/MeasureTasksTab";
|
|
||||||
import type { MeasureTasksTabFragment$key } from "./tabs/__generated__/MeasureTasksTabFragment.graphql";
|
|
||||||
import { evidencesFragment } from "./tabs/MeasureEvidencesTab";
|
|
||||||
import type { MeasureEvidencesTabFragment$key } from "./tabs/__generated__/MeasureEvidencesTabFragment.graphql";
|
|
||||||
import { controlsFragment } from "./tabs/MeasureControlsTab";
|
|
||||||
import type { MeasureControlsTabFragment$key } from "./tabs/__generated__/MeasureControlsTabFragment.graphql";
|
|
||||||
import { risksFragment } from "./tabs/MeasureRisksTab";
|
|
||||||
import type { MeasureRisksTabFragment$key } from "./tabs/__generated__/MeasureRisksTabFragment.graphql";
|
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
queryRef: PreloadedQuery<MeasureGraphNodeQuery>;
|
queryRef: PreloadedQuery<MeasureGraphNodeQuery>;
|
||||||
@@ -66,31 +60,19 @@ export default function MeasureDetailPage(props: Props) {
|
|||||||
|
|
||||||
if (!measureId) {
|
if (!measureId) {
|
||||||
throw new Error(
|
throw new Error(
|
||||||
"Cannot load measure detail page without measureId parameter"
|
"Cannot load measure detail page without measureId parameter",
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
const tasksCount = useFragment(
|
const tasksCount = measure.tasksInfos?.totalCount ?? 0;
|
||||||
tasksFragment,
|
const evidencesCount = measure.evidencesInfos?.totalCount ?? 0;
|
||||||
measure as MeasureTasksTabFragment$key
|
const controlsCount = measure.controlsInfos?.totalCount ?? 0;
|
||||||
).tasks.edges.length;
|
const risksCount = measure.risksInfos?.totalCount ?? 0;
|
||||||
const evidencesCount = useFragment(
|
|
||||||
evidencesFragment,
|
|
||||||
measure as MeasureEvidencesTabFragment$key
|
|
||||||
).evidences.edges.length;
|
|
||||||
const controlsCount = useFragment(
|
|
||||||
controlsFragment,
|
|
||||||
measure as MeasureControlsTabFragment$key
|
|
||||||
).controls.edges.length;
|
|
||||||
const risksCount = useFragment(
|
|
||||||
risksFragment,
|
|
||||||
measure as MeasureRisksTabFragment$key
|
|
||||||
).risks.edges.length;
|
|
||||||
|
|
||||||
const onDelete = () => {
|
const onDelete = () => {
|
||||||
const connectionId = ConnectionHandler.getConnectionID(
|
const connectionId = ConnectionHandler.getConnectionID(
|
||||||
organizationId,
|
organizationId,
|
||||||
MeasureConnectionKey
|
MeasureConnectionKey,
|
||||||
);
|
);
|
||||||
confirm(
|
confirm(
|
||||||
() =>
|
() =>
|
||||||
@@ -109,11 +91,11 @@ export default function MeasureDetailPage(props: Props) {
|
|||||||
{
|
{
|
||||||
message: sprintf(
|
message: sprintf(
|
||||||
__(
|
__(
|
||||||
'This will permanently delete the measure "%s". This action cannot be undone.'
|
'This will permanently delete the measure "%s". This action cannot be undone.',
|
||||||
),
|
),
|
||||||
measure.name
|
measure.name,
|
||||||
),
|
),
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -184,28 +166,28 @@ export default function MeasureDetailPage(props: Props) {
|
|||||||
>
|
>
|
||||||
<IconPageTextLine size={20} />
|
<IconPageTextLine size={20} />
|
||||||
{__("Evidences")}
|
{__("Evidences")}
|
||||||
{evidencesCount > 0 && <TabBadge>{evidencesCount}</TabBadge>}
|
<TabBadge>{evidencesCount}</TabBadge>
|
||||||
</TabLink>
|
</TabLink>
|
||||||
<TabLink
|
<TabLink
|
||||||
to={`/organizations/${organizationId}/measures/${measureId}/tasks`}
|
to={`/organizations/${organizationId}/measures/${measureId}/tasks`}
|
||||||
>
|
>
|
||||||
<IconCheckmark1 size={20} />
|
<IconCheckmark1 size={20} />
|
||||||
{__("Tasks")}
|
{__("Tasks")}
|
||||||
{tasksCount > 0 && <TabBadge>{tasksCount}</TabBadge>}
|
<TabBadge>{tasksCount}</TabBadge>
|
||||||
</TabLink>
|
</TabLink>
|
||||||
<TabLink
|
<TabLink
|
||||||
to={`/organizations/${organizationId}/measures/${measureId}/controls`}
|
to={`/organizations/${organizationId}/measures/${measureId}/controls`}
|
||||||
>
|
>
|
||||||
<IconFrame2 size={20} />
|
<IconFrame2 size={20} />
|
||||||
{__("Controls")}
|
{__("Controls")}
|
||||||
{controlsCount > 0 && <TabBadge>{controlsCount}</TabBadge>}
|
<TabBadge>{controlsCount}</TabBadge>
|
||||||
</TabLink>
|
</TabLink>
|
||||||
<TabLink
|
<TabLink
|
||||||
to={`/organizations/${organizationId}/measures/${measureId}/risks`}
|
to={`/organizations/${organizationId}/measures/${measureId}/risks`}
|
||||||
>
|
>
|
||||||
<IconWarning size={20} />
|
<IconWarning size={20} />
|
||||||
{__("Risks")}
|
{__("Risks")}
|
||||||
{risksCount > 0 && <TabBadge>{risksCount}</TabBadge>}
|
<TabBadge>{risksCount}</TabBadge>
|
||||||
</TabLink>
|
</TabLink>
|
||||||
</Tabs>
|
</Tabs>
|
||||||
|
|
||||||
|
|||||||
@@ -19,11 +19,7 @@ import { Outlet, useNavigate, useParams } from "react-router";
|
|||||||
import { useTranslate } from "@probo/i18n";
|
import { useTranslate } from "@probo/i18n";
|
||||||
import { getTreatment, sprintf } from "@probo/helpers";
|
import { getTreatment, sprintf } from "@probo/helpers";
|
||||||
import { ConnectionHandler } from "relay-runtime";
|
import { ConnectionHandler } from "relay-runtime";
|
||||||
import {
|
import { usePreloadedQuery, type PreloadedQuery } from "react-relay";
|
||||||
useFragment,
|
|
||||||
usePreloadedQuery,
|
|
||||||
type PreloadedQuery,
|
|
||||||
} from "react-relay";
|
|
||||||
import FormRiskDialog from "./FormRiskDialog";
|
import FormRiskDialog from "./FormRiskDialog";
|
||||||
import { usePageTitle } from "@probo/hooks";
|
import { usePageTitle } from "@probo/hooks";
|
||||||
import { useOrganizationId } from "/hooks/useOrganizationId";
|
import { useOrganizationId } from "/hooks/useOrganizationId";
|
||||||
@@ -33,10 +29,6 @@ import {
|
|||||||
useDeleteRiskMutation,
|
useDeleteRiskMutation,
|
||||||
} from "/hooks/graph/RiskGraph";
|
} from "/hooks/graph/RiskGraph";
|
||||||
import type { RiskGraphNodeQuery } from "/hooks/graph/__generated__/RiskGraphNodeQuery.graphql";
|
import type { RiskGraphNodeQuery } from "/hooks/graph/__generated__/RiskGraphNodeQuery.graphql";
|
||||||
import { documentsFragment } from "./tabs/RiskDocumentsTab";
|
|
||||||
import type { RiskDocumentsTabFragment$key } from "./tabs/__generated__/RiskDocumentsTabFragment.graphql";
|
|
||||||
import { measuresFragment } from "./tabs/RiskMeasuresTab";
|
|
||||||
import type { RiskMeasuresTabFragment$key } from "./tabs/__generated__/RiskMeasuresTabFragment.graphql";
|
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
queryRef: PreloadedQuery<RiskGraphNodeQuery>;
|
queryRef: PreloadedQuery<RiskGraphNodeQuery>;
|
||||||
@@ -89,14 +81,9 @@ export default function RiskDetailPage(props: Props) {
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
const documentsCount = useFragment(
|
const documentsCount = risk.documentsInfo?.totalCount ?? 0;
|
||||||
documentsFragment,
|
const measuresCount = risk.measuresInfo?.totalCount ?? 0;
|
||||||
risk as RiskDocumentsTabFragment$key
|
const controlsCount = risk.controlsInfo?.totalCount ?? 0;
|
||||||
).documents.edges.length;
|
|
||||||
const measuresCount = useFragment(
|
|
||||||
measuresFragment,
|
|
||||||
risk as RiskMeasuresTabFragment$key
|
|
||||||
).measures.edges.length;
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="space-y-6">
|
<div className="space-y-6">
|
||||||
@@ -146,13 +133,19 @@ export default function RiskDetailPage(props: Props) {
|
|||||||
to={`/organizations/${organizationId}/risks/${riskId}/measures`}
|
to={`/organizations/${organizationId}/risks/${riskId}/measures`}
|
||||||
>
|
>
|
||||||
{__("Measures")}
|
{__("Measures")}
|
||||||
{measuresCount > 0 && <TabBadge>{measuresCount}</TabBadge>}
|
<TabBadge>{measuresCount}</TabBadge>
|
||||||
</TabLink>
|
</TabLink>
|
||||||
<TabLink
|
<TabLink
|
||||||
to={`/organizations/${organizationId}/risks/${riskId}/documents`}
|
to={`/organizations/${organizationId}/risks/${riskId}/documents`}
|
||||||
>
|
>
|
||||||
{__("Documents")}
|
{__("Documents")}
|
||||||
{documentsCount > 0 && <TabBadge>{documentsCount}</TabBadge>}
|
<TabBadge>{documentsCount}</TabBadge>
|
||||||
|
</TabLink>
|
||||||
|
<TabLink
|
||||||
|
to={`/organizations/${organizationId}/risks/${riskId}/controls`}
|
||||||
|
>
|
||||||
|
{__("Controls")}
|
||||||
|
<TabBadge>{controlsCount}</TabBadge>
|
||||||
</TabLink>
|
</TabLink>
|
||||||
</Tabs>
|
</Tabs>
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,85 @@
|
|||||||
|
import { graphql, useRefetchableFragment } from "react-relay";
|
||||||
|
import { useOutletContext } from "react-router";
|
||||||
|
import { Badge, Tbody, Td, Th, Thead, Tr } from "@probo/ui";
|
||||||
|
import { useTranslate } from "@probo/i18n";
|
||||||
|
import { useOrganizationId } from "/hooks/useOrganizationId";
|
||||||
|
import type { RiskControlsTabFragment$key } from "./__generated__/RiskControlsTabFragment.graphql";
|
||||||
|
import { SortableTable, SortableTh } from "/components/SortableTable";
|
||||||
|
|
||||||
|
export const controlsFragment = graphql`
|
||||||
|
fragment RiskControlsTabFragment on Risk
|
||||||
|
@argumentDefinitions(
|
||||||
|
first: { type: "Int", defaultValue: 20 }
|
||||||
|
after: { type: "CursorKey" }
|
||||||
|
last: { type: "Int", defaultValue: null }
|
||||||
|
before: { type: "CursorKey", defaultValue: null }
|
||||||
|
order: { type: "ControlOrder", defaultValue: null }
|
||||||
|
filter: { type: "ControlFilter", defaultValue: null }
|
||||||
|
)
|
||||||
|
@refetchable(queryName: "RiskControlsTabControlsQuery") {
|
||||||
|
id
|
||||||
|
controls(
|
||||||
|
first: $first
|
||||||
|
after: $after
|
||||||
|
last: $last
|
||||||
|
before: $before
|
||||||
|
orderBy: $order
|
||||||
|
filter: $filter
|
||||||
|
) @connection(key: "RiskControlsTab_controls") {
|
||||||
|
edges {
|
||||||
|
node {
|
||||||
|
id
|
||||||
|
sectionTitle
|
||||||
|
name
|
||||||
|
framework {
|
||||||
|
id
|
||||||
|
name
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
`;
|
||||||
|
export default function RiskControlsTab() {
|
||||||
|
const { risk } = useOutletContext<{
|
||||||
|
risk: RiskControlsTabFragment$key & { id: string };
|
||||||
|
}>();
|
||||||
|
const { __ } = useTranslate();
|
||||||
|
const [data, refetch] = useRefetchableFragment(controlsFragment, risk);
|
||||||
|
const controls = data.controls.edges.map((edge) => edge.node);
|
||||||
|
const organizationId = useOrganizationId();
|
||||||
|
|
||||||
|
return (
|
||||||
|
<SortableTable refetch={refetch}>
|
||||||
|
<Thead>
|
||||||
|
<Tr>
|
||||||
|
<SortableTh field="SECTION_TITLE">{__("Reference")}</SortableTh>
|
||||||
|
<Th>{__("Name")}</Th>
|
||||||
|
</Tr>
|
||||||
|
</Thead>
|
||||||
|
<Tbody>
|
||||||
|
{controls.length === 0 && (
|
||||||
|
<Tr>
|
||||||
|
<Td colSpan={2} className="text-center text-txt-secondary">
|
||||||
|
{__("No controls linked")}
|
||||||
|
</Td>
|
||||||
|
</Tr>
|
||||||
|
)}
|
||||||
|
{controls.map((control) => (
|
||||||
|
<Tr
|
||||||
|
key={control.id}
|
||||||
|
to={`/organizations/${organizationId}/frameworks/${control.framework.id}/controls/${control.id}`}
|
||||||
|
>
|
||||||
|
<Td>
|
||||||
|
<span className="inline-flex gap-2 items-center">
|
||||||
|
{control.framework.name}{" "}
|
||||||
|
<Badge size="md">{control.sectionTitle}</Badge>
|
||||||
|
</span>
|
||||||
|
</Td>
|
||||||
|
<Td>{control.name}</Td>
|
||||||
|
</Tr>
|
||||||
|
))}
|
||||||
|
</Tbody>
|
||||||
|
</SortableTable>
|
||||||
|
);
|
||||||
|
}
|
||||||
351
apps/console2/src/pages/organizations/risks/tabs/__generated__/RiskControlsTabControlsQuery.graphql.ts
generated
Normal file
351
apps/console2/src/pages/organizations/risks/tabs/__generated__/RiskControlsTabControlsQuery.graphql.ts
generated
Normal file
@@ -0,0 +1,351 @@
|
|||||||
|
/**
|
||||||
|
* @generated SignedSource<<082144ec3a6a9a4afe38398cdc3e84ed>>
|
||||||
|
* @lightSyntaxTransform
|
||||||
|
* @nogrep
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* tslint:disable */
|
||||||
|
/* eslint-disable */
|
||||||
|
// @ts-nocheck
|
||||||
|
|
||||||
|
import { ConcreteRequest } from 'relay-runtime';
|
||||||
|
import { FragmentRefs } from "relay-runtime";
|
||||||
|
export type ControlOrderField = "CREATED_AT" | "SECTION_TITLE";
|
||||||
|
export type OrderDirection = "ASC" | "DESC";
|
||||||
|
export type ControlFilter = {
|
||||||
|
query?: string | null | undefined;
|
||||||
|
};
|
||||||
|
export type ControlOrder = {
|
||||||
|
direction: OrderDirection;
|
||||||
|
field: ControlOrderField;
|
||||||
|
};
|
||||||
|
export type RiskControlsTabControlsQuery$variables = {
|
||||||
|
after?: any | null | undefined;
|
||||||
|
before?: any | null | undefined;
|
||||||
|
filter?: ControlFilter | null | undefined;
|
||||||
|
first?: number | null | undefined;
|
||||||
|
id: string;
|
||||||
|
last?: number | null | undefined;
|
||||||
|
order?: ControlOrder | null | undefined;
|
||||||
|
};
|
||||||
|
export type RiskControlsTabControlsQuery$data = {
|
||||||
|
readonly node: {
|
||||||
|
readonly " $fragmentSpreads": FragmentRefs<"RiskControlsTabFragment">;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
export type RiskControlsTabControlsQuery = {
|
||||||
|
response: RiskControlsTabControlsQuery$data;
|
||||||
|
variables: RiskControlsTabControlsQuery$variables;
|
||||||
|
};
|
||||||
|
|
||||||
|
const node: ConcreteRequest = (function(){
|
||||||
|
var v0 = {
|
||||||
|
"defaultValue": null,
|
||||||
|
"kind": "LocalArgument",
|
||||||
|
"name": "after"
|
||||||
|
},
|
||||||
|
v1 = {
|
||||||
|
"defaultValue": null,
|
||||||
|
"kind": "LocalArgument",
|
||||||
|
"name": "before"
|
||||||
|
},
|
||||||
|
v2 = {
|
||||||
|
"defaultValue": null,
|
||||||
|
"kind": "LocalArgument",
|
||||||
|
"name": "filter"
|
||||||
|
},
|
||||||
|
v3 = {
|
||||||
|
"defaultValue": 20,
|
||||||
|
"kind": "LocalArgument",
|
||||||
|
"name": "first"
|
||||||
|
},
|
||||||
|
v4 = {
|
||||||
|
"defaultValue": null,
|
||||||
|
"kind": "LocalArgument",
|
||||||
|
"name": "id"
|
||||||
|
},
|
||||||
|
v5 = {
|
||||||
|
"defaultValue": null,
|
||||||
|
"kind": "LocalArgument",
|
||||||
|
"name": "last"
|
||||||
|
},
|
||||||
|
v6 = {
|
||||||
|
"defaultValue": null,
|
||||||
|
"kind": "LocalArgument",
|
||||||
|
"name": "order"
|
||||||
|
},
|
||||||
|
v7 = [
|
||||||
|
{
|
||||||
|
"kind": "Variable",
|
||||||
|
"name": "id",
|
||||||
|
"variableName": "id"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
v8 = {
|
||||||
|
"kind": "Variable",
|
||||||
|
"name": "after",
|
||||||
|
"variableName": "after"
|
||||||
|
},
|
||||||
|
v9 = {
|
||||||
|
"kind": "Variable",
|
||||||
|
"name": "before",
|
||||||
|
"variableName": "before"
|
||||||
|
},
|
||||||
|
v10 = {
|
||||||
|
"kind": "Variable",
|
||||||
|
"name": "filter",
|
||||||
|
"variableName": "filter"
|
||||||
|
},
|
||||||
|
v11 = {
|
||||||
|
"kind": "Variable",
|
||||||
|
"name": "first",
|
||||||
|
"variableName": "first"
|
||||||
|
},
|
||||||
|
v12 = {
|
||||||
|
"kind": "Variable",
|
||||||
|
"name": "last",
|
||||||
|
"variableName": "last"
|
||||||
|
},
|
||||||
|
v13 = {
|
||||||
|
"alias": null,
|
||||||
|
"args": null,
|
||||||
|
"kind": "ScalarField",
|
||||||
|
"name": "__typename",
|
||||||
|
"storageKey": null
|
||||||
|
},
|
||||||
|
v14 = {
|
||||||
|
"alias": null,
|
||||||
|
"args": null,
|
||||||
|
"kind": "ScalarField",
|
||||||
|
"name": "id",
|
||||||
|
"storageKey": null
|
||||||
|
},
|
||||||
|
v15 = [
|
||||||
|
(v8/*: any*/),
|
||||||
|
(v9/*: any*/),
|
||||||
|
(v10/*: any*/),
|
||||||
|
(v11/*: any*/),
|
||||||
|
(v12/*: any*/),
|
||||||
|
{
|
||||||
|
"kind": "Variable",
|
||||||
|
"name": "orderBy",
|
||||||
|
"variableName": "order"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
v16 = {
|
||||||
|
"alias": null,
|
||||||
|
"args": null,
|
||||||
|
"kind": "ScalarField",
|
||||||
|
"name": "name",
|
||||||
|
"storageKey": null
|
||||||
|
};
|
||||||
|
return {
|
||||||
|
"fragment": {
|
||||||
|
"argumentDefinitions": [
|
||||||
|
(v0/*: any*/),
|
||||||
|
(v1/*: any*/),
|
||||||
|
(v2/*: any*/),
|
||||||
|
(v3/*: any*/),
|
||||||
|
(v4/*: any*/),
|
||||||
|
(v5/*: any*/),
|
||||||
|
(v6/*: any*/)
|
||||||
|
],
|
||||||
|
"kind": "Fragment",
|
||||||
|
"metadata": null,
|
||||||
|
"name": "RiskControlsTabControlsQuery",
|
||||||
|
"selections": [
|
||||||
|
{
|
||||||
|
"alias": null,
|
||||||
|
"args": (v7/*: any*/),
|
||||||
|
"concreteType": null,
|
||||||
|
"kind": "LinkedField",
|
||||||
|
"name": "node",
|
||||||
|
"plural": false,
|
||||||
|
"selections": [
|
||||||
|
{
|
||||||
|
"args": [
|
||||||
|
(v8/*: any*/),
|
||||||
|
(v9/*: any*/),
|
||||||
|
(v10/*: any*/),
|
||||||
|
(v11/*: any*/),
|
||||||
|
(v12/*: any*/),
|
||||||
|
{
|
||||||
|
"kind": "Variable",
|
||||||
|
"name": "order",
|
||||||
|
"variableName": "order"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"kind": "FragmentSpread",
|
||||||
|
"name": "RiskControlsTabFragment"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"storageKey": null
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "Query",
|
||||||
|
"abstractKey": null
|
||||||
|
},
|
||||||
|
"kind": "Request",
|
||||||
|
"operation": {
|
||||||
|
"argumentDefinitions": [
|
||||||
|
(v0/*: any*/),
|
||||||
|
(v1/*: any*/),
|
||||||
|
(v2/*: any*/),
|
||||||
|
(v3/*: any*/),
|
||||||
|
(v5/*: any*/),
|
||||||
|
(v6/*: any*/),
|
||||||
|
(v4/*: any*/)
|
||||||
|
],
|
||||||
|
"kind": "Operation",
|
||||||
|
"name": "RiskControlsTabControlsQuery",
|
||||||
|
"selections": [
|
||||||
|
{
|
||||||
|
"alias": null,
|
||||||
|
"args": (v7/*: any*/),
|
||||||
|
"concreteType": null,
|
||||||
|
"kind": "LinkedField",
|
||||||
|
"name": "node",
|
||||||
|
"plural": false,
|
||||||
|
"selections": [
|
||||||
|
(v13/*: any*/),
|
||||||
|
(v14/*: any*/),
|
||||||
|
{
|
||||||
|
"kind": "InlineFragment",
|
||||||
|
"selections": [
|
||||||
|
{
|
||||||
|
"alias": null,
|
||||||
|
"args": (v15/*: any*/),
|
||||||
|
"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": [
|
||||||
|
(v14/*: any*/),
|
||||||
|
{
|
||||||
|
"alias": null,
|
||||||
|
"args": null,
|
||||||
|
"kind": "ScalarField",
|
||||||
|
"name": "sectionTitle",
|
||||||
|
"storageKey": null
|
||||||
|
},
|
||||||
|
(v16/*: any*/),
|
||||||
|
{
|
||||||
|
"alias": null,
|
||||||
|
"args": null,
|
||||||
|
"concreteType": "Framework",
|
||||||
|
"kind": "LinkedField",
|
||||||
|
"name": "framework",
|
||||||
|
"plural": false,
|
||||||
|
"selections": [
|
||||||
|
(v14/*: any*/),
|
||||||
|
(v16/*: 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
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"alias": null,
|
||||||
|
"args": null,
|
||||||
|
"kind": "ScalarField",
|
||||||
|
"name": "hasPreviousPage",
|
||||||
|
"storageKey": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"alias": null,
|
||||||
|
"args": null,
|
||||||
|
"kind": "ScalarField",
|
||||||
|
"name": "startCursor",
|
||||||
|
"storageKey": null
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"storageKey": null
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"storageKey": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"alias": null,
|
||||||
|
"args": (v15/*: any*/),
|
||||||
|
"filters": [
|
||||||
|
"orderBy",
|
||||||
|
"filter"
|
||||||
|
],
|
||||||
|
"handle": "connection",
|
||||||
|
"key": "RiskControlsTab_controls",
|
||||||
|
"kind": "LinkedHandle",
|
||||||
|
"name": "controls"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "Risk",
|
||||||
|
"abstractKey": null
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"storageKey": null
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"params": {
|
||||||
|
"cacheID": "ea5571d7c2f47861c81f19447ff3d345",
|
||||||
|
"id": null,
|
||||||
|
"metadata": {},
|
||||||
|
"name": "RiskControlsTabControlsQuery",
|
||||||
|
"operationKind": "query",
|
||||||
|
"text": "query RiskControlsTabControlsQuery(\n $after: CursorKey\n $before: CursorKey = null\n $filter: ControlFilter = null\n $first: Int = 20\n $last: Int = null\n $order: ControlOrder = null\n $id: ID!\n) {\n node(id: $id) {\n __typename\n ...RiskControlsTabFragment_4cFWzS\n id\n }\n}\n\nfragment RiskControlsTabFragment_4cFWzS on Risk {\n id\n controls(first: $first, after: $after, last: $last, before: $before, orderBy: $order, filter: $filter) {\n edges {\n node {\n id\n sectionTitle\n name\n framework {\n id\n name\n }\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n hasPreviousPage\n startCursor\n }\n }\n}\n"
|
||||||
|
}
|
||||||
|
};
|
||||||
|
})();
|
||||||
|
|
||||||
|
(node as any).hash = "ef2896f4e53f88f6862ffef48bcccff3";
|
||||||
|
|
||||||
|
export default node;
|
||||||
250
apps/console2/src/pages/organizations/risks/tabs/__generated__/RiskControlsTabFragment.graphql.ts
generated
Normal file
250
apps/console2/src/pages/organizations/risks/tabs/__generated__/RiskControlsTabFragment.graphql.ts
generated
Normal file
@@ -0,0 +1,250 @@
|
|||||||
|
/**
|
||||||
|
* @generated SignedSource<<5bbce08d4b9359b961b9b1b4827f5756>>
|
||||||
|
* @lightSyntaxTransform
|
||||||
|
* @nogrep
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* tslint:disable */
|
||||||
|
/* eslint-disable */
|
||||||
|
// @ts-nocheck
|
||||||
|
|
||||||
|
import { ReaderFragment } from 'relay-runtime';
|
||||||
|
import { FragmentRefs } from "relay-runtime";
|
||||||
|
export type RiskControlsTabFragment$data = {
|
||||||
|
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 " $fragmentType": "RiskControlsTabFragment";
|
||||||
|
};
|
||||||
|
export type RiskControlsTabFragment$key = {
|
||||||
|
readonly " $data"?: RiskControlsTabFragment$data;
|
||||||
|
readonly " $fragmentSpreads": FragmentRefs<"RiskControlsTabFragment">;
|
||||||
|
};
|
||||||
|
|
||||||
|
import RiskControlsTabControlsQuery_graphql from './RiskControlsTabControlsQuery.graphql';
|
||||||
|
|
||||||
|
const node: ReaderFragment = (function(){
|
||||||
|
var v0 = [
|
||||||
|
"controls"
|
||||||
|
],
|
||||||
|
v1 = {
|
||||||
|
"alias": null,
|
||||||
|
"args": null,
|
||||||
|
"kind": "ScalarField",
|
||||||
|
"name": "id",
|
||||||
|
"storageKey": null
|
||||||
|
},
|
||||||
|
v2 = {
|
||||||
|
"alias": null,
|
||||||
|
"args": null,
|
||||||
|
"kind": "ScalarField",
|
||||||
|
"name": "name",
|
||||||
|
"storageKey": null
|
||||||
|
};
|
||||||
|
return {
|
||||||
|
"argumentDefinitions": [
|
||||||
|
{
|
||||||
|
"defaultValue": null,
|
||||||
|
"kind": "LocalArgument",
|
||||||
|
"name": "after"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"defaultValue": null,
|
||||||
|
"kind": "LocalArgument",
|
||||||
|
"name": "before"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"defaultValue": null,
|
||||||
|
"kind": "LocalArgument",
|
||||||
|
"name": "filter"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"defaultValue": 20,
|
||||||
|
"kind": "LocalArgument",
|
||||||
|
"name": "first"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"defaultValue": null,
|
||||||
|
"kind": "LocalArgument",
|
||||||
|
"name": "last"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"defaultValue": null,
|
||||||
|
"kind": "LocalArgument",
|
||||||
|
"name": "order"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"kind": "Fragment",
|
||||||
|
"metadata": {
|
||||||
|
"connection": [
|
||||||
|
{
|
||||||
|
"count": null,
|
||||||
|
"cursor": null,
|
||||||
|
"direction": "bidirectional",
|
||||||
|
"path": (v0/*: any*/)
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"refetch": {
|
||||||
|
"connection": {
|
||||||
|
"forward": {
|
||||||
|
"count": "first",
|
||||||
|
"cursor": "after"
|
||||||
|
},
|
||||||
|
"backward": {
|
||||||
|
"count": "last",
|
||||||
|
"cursor": "before"
|
||||||
|
},
|
||||||
|
"path": (v0/*: any*/)
|
||||||
|
},
|
||||||
|
"fragmentPathInResult": [
|
||||||
|
"node"
|
||||||
|
],
|
||||||
|
"operation": RiskControlsTabControlsQuery_graphql,
|
||||||
|
"identifierInfo": {
|
||||||
|
"identifierField": "id",
|
||||||
|
"identifierQueryVariableName": "id"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"name": "RiskControlsTabFragment",
|
||||||
|
"selections": [
|
||||||
|
(v1/*: any*/),
|
||||||
|
{
|
||||||
|
"alias": "controls",
|
||||||
|
"args": [
|
||||||
|
{
|
||||||
|
"kind": "Variable",
|
||||||
|
"name": "filter",
|
||||||
|
"variableName": "filter"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"kind": "Variable",
|
||||||
|
"name": "orderBy",
|
||||||
|
"variableName": "order"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"concreteType": "ControlConnection",
|
||||||
|
"kind": "LinkedField",
|
||||||
|
"name": "__RiskControlsTab_controls_connection",
|
||||||
|
"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": [
|
||||||
|
(v1/*: any*/),
|
||||||
|
{
|
||||||
|
"alias": null,
|
||||||
|
"args": null,
|
||||||
|
"kind": "ScalarField",
|
||||||
|
"name": "sectionTitle",
|
||||||
|
"storageKey": null
|
||||||
|
},
|
||||||
|
(v2/*: any*/),
|
||||||
|
{
|
||||||
|
"alias": null,
|
||||||
|
"args": null,
|
||||||
|
"concreteType": "Framework",
|
||||||
|
"kind": "LinkedField",
|
||||||
|
"name": "framework",
|
||||||
|
"plural": false,
|
||||||
|
"selections": [
|
||||||
|
(v1/*: any*/),
|
||||||
|
(v2/*: 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
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"alias": null,
|
||||||
|
"args": null,
|
||||||
|
"kind": "ScalarField",
|
||||||
|
"name": "hasPreviousPage",
|
||||||
|
"storageKey": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"alias": null,
|
||||||
|
"args": null,
|
||||||
|
"kind": "ScalarField",
|
||||||
|
"name": "startCursor",
|
||||||
|
"storageKey": null
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"storageKey": null
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"storageKey": null
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "Risk",
|
||||||
|
"abstractKey": null
|
||||||
|
};
|
||||||
|
})();
|
||||||
|
|
||||||
|
(node as any).hash = "ef2896f4e53f88f6862ffef48bcccff3";
|
||||||
|
|
||||||
|
export default node;
|
||||||
@@ -48,6 +48,12 @@ export const riskRoutes = [
|
|||||||
() => import("/pages/organizations/risks/tabs/RiskDocumentsTab.tsx")
|
() => import("/pages/organizations/risks/tabs/RiskDocumentsTab.tsx")
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: "controls",
|
||||||
|
Component: lazy(
|
||||||
|
() => import("/pages/organizations/risks/tabs/RiskControlsTab.tsx")
|
||||||
|
),
|
||||||
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
] satisfies AppRoute[];
|
] satisfies AppRoute[];
|
||||||
|
|||||||
Reference in New Issue
Block a user