Add compliance registry snapshots

Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
This commit is contained in:
Sacha Al Himdani
2025-08-29 11:05:01 +02:00
parent 828895a436
commit 16c94c4cca
25 changed files with 781 additions and 199 deletions

View File

@@ -8,10 +8,10 @@ import { useMutationWithToasts } from "../useMutationWithToasts";
export const ComplianceRegistriesConnectionKey = "ComplianceRegistriesPage_complianceRegistries";
export const complianceRegistriesQuery = graphql`
query ComplianceRegistryGraphListQuery($organizationId: ID!) {
query ComplianceRegistryGraphListQuery($organizationId: ID!, $snapshotId: ID) {
node(id: $organizationId) {
... on Organization {
...ComplianceRegistriesPageFragment
...ComplianceRegistriesPageFragment @arguments(snapshotId: $snapshotId)
}
}
}
@@ -22,6 +22,8 @@ export const complianceRegistryNodeQuery = graphql`
node(id: $complianceRegistryId) {
... on ComplianceRegistry {
id
snapshotId
sourceId
referenceId
area
source

View File

@@ -1,5 +1,5 @@
/**
* @generated SignedSource<<fa68dc3f1afe9ab6d98e189eff649e04>>
* @generated SignedSource<<41975a1dcc769268a6255ea703ff26fe>>
* @lightSyntaxTransform
* @nogrep
*/
@@ -12,6 +12,7 @@ import { ConcreteRequest } from 'relay-runtime';
import { FragmentRefs } from "relay-runtime";
export type ComplianceRegistryGraphListQuery$variables = {
organizationId: string;
snapshotId?: string | null | undefined;
};
export type ComplianceRegistryGraphListQuery$data = {
readonly node: {
@@ -29,6 +30,11 @@ var v0 = [
"defaultValue": null,
"kind": "LocalArgument",
"name": "organizationId"
},
{
"defaultValue": null,
"kind": "LocalArgument",
"name": "snapshotId"
}
],
v1 = [
@@ -38,21 +44,33 @@ v1 = [
"variableName": "organizationId"
}
],
v2 = {
v2 = [
{
"kind": "Variable",
"name": "snapshotId",
"variableName": "snapshotId"
}
],
v3 = {
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "__typename",
"storageKey": null
},
v3 = {
v4 = {
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "id",
"storageKey": null
},
v4 = [
v5 = [
{
"fields": (v2/*: any*/),
"kind": "ObjectValue",
"name": "filter"
},
{
"kind": "Literal",
"name": "first",
@@ -78,7 +96,7 @@ return {
"kind": "InlineFragment",
"selections": [
{
"args": null,
"args": (v2/*: any*/),
"kind": "FragmentSpread",
"name": "ComplianceRegistriesPageFragment"
}
@@ -107,14 +125,14 @@ return {
"name": "node",
"plural": false,
"selections": [
(v2/*: any*/),
(v3/*: any*/),
(v4/*: any*/),
{
"kind": "InlineFragment",
"selections": [
{
"alias": null,
"args": (v4/*: any*/),
"args": (v5/*: any*/),
"concreteType": "ComplianceRegistryConnection",
"kind": "LinkedField",
"name": "complianceRegistries",
@@ -143,7 +161,21 @@ return {
"name": "node",
"plural": false,
"selections": [
(v3/*: any*/),
(v4/*: any*/),
{
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "snapshotId",
"storageKey": null
},
{
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "sourceId",
"storageKey": null
},
{
"alias": null,
"args": null,
@@ -215,7 +247,7 @@ return {
"name": "owner",
"plural": false,
"selections": [
(v3/*: any*/),
(v4/*: any*/),
{
"alias": null,
"args": null,
@@ -240,7 +272,7 @@ return {
"name": "updatedAt",
"storageKey": null
},
(v2/*: any*/)
(v3/*: any*/)
],
"storageKey": null
},
@@ -292,12 +324,14 @@ return {
]
}
],
"storageKey": "complianceRegistries(first:10)"
"storageKey": null
},
{
"alias": null,
"args": (v4/*: any*/),
"filters": null,
"args": (v5/*: any*/),
"filters": [
"filter"
],
"handle": "connection",
"key": "ComplianceRegistriesPage_complianceRegistries",
"kind": "LinkedHandle",
@@ -313,16 +347,16 @@ return {
]
},
"params": {
"cacheID": "2852dc9732086326e7770650cbd00ad1",
"cacheID": "d578089841a93f60ae9ba5bc6e9175b0",
"id": null,
"metadata": {},
"name": "ComplianceRegistryGraphListQuery",
"operationKind": "query",
"text": "query ComplianceRegistryGraphListQuery(\n $organizationId: ID!\n) {\n node(id: $organizationId) {\n __typename\n ... on Organization {\n ...ComplianceRegistriesPageFragment\n }\n id\n }\n}\n\nfragment ComplianceRegistriesPageFragment on Organization {\n id\n complianceRegistries(first: 10) {\n totalCount\n edges {\n node {\n id\n referenceId\n area\n source\n requirement\n status\n lastReviewDate\n dueDate\n actionsToBeImplemented\n regulator\n owner {\n id\n fullName\n }\n createdAt\n updatedAt\n __typename\n }\n cursor\n }\n pageInfo {\n hasNextPage\n endCursor\n }\n }\n}\n"
"text": "query ComplianceRegistryGraphListQuery(\n $organizationId: ID!\n $snapshotId: ID\n) {\n node(id: $organizationId) {\n __typename\n ... on Organization {\n ...ComplianceRegistriesPageFragment_3iomuz\n }\n id\n }\n}\n\nfragment ComplianceRegistriesPageFragment_3iomuz on Organization {\n id\n complianceRegistries(first: 10, filter: {snapshotId: $snapshotId}) {\n totalCount\n edges {\n node {\n id\n snapshotId\n sourceId\n referenceId\n area\n source\n requirement\n status\n lastReviewDate\n dueDate\n actionsToBeImplemented\n regulator\n owner {\n id\n fullName\n }\n createdAt\n updatedAt\n __typename\n }\n cursor\n }\n pageInfo {\n hasNextPage\n endCursor\n }\n }\n}\n"
}
};
})();
(node as any).hash = "363434c78eb3e27ac52b6da13c7432a1";
(node as any).hash = "2c50dd58eb2d72e49bce300726f35a34";
export default node;

View File

@@ -1,5 +1,5 @@
/**
* @generated SignedSource<<f3d37c53737c5f0f3bd062eb2b682898>>
* @generated SignedSource<<ec60b0715df426d6819f03f6e1597fef>>
* @lightSyntaxTransform
* @nogrep
*/
@@ -32,7 +32,9 @@ export type ComplianceRegistryGraphNodeQuery$data = {
readonly referenceId?: string;
readonly regulator?: string | null | undefined;
readonly requirement?: string | null | undefined;
readonly snapshotId?: string | null | undefined;
readonly source?: string | null | undefined;
readonly sourceId?: string | null | undefined;
readonly status?: ComplianceRegistryStatus;
readonly updatedAt?: any;
};
@@ -68,66 +70,80 @@ v3 = {
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "referenceId",
"name": "snapshotId",
"storageKey": null
},
v4 = {
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "area",
"name": "sourceId",
"storageKey": null
},
v5 = {
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "source",
"name": "referenceId",
"storageKey": null
},
v6 = {
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "requirement",
"name": "area",
"storageKey": null
},
v7 = {
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "actionsToBeImplemented",
"name": "source",
"storageKey": null
},
v8 = {
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "regulator",
"name": "requirement",
"storageKey": null
},
v9 = {
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "lastReviewDate",
"name": "actionsToBeImplemented",
"storageKey": null
},
v10 = {
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "dueDate",
"name": "regulator",
"storageKey": null
},
v11 = {
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "status",
"name": "lastReviewDate",
"storageKey": null
},
v12 = {
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "dueDate",
"storageKey": null
},
v13 = {
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "status",
"storageKey": null
},
v14 = {
"alias": null,
"args": null,
"concreteType": "People",
@@ -146,7 +162,7 @@ v12 = {
],
"storageKey": null
},
v13 = {
v15 = {
"alias": null,
"args": null,
"concreteType": "Organization",
@@ -165,14 +181,14 @@ v13 = {
],
"storageKey": null
},
v14 = {
v16 = {
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "createdAt",
"storageKey": null
},
v15 = {
v17 = {
"alias": null,
"args": null,
"kind": "ScalarField",
@@ -210,7 +226,9 @@ return {
(v12/*: any*/),
(v13/*: any*/),
(v14/*: any*/),
(v15/*: any*/)
(v15/*: any*/),
(v16/*: any*/),
(v17/*: any*/)
],
"type": "ComplianceRegistry",
"abstractKey": null
@@ -259,7 +277,9 @@ return {
(v12/*: any*/),
(v13/*: any*/),
(v14/*: any*/),
(v15/*: any*/)
(v15/*: any*/),
(v16/*: any*/),
(v17/*: any*/)
],
"type": "ComplianceRegistry",
"abstractKey": null
@@ -270,16 +290,16 @@ return {
]
},
"params": {
"cacheID": "4b91258de0711b2821a26bef89b60b02",
"cacheID": "2c4649d3258530fd79420bc2ed8fd14a",
"id": null,
"metadata": {},
"name": "ComplianceRegistryGraphNodeQuery",
"operationKind": "query",
"text": "query ComplianceRegistryGraphNodeQuery(\n $complianceRegistryId: ID!\n) {\n node(id: $complianceRegistryId) {\n __typename\n ... on ComplianceRegistry {\n id\n referenceId\n area\n source\n requirement\n actionsToBeImplemented\n regulator\n lastReviewDate\n dueDate\n status\n owner {\n id\n fullName\n }\n organization {\n id\n name\n }\n createdAt\n updatedAt\n }\n id\n }\n}\n"
"text": "query ComplianceRegistryGraphNodeQuery(\n $complianceRegistryId: ID!\n) {\n node(id: $complianceRegistryId) {\n __typename\n ... on ComplianceRegistry {\n id\n snapshotId\n sourceId\n referenceId\n area\n source\n requirement\n actionsToBeImplemented\n regulator\n lastReviewDate\n dueDate\n status\n owner {\n id\n fullName\n }\n organization {\n id\n name\n }\n createdAt\n updatedAt\n }\n id\n }\n}\n"
}
};
})();
(node as any).hash = "1b3352776a5b514b7545111aeb780148";
(node as any).hash = "b290ce12f57b586e64bac227777bc294";
export default node;