Refactor documents page

Signed-off-by: Émile Ré <emile@getprobo.com>
This commit is contained in:
Émile Ré
2026-01-26 15:31:08 +04:00
parent a05ba46f82
commit 3f96869b6b
21 changed files with 1441 additions and 636 deletions

View File

@@ -1,5 +1,5 @@
/**
* @generated SignedSource<<8a75dcc06cfe213df84407b8855d73c9>>
* @generated SignedSource<<766e48d090179d20cc6a7b1d6bc6591f>>
* @lightSyntaxTransform
* @nogrep
*/
@@ -31,7 +31,7 @@ export type CreateDocumentDialogMutation$data = {
readonly documentEdge: {
readonly node: {
readonly id: string;
readonly " $fragmentSpreads": FragmentRefs<"DocumentsPageRowFragment">;
readonly " $fragmentSpreads": FragmentRefs<"DocumentListItemFragment">;
};
};
};
@@ -104,7 +104,7 @@ return {
{
"args": null,
"kind": "FragmentSpread",
"name": "DocumentsPageRowFragment"
"name": "DocumentListItemFragment"
}
],
"storageKey": null
@@ -160,13 +160,6 @@ return {
"name": "title",
"storageKey": null
},
{
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "description",
"storageKey": null
},
{
"alias": null,
"args": null,
@@ -349,16 +342,16 @@ return {
]
},
"params": {
"cacheID": "8f0e8730a2b85c51592d45cbf4ad8b1e",
"cacheID": "20ca0b6c942e66b92ced0b4869262530",
"id": null,
"metadata": {},
"name": "CreateDocumentDialogMutation",
"operationKind": "mutation",
"text": "mutation CreateDocumentDialogMutation(\n $input: CreateDocumentInput!\n) {\n createDocument(input: $input) {\n documentEdge {\n node {\n id\n ...DocumentsPageRowFragment\n }\n }\n }\n}\n\nfragment DocumentsPageRowFragment on Document {\n id\n title\n description\n documentType\n classification\n updatedAt\n canDelete: permission(action: \"core:document:delete\")\n owner {\n id\n fullName\n }\n versions(first: 1) {\n edges {\n node {\n id\n status\n version\n signatures(first: 1000) {\n edges {\n node {\n id\n state\n }\n }\n }\n }\n }\n }\n}\n"
"text": "mutation CreateDocumentDialogMutation(\n $input: CreateDocumentInput!\n) {\n createDocument(input: $input) {\n documentEdge {\n node {\n id\n ...DocumentListItemFragment\n }\n }\n }\n}\n\nfragment DocumentListItemFragment on Document {\n id\n title\n documentType\n classification\n updatedAt\n canDelete: permission(action: \"core:document:delete\")\n owner {\n id\n fullName\n }\n versions(first: 1) {\n edges {\n node {\n id\n status\n version\n signatures(first: 1000) {\n edges {\n node {\n id\n state\n }\n }\n }\n }\n }\n }\n}\n"
}
};
})();
(node as any).hash = "19d6bd18594154b918c529d15f7ee8d7";
(node as any).hash = "30ea1213f809faa45e873b069e27df26";
export default node;

View File

@@ -1,5 +1,5 @@
/**
* @generated SignedSource<<4531c90194c8da0c1cbd00e5e169ff00>>
* @generated SignedSource<<05daa30144e3f6586a379aaffc86a05e>>
* @lightSyntaxTransform
* @nogrep
*/
@@ -10,26 +10,25 @@
import { ReaderFragment } from 'relay-runtime';
import { FragmentRefs } from "relay-runtime";
export type DocumentsPageListFragment$data = {
export type DocumentListFragment$data = {
readonly documents: {
readonly __id: string;
readonly edges: ReadonlyArray<{
readonly node: {
readonly canDelete: boolean;
readonly canRequestSignatures: boolean;
readonly canSendSigningNotifications: boolean;
readonly canUpdate: boolean;
readonly id: string;
readonly " $fragmentSpreads": FragmentRefs<"DocumentsPageRowFragment">;
readonly " $fragmentSpreads": FragmentRefs<"DocumentListItemFragment">;
};
}>;
};
readonly id: string;
readonly " $fragmentType": "DocumentsPageListFragment";
readonly " $fragmentType": "DocumentListFragment";
};
export type DocumentsPageListFragment$key = {
readonly " $data"?: DocumentsPageListFragment$data;
readonly " $fragmentSpreads": FragmentRefs<"DocumentsPageListFragment">;
export type DocumentListFragment$key = {
readonly " $data"?: DocumentListFragment$data;
readonly " $fragmentSpreads": FragmentRefs<"DocumentListFragment">;
};
import DocumentsListQuery_graphql from './DocumentsListQuery.graphql';
@@ -108,7 +107,7 @@ return {
}
}
},
"name": "DocumentsPageListFragment",
"name": "DocumentListFragment",
"selections": [
{
"alias": "documents",
@@ -167,19 +166,6 @@ return {
"name": "permission",
"storageKey": "permission(action:\"core:document:delete\")"
},
{
"alias": "canSendSigningNotifications",
"args": [
{
"kind": "Literal",
"name": "action",
"value": "core:document:send-signing-notifications"
}
],
"kind": "ScalarField",
"name": "permission",
"storageKey": "permission(action:\"core:document:send-signing-notifications\")"
},
{
"alias": "canRequestSignatures",
"args": [
@@ -196,7 +182,7 @@ return {
{
"args": null,
"kind": "FragmentSpread",
"name": "DocumentsPageRowFragment"
"name": "DocumentListItemFragment"
},
{
"alias": null,
@@ -279,6 +265,6 @@ return {
};
})();
(node as any).hash = "0f00d125fc711db9e65d54dcc884a72e";
(node as any).hash = "496614376a52d4557bcb06057863554e";
export default node;

View File

@@ -1,5 +1,5 @@
/**
* @generated SignedSource<<9d93eb8b8aedef57b8a20e267b61bc08>>
* @generated SignedSource<<664a9b09aac444c69891219cca1c6b8d>>
* @lightSyntaxTransform
* @nogrep
*/
@@ -14,10 +14,9 @@ export type DocumentStatus = "DRAFT" | "PUBLISHED";
export type DocumentType = "ISMS" | "OTHER" | "POLICY" | "PROCEDURE";
export type DocumentVersionSignatureState = "REQUESTED" | "SIGNED";
import { FragmentRefs } from "relay-runtime";
export type DocumentsPageRowFragment$data = {
export type DocumentListItemFragment$data = {
readonly canDelete: boolean;
readonly classification: DocumentClassification;
readonly description: string | null | undefined;
readonly documentType: DocumentType;
readonly id: string;
readonly owner: {
@@ -43,11 +42,11 @@ export type DocumentsPageRowFragment$data = {
};
}>;
};
readonly " $fragmentType": "DocumentsPageRowFragment";
readonly " $fragmentType": "DocumentListItemFragment";
};
export type DocumentsPageRowFragment$key = {
readonly " $data"?: DocumentsPageRowFragment$data;
readonly " $fragmentSpreads": FragmentRefs<"DocumentsPageRowFragment">;
export type DocumentListItemFragment$key = {
readonly " $data"?: DocumentListItemFragment$data;
readonly " $fragmentSpreads": FragmentRefs<"DocumentListItemFragment">;
};
const node: ReaderFragment = (function(){
@@ -62,7 +61,7 @@ return {
"argumentDefinitions": [],
"kind": "Fragment",
"metadata": null,
"name": "DocumentsPageRowFragment",
"name": "DocumentListItemFragment",
"selections": [
(v0/*: any*/),
{
@@ -72,13 +71,6 @@ return {
"name": "title",
"storageKey": null
},
{
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "description",
"storageKey": null
},
{
"alias": null,
"args": null,
@@ -239,6 +231,6 @@ return {
};
})();
(node as any).hash = "4164f76edc42d40eef1efc54194116ec";
(node as any).hash = "6c4db808e4ec47dbca635feb3ea13e56";
export default node;

View File

@@ -0,0 +1,132 @@
/**
* @generated SignedSource<<588b3953b36814ede0cd490eeaa6f99d>>
* @lightSyntaxTransform
* @nogrep
*/
/* tslint:disable */
/* eslint-disable */
// @ts-nocheck
import { ConcreteRequest } from 'relay-runtime';
export type DeleteDocumentInput = {
documentId: string;
};
export type DocumentListItem_deleteMutation$variables = {
connections: ReadonlyArray<string>;
input: DeleteDocumentInput;
};
export type DocumentListItem_deleteMutation$data = {
readonly deleteDocument: {
readonly deletedDocumentId: string;
};
};
export type DocumentListItem_deleteMutation = {
response: DocumentListItem_deleteMutation$data;
variables: DocumentListItem_deleteMutation$variables;
};
const node: ConcreteRequest = (function(){
var v0 = {
"defaultValue": null,
"kind": "LocalArgument",
"name": "connections"
},
v1 = {
"defaultValue": null,
"kind": "LocalArgument",
"name": "input"
},
v2 = [
{
"kind": "Variable",
"name": "input",
"variableName": "input"
}
],
v3 = {
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "deletedDocumentId",
"storageKey": null
};
return {
"fragment": {
"argumentDefinitions": [
(v0/*: any*/),
(v1/*: any*/)
],
"kind": "Fragment",
"metadata": null,
"name": "DocumentListItem_deleteMutation",
"selections": [
{
"alias": null,
"args": (v2/*: any*/),
"concreteType": "DeleteDocumentPayload",
"kind": "LinkedField",
"name": "deleteDocument",
"plural": false,
"selections": [
(v3/*: any*/)
],
"storageKey": null
}
],
"type": "Mutation",
"abstractKey": null
},
"kind": "Request",
"operation": {
"argumentDefinitions": [
(v1/*: any*/),
(v0/*: any*/)
],
"kind": "Operation",
"name": "DocumentListItem_deleteMutation",
"selections": [
{
"alias": null,
"args": (v2/*: any*/),
"concreteType": "DeleteDocumentPayload",
"kind": "LinkedField",
"name": "deleteDocument",
"plural": false,
"selections": [
(v3/*: any*/),
{
"alias": null,
"args": null,
"filters": null,
"handle": "deleteEdge",
"key": "",
"kind": "ScalarHandle",
"name": "deletedDocumentId",
"handleArgs": [
{
"kind": "Variable",
"name": "connections",
"variableName": "connections"
}
]
}
],
"storageKey": null
}
]
},
"params": {
"cacheID": "de0d3cda546f944c8ae3a0ae98aa8bcb",
"id": null,
"metadata": {},
"name": "DocumentListItem_deleteMutation",
"operationKind": "mutation",
"text": "mutation DocumentListItem_deleteMutation(\n $input: DeleteDocumentInput!\n) {\n deleteDocument(input: $input) {\n deletedDocumentId\n }\n}\n"
}
};
})();
(node as any).hash = "91fbf2fc8563f4ffe8732193a815de77";
export default node;

View File

@@ -1,5 +1,5 @@
/**
* @generated SignedSource<<ba35b8d51574d7e6b61987743636f5bb>>
* @generated SignedSource<<f3ca69e3f5731e73dc9f4268b0507adc>>
* @lightSyntaxTransform
* @nogrep
*/
@@ -26,7 +26,7 @@ export type DocumentsListQuery$variables = {
};
export type DocumentsListQuery$data = {
readonly node: {
readonly " $fragmentSpreads": FragmentRefs<"DocumentsPageListFragment">;
readonly " $fragmentSpreads": FragmentRefs<"DocumentListFragment">;
};
};
export type DocumentsListQuery = {
@@ -155,7 +155,7 @@ return {
}
],
"kind": "FragmentSpread",
"name": "DocumentsPageListFragment"
"name": "DocumentListFragment"
}
],
"storageKey": null
@@ -241,19 +241,6 @@ return {
"name": "permission",
"storageKey": "permission(action:\"core:document:delete\")"
},
{
"alias": "canSendSigningNotifications",
"args": [
{
"kind": "Literal",
"name": "action",
"value": "core:document:send-signing-notifications"
}
],
"kind": "ScalarField",
"name": "permission",
"storageKey": "permission(action:\"core:document:send-signing-notifications\")"
},
{
"alias": "canRequestSignatures",
"args": [
@@ -274,13 +261,6 @@ return {
"name": "title",
"storageKey": null
},
{
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "description",
"storageKey": null
},
{
"alias": null,
"args": null,
@@ -511,16 +491,16 @@ return {
]
},
"params": {
"cacheID": "c7b8d86af8a704ba0a6451bd3877746f",
"cacheID": "c404cb30a5176c7d01cace940923f480",
"id": null,
"metadata": {},
"name": "DocumentsListQuery",
"operationKind": "query",
"text": "query DocumentsListQuery(\n $after: CursorKey = null\n $before: CursorKey = null\n $first: Int = 50\n $last: Int = null\n $order: DocumentOrder = {field: TITLE, direction: ASC}\n $id: ID!\n) {\n node(id: $id) {\n __typename\n ...DocumentsPageListFragment_16fISc\n id\n }\n}\n\nfragment DocumentsPageListFragment_16fISc on Organization {\n documents(first: $first, after: $after, last: $last, before: $before, orderBy: $order) {\n edges {\n node {\n id\n canUpdate: permission(action: \"core:document:update\")\n canDelete: permission(action: \"core:document:delete\")\n canSendSigningNotifications: permission(action: \"core:document:send-signing-notifications\")\n canRequestSignatures: permission(action: \"core:document-version:request-signature\")\n ...DocumentsPageRowFragment\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n hasPreviousPage\n startCursor\n }\n }\n id\n}\n\nfragment DocumentsPageRowFragment on Document {\n id\n title\n description\n documentType\n classification\n updatedAt\n canDelete: permission(action: \"core:document:delete\")\n owner {\n id\n fullName\n }\n versions(first: 1) {\n edges {\n node {\n id\n status\n version\n signatures(first: 1000) {\n edges {\n node {\n id\n state\n }\n }\n }\n }\n }\n }\n}\n"
"text": "query DocumentsListQuery(\n $after: CursorKey = null\n $before: CursorKey = null\n $first: Int = 50\n $last: Int = null\n $order: DocumentOrder = {field: TITLE, direction: ASC}\n $id: ID!\n) {\n node(id: $id) {\n __typename\n ...DocumentListFragment_16fISc\n id\n }\n}\n\nfragment DocumentListFragment_16fISc on Organization {\n documents(first: $first, after: $after, last: $last, before: $before, orderBy: $order) {\n edges {\n node {\n id\n canUpdate: permission(action: \"core:document:update\")\n canDelete: permission(action: \"core:document:delete\")\n canRequestSignatures: permission(action: \"core:document-version:request-signature\")\n ...DocumentListItemFragment\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n hasPreviousPage\n startCursor\n }\n }\n id\n}\n\nfragment DocumentListItemFragment on Document {\n id\n title\n documentType\n classification\n updatedAt\n canDelete: permission(action: \"core:document:delete\")\n owner {\n id\n fullName\n }\n versions(first: 1) {\n edges {\n node {\n id\n status\n version\n signatures(first: 1000) {\n edges {\n node {\n id\n state\n }\n }\n }\n }\n }\n }\n}\n"
}
};
})();
(node as any).hash = "0f00d125fc711db9e65d54dcc884a72e";
(node as any).hash = "496614376a52d4557bcb06057863554e";
export default node;

View File

@@ -1,5 +1,5 @@
/**
* @generated SignedSource<<8982230c048c28cb211d5368b1ab43a0>>
* @generated SignedSource<<fc98d690c8825d5c202355ffd63a4244>>
* @lightSyntaxTransform
* @nogrep
*/
@@ -10,19 +10,30 @@
import { ConcreteRequest } from 'relay-runtime';
import { FragmentRefs } from "relay-runtime";
export type DocumentGraphListQuery$variables = {
export type DocumentsPageQuery$variables = {
organizationId: string;
};
export type DocumentGraphListQuery$data = {
export type DocumentsPageQuery$data = {
readonly organization: {
readonly canCreateDocument?: boolean;
readonly id: string;
readonly " $fragmentSpreads": FragmentRefs<"DocumentsPageListFragment">;
readonly __typename: "Organization";
readonly canCreateDocument: boolean;
readonly documents: {
readonly edges: ReadonlyArray<{
readonly node: {
readonly canSendSigningNotifications: boolean;
};
}>;
};
readonly " $fragmentSpreads": FragmentRefs<"DocumentListFragment">;
} | {
// This will never be '%other', but we need some
// value in case none of the concrete values match.
readonly __typename: "%other";
};
};
export type DocumentGraphListQuery = {
response: DocumentGraphListQuery$data;
variables: DocumentGraphListQuery$variables;
export type DocumentsPageQuery = {
response: DocumentsPageQuery$data;
variables: DocumentsPageQuery$variables;
};
const node: ConcreteRequest = (function(){
@@ -44,7 +55,7 @@ v2 = {
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "id",
"name": "__typename",
"storageKey": null
},
v3 = {
@@ -61,33 +72,48 @@ v3 = {
"storageKey": "permission(action:\"core:document:create\")"
},
v4 = {
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "__typename",
"storageKey": null
"kind": "Literal",
"name": "first",
"value": 50
},
v5 = [
{
"kind": "Literal",
"name": "first",
"value": 50
},
v5 = {
"direction": "ASC",
"field": "TITLE"
},
v6 = [
(v4/*: any*/),
{
"kind": "Literal",
"name": "orderBy",
"value": {
"direction": "ASC",
"field": "TITLE"
}
"value": (v5/*: any*/)
}
];
],
v7 = {
"alias": "canSendSigningNotifications",
"args": [
{
"kind": "Literal",
"name": "action",
"value": "core:document:send-signing-notifications"
}
],
"kind": "ScalarField",
"name": "permission",
"storageKey": "permission(action:\"core:document:send-signing-notifications\")"
},
v8 = {
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "id",
"storageKey": null
};
return {
"fragment": {
"argumentDefinitions": (v0/*: any*/),
"kind": "Fragment",
"metadata": null,
"name": "DocumentGraphListQuery",
"name": "DocumentsPageQuery",
"selections": [
{
"alias": "organization",
@@ -103,44 +129,20 @@ return {
"selections": [
(v3/*: any*/),
{
"args": null,
"args": [
(v4/*: any*/),
{
"kind": "Literal",
"name": "order",
"value": (v5/*: any*/)
}
],
"kind": "FragmentSpread",
"name": "DocumentsPageListFragment"
}
],
"type": "Organization",
"abstractKey": null
}
],
"storageKey": null
}
],
"type": "Query",
"abstractKey": null
},
"kind": "Request",
"operation": {
"argumentDefinitions": (v0/*: any*/),
"kind": "Operation",
"name": "DocumentGraphListQuery",
"selections": [
{
"alias": "organization",
"args": (v1/*: any*/),
"concreteType": null,
"kind": "LinkedField",
"name": "node",
"plural": false,
"selections": [
(v4/*: any*/),
(v2/*: any*/),
{
"kind": "InlineFragment",
"selections": [
(v3/*: any*/),
"name": "DocumentListFragment"
},
{
"alias": null,
"args": (v5/*: any*/),
"args": (v6/*: any*/),
"concreteType": "DocumentConnection",
"kind": "LinkedField",
"name": "documents",
@@ -162,7 +164,72 @@ return {
"name": "node",
"plural": false,
"selections": [
(v2/*: any*/),
(v7/*: any*/)
],
"storageKey": null
}
],
"storageKey": null
}
],
"storageKey": "documents(first:50,orderBy:{\"direction\":\"ASC\",\"field\":\"TITLE\"})"
}
],
"type": "Organization",
"abstractKey": null
}
],
"storageKey": null
}
],
"type": "Query",
"abstractKey": null
},
"kind": "Request",
"operation": {
"argumentDefinitions": (v0/*: any*/),
"kind": "Operation",
"name": "DocumentsPageQuery",
"selections": [
{
"alias": "organization",
"args": (v1/*: any*/),
"concreteType": null,
"kind": "LinkedField",
"name": "node",
"plural": false,
"selections": [
(v2/*: any*/),
(v8/*: any*/),
{
"kind": "InlineFragment",
"selections": [
(v3/*: any*/),
{
"alias": null,
"args": (v6/*: any*/),
"concreteType": "DocumentConnection",
"kind": "LinkedField",
"name": "documents",
"plural": false,
"selections": [
{
"alias": null,
"args": null,
"concreteType": "DocumentEdge",
"kind": "LinkedField",
"name": "edges",
"plural": true,
"selections": [
{
"alias": null,
"args": null,
"concreteType": "Document",
"kind": "LinkedField",
"name": "node",
"plural": false,
"selections": [
(v8/*: any*/),
{
"alias": "canUpdate",
"args": [
@@ -189,19 +256,6 @@ return {
"name": "permission",
"storageKey": "permission(action:\"core:document:delete\")"
},
{
"alias": "canSendSigningNotifications",
"args": [
{
"kind": "Literal",
"name": "action",
"value": "core:document:send-signing-notifications"
}
],
"kind": "ScalarField",
"name": "permission",
"storageKey": "permission(action:\"core:document:send-signing-notifications\")"
},
{
"alias": "canRequestSignatures",
"args": [
@@ -222,13 +276,6 @@ return {
"name": "title",
"storageKey": null
},
{
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "description",
"storageKey": null
},
{
"alias": null,
"args": null,
@@ -258,7 +305,7 @@ return {
"name": "owner",
"plural": false,
"selections": [
(v2/*: any*/),
(v8/*: any*/),
{
"alias": null,
"args": null,
@@ -299,7 +346,7 @@ return {
"name": "node",
"plural": false,
"selections": [
(v2/*: any*/),
(v8/*: any*/),
{
"alias": null,
"args": null,
@@ -344,7 +391,7 @@ return {
"name": "node",
"plural": false,
"selections": [
(v2/*: any*/),
(v8/*: any*/),
{
"alias": null,
"args": null,
@@ -370,7 +417,8 @@ return {
],
"storageKey": "versions(first:1)"
},
(v4/*: any*/)
(v2/*: any*/),
(v7/*: any*/)
],
"storageKey": null
},
@@ -440,7 +488,7 @@ return {
},
{
"alias": null,
"args": (v5/*: any*/),
"args": (v6/*: any*/),
"filters": [
"orderBy"
],
@@ -459,16 +507,16 @@ return {
]
},
"params": {
"cacheID": "7c027bc02697b43718813a5bd024985a",
"cacheID": "2ff9e1818d86d64d512a54ec9acebb16",
"id": null,
"metadata": {},
"name": "DocumentGraphListQuery",
"name": "DocumentsPageQuery",
"operationKind": "query",
"text": "query DocumentGraphListQuery(\n $organizationId: ID!\n) {\n organization: node(id: $organizationId) {\n __typename\n id\n ... on Organization {\n canCreateDocument: permission(action: \"core:document:create\")\n ...DocumentsPageListFragment\n }\n }\n}\n\nfragment DocumentsPageListFragment on Organization {\n documents(first: 50, orderBy: {field: TITLE, direction: ASC}) {\n edges {\n node {\n id\n canUpdate: permission(action: \"core:document:update\")\n canDelete: permission(action: \"core:document:delete\")\n canSendSigningNotifications: permission(action: \"core:document:send-signing-notifications\")\n canRequestSignatures: permission(action: \"core:document-version:request-signature\")\n ...DocumentsPageRowFragment\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n hasPreviousPage\n startCursor\n }\n }\n id\n}\n\nfragment DocumentsPageRowFragment on Document {\n id\n title\n description\n documentType\n classification\n updatedAt\n canDelete: permission(action: \"core:document:delete\")\n owner {\n id\n fullName\n }\n versions(first: 1) {\n edges {\n node {\n id\n status\n version\n signatures(first: 1000) {\n edges {\n node {\n id\n state\n }\n }\n }\n }\n }\n }\n}\n"
"text": "query DocumentsPageQuery(\n $organizationId: ID!\n) {\n organization: node(id: $organizationId) {\n __typename\n ... on Organization {\n canCreateDocument: permission(action: \"core:document:create\")\n ...DocumentListFragment_1WMmEg\n documents(first: 50, orderBy: {field: TITLE, direction: ASC}) {\n edges {\n node {\n canSendSigningNotifications: permission(action: \"core:document:send-signing-notifications\")\n id\n }\n }\n }\n }\n id\n }\n}\n\nfragment DocumentListFragment_1WMmEg on Organization {\n documents(first: 50, orderBy: {field: TITLE, direction: ASC}) {\n edges {\n node {\n id\n canUpdate: permission(action: \"core:document:update\")\n canDelete: permission(action: \"core:document:delete\")\n canRequestSignatures: permission(action: \"core:document-version:request-signature\")\n ...DocumentListItemFragment\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n hasPreviousPage\n startCursor\n }\n }\n id\n}\n\nfragment DocumentListItemFragment on Document {\n id\n title\n documentType\n classification\n updatedAt\n canDelete: permission(action: \"core:document:delete\")\n owner {\n id\n fullName\n }\n versions(first: 1) {\n edges {\n node {\n id\n status\n version\n signatures(first: 1000) {\n edges {\n node {\n id\n state\n }\n }\n }\n }\n }\n }\n}\n"
}
};
})();
(node as any).hash = "26c7d375cb354649741ce4794612b3e1";
(node as any).hash = "03658a05617ef4f971ed6b0c2758fa87";
export default node;

View File

@@ -0,0 +1,153 @@
/**
* @generated SignedSource<<594acd2efe2323614220c1898b2e2cc9>>
* @lightSyntaxTransform
* @nogrep
*/
/* tslint:disable */
/* eslint-disable */
// @ts-nocheck
import { ConcreteRequest } from 'relay-runtime';
export type CreateApplicabilityStatementInput = {
applicability: boolean;
controlId: string;
justification?: string | null | undefined;
stateOfApplicabilityId: string;
};
export type LinkControlDialogLinkMutation$variables = {
input: CreateApplicabilityStatementInput;
};
export type LinkControlDialogLinkMutation$data = {
readonly createApplicabilityStatement: {
readonly applicabilityStatementEdge: {
readonly node: {
readonly applicability: boolean;
readonly control: {
readonly id: string;
};
readonly id: string;
readonly justification: string;
};
};
};
};
export type LinkControlDialogLinkMutation = {
response: LinkControlDialogLinkMutation$data;
variables: LinkControlDialogLinkMutation$variables;
};
const node: ConcreteRequest = (function(){
var v0 = [
{
"defaultValue": null,
"kind": "LocalArgument",
"name": "input"
}
],
v1 = {
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "id",
"storageKey": null
},
v2 = [
{
"alias": null,
"args": [
{
"kind": "Variable",
"name": "input",
"variableName": "input"
}
],
"concreteType": "CreateApplicabilityStatementPayload",
"kind": "LinkedField",
"name": "createApplicabilityStatement",
"plural": false,
"selections": [
{
"alias": null,
"args": null,
"concreteType": "ApplicabilityStatementEdge",
"kind": "LinkedField",
"name": "applicabilityStatementEdge",
"plural": false,
"selections": [
{
"alias": null,
"args": null,
"concreteType": "ApplicabilityStatement",
"kind": "LinkedField",
"name": "node",
"plural": false,
"selections": [
(v1/*: any*/),
{
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "applicability",
"storageKey": null
},
{
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "justification",
"storageKey": null
},
{
"alias": null,
"args": null,
"concreteType": "Control",
"kind": "LinkedField",
"name": "control",
"plural": false,
"selections": [
(v1/*: any*/)
],
"storageKey": null
}
],
"storageKey": null
}
],
"storageKey": null
}
],
"storageKey": null
}
];
return {
"fragment": {
"argumentDefinitions": (v0/*: any*/),
"kind": "Fragment",
"metadata": null,
"name": "LinkControlDialogLinkMutation",
"selections": (v2/*: any*/),
"type": "Mutation",
"abstractKey": null
},
"kind": "Request",
"operation": {
"argumentDefinitions": (v0/*: any*/),
"kind": "Operation",
"name": "LinkControlDialogLinkMutation",
"selections": (v2/*: any*/)
},
"params": {
"cacheID": "bc215d6cb4d4aa2b0396f06797f6fbfe",
"id": null,
"metadata": {},
"name": "LinkControlDialogLinkMutation",
"operationKind": "mutation",
"text": "mutation LinkControlDialogLinkMutation(\n $input: CreateApplicabilityStatementInput!\n) {\n createApplicabilityStatement(input: $input) {\n applicabilityStatementEdge {\n node {\n id\n applicability\n justification\n control {\n id\n }\n }\n }\n }\n}\n"
}
};
})();
(node as any).hash = "0d4c01841f5e34d1c0d5517770486985";
export default node;

View File

@@ -0,0 +1,352 @@
/**
* @generated SignedSource<<f51d061c1d9a85eaa1258b4b4bd269a6>>
* @lightSyntaxTransform
* @nogrep
*/
/* tslint:disable */
/* eslint-disable */
// @ts-nocheck
import { ConcreteRequest } from 'relay-runtime';
export type LinkControlDialogQuery$variables = {
organizationId: string;
stateOfApplicabilityId: string;
};
export type LinkControlDialogQuery$data = {
readonly organization: {
readonly controls?: {
readonly edges: ReadonlyArray<{
readonly node: {
readonly framework: {
readonly id: string;
readonly name: string;
};
readonly id: string;
readonly name: string;
readonly sectionTitle: string;
};
}>;
};
readonly id?: string;
};
readonly stateOfApplicability: {
readonly applicabilityStatements?: {
readonly edges: ReadonlyArray<{
readonly node: {
readonly applicability: boolean;
readonly control: {
readonly id: string;
};
readonly id: string;
readonly justification: string;
};
}>;
};
readonly id?: string;
};
};
export type LinkControlDialogQuery = {
response: LinkControlDialogQuery$data;
variables: LinkControlDialogQuery$variables;
};
const node: ConcreteRequest = (function(){
var v0 = {
"defaultValue": null,
"kind": "LocalArgument",
"name": "organizationId"
},
v1 = {
"defaultValue": null,
"kind": "LocalArgument",
"name": "stateOfApplicabilityId"
},
v2 = [
{
"kind": "Variable",
"name": "id",
"variableName": "stateOfApplicabilityId"
}
],
v3 = {
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "id",
"storageKey": null
},
v4 = {
"kind": "Literal",
"name": "first",
"value": 10000
},
v5 = {
"alias": null,
"args": [
(v4/*: any*/)
],
"concreteType": "ApplicabilityStatementConnection",
"kind": "LinkedField",
"name": "applicabilityStatements",
"plural": false,
"selections": [
{
"alias": null,
"args": null,
"concreteType": "ApplicabilityStatementEdge",
"kind": "LinkedField",
"name": "edges",
"plural": true,
"selections": [
{
"alias": null,
"args": null,
"concreteType": "ApplicabilityStatement",
"kind": "LinkedField",
"name": "node",
"plural": false,
"selections": [
(v3/*: any*/),
{
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "applicability",
"storageKey": null
},
{
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "justification",
"storageKey": null
},
{
"alias": null,
"args": null,
"concreteType": "Control",
"kind": "LinkedField",
"name": "control",
"plural": false,
"selections": [
(v3/*: any*/)
],
"storageKey": null
}
],
"storageKey": null
}
],
"storageKey": null
}
],
"storageKey": "applicabilityStatements(first:10000)"
},
v6 = [
{
"kind": "Variable",
"name": "id",
"variableName": "organizationId"
}
],
v7 = {
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "name",
"storageKey": null
},
v8 = {
"alias": null,
"args": [
(v4/*: any*/),
{
"kind": "Literal",
"name": "orderBy",
"value": {
"direction": "ASC",
"field": "CREATED_AT"
}
}
],
"concreteType": "ControlConnection",
"kind": "LinkedField",
"name": "controls",
"plural": false,
"selections": [
{
"alias": null,
"args": null,
"concreteType": "ControlEdge",
"kind": "LinkedField",
"name": "edges",
"plural": true,
"selections": [
{
"alias": null,
"args": null,
"concreteType": "Control",
"kind": "LinkedField",
"name": "node",
"plural": false,
"selections": [
(v3/*: any*/),
{
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "sectionTitle",
"storageKey": null
},
(v7/*: any*/),
{
"alias": null,
"args": null,
"concreteType": "Framework",
"kind": "LinkedField",
"name": "framework",
"plural": false,
"selections": [
(v3/*: any*/),
(v7/*: any*/)
],
"storageKey": null
}
],
"storageKey": null
}
],
"storageKey": null
}
],
"storageKey": "controls(first:10000,orderBy:{\"direction\":\"ASC\",\"field\":\"CREATED_AT\"})"
},
v9 = {
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "__typename",
"storageKey": null
};
return {
"fragment": {
"argumentDefinitions": [
(v0/*: any*/),
(v1/*: any*/)
],
"kind": "Fragment",
"metadata": null,
"name": "LinkControlDialogQuery",
"selections": [
{
"alias": "stateOfApplicability",
"args": (v2/*: any*/),
"concreteType": null,
"kind": "LinkedField",
"name": "node",
"plural": false,
"selections": [
{
"kind": "InlineFragment",
"selections": [
(v3/*: any*/),
(v5/*: any*/)
],
"type": "StateOfApplicability",
"abstractKey": null
}
],
"storageKey": null
},
{
"alias": "organization",
"args": (v6/*: any*/),
"concreteType": null,
"kind": "LinkedField",
"name": "node",
"plural": false,
"selections": [
{
"kind": "InlineFragment",
"selections": [
(v3/*: any*/),
(v8/*: any*/)
],
"type": "Organization",
"abstractKey": null
}
],
"storageKey": null
}
],
"type": "Query",
"abstractKey": null
},
"kind": "Request",
"operation": {
"argumentDefinitions": [
(v1/*: any*/),
(v0/*: any*/)
],
"kind": "Operation",
"name": "LinkControlDialogQuery",
"selections": [
{
"alias": "stateOfApplicability",
"args": (v2/*: any*/),
"concreteType": null,
"kind": "LinkedField",
"name": "node",
"plural": false,
"selections": [
(v9/*: any*/),
(v3/*: any*/),
{
"kind": "InlineFragment",
"selections": [
(v5/*: any*/)
],
"type": "StateOfApplicability",
"abstractKey": null
}
],
"storageKey": null
},
{
"alias": "organization",
"args": (v6/*: any*/),
"concreteType": null,
"kind": "LinkedField",
"name": "node",
"plural": false,
"selections": [
(v9/*: any*/),
(v3/*: any*/),
{
"kind": "InlineFragment",
"selections": [
(v8/*: any*/)
],
"type": "Organization",
"abstractKey": null
}
],
"storageKey": null
}
]
},
"params": {
"cacheID": "c8285ce8c2d39a2ac658d411b2fdc0db",
"id": null,
"metadata": {},
"name": "LinkControlDialogQuery",
"operationKind": "query",
"text": "query LinkControlDialogQuery(\n $stateOfApplicabilityId: ID!\n $organizationId: ID!\n) {\n stateOfApplicability: node(id: $stateOfApplicabilityId) {\n __typename\n ... on StateOfApplicability {\n id\n applicabilityStatements(first: 10000) {\n edges {\n node {\n id\n applicability\n justification\n control {\n id\n }\n }\n }\n }\n }\n id\n }\n organization: node(id: $organizationId) {\n __typename\n ... on Organization {\n id\n controls(first: 10000, orderBy: {direction: ASC, field: CREATED_AT}) {\n edges {\n node {\n id\n sectionTitle\n name\n framework {\n id\n name\n }\n }\n }\n }\n }\n id\n }\n}\n"
}
};
})();
(node as any).hash = "768c1d7c983124ca25e74d7378f83097";
export default node;

View File

@@ -0,0 +1,92 @@
/**
* @generated SignedSource<<c129078380fd3f65393dc60cb30e12f5>>
* @lightSyntaxTransform
* @nogrep
*/
/* tslint:disable */
/* eslint-disable */
// @ts-nocheck
import { ConcreteRequest } from 'relay-runtime';
export type DeleteApplicabilityStatementInput = {
applicabilityStatementId: string;
};
export type LinkControlDialogUnlinkMutation$variables = {
input: DeleteApplicabilityStatementInput;
};
export type LinkControlDialogUnlinkMutation$data = {
readonly deleteApplicabilityStatement: {
readonly deletedApplicabilityStatementId: string;
};
};
export type LinkControlDialogUnlinkMutation = {
response: LinkControlDialogUnlinkMutation$data;
variables: LinkControlDialogUnlinkMutation$variables;
};
const node: ConcreteRequest = (function(){
var v0 = [
{
"defaultValue": null,
"kind": "LocalArgument",
"name": "input"
}
],
v1 = [
{
"alias": null,
"args": [
{
"kind": "Variable",
"name": "input",
"variableName": "input"
}
],
"concreteType": "DeleteApplicabilityStatementPayload",
"kind": "LinkedField",
"name": "deleteApplicabilityStatement",
"plural": false,
"selections": [
{
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "deletedApplicabilityStatementId",
"storageKey": null
}
],
"storageKey": null
}
];
return {
"fragment": {
"argumentDefinitions": (v0/*: any*/),
"kind": "Fragment",
"metadata": null,
"name": "LinkControlDialogUnlinkMutation",
"selections": (v1/*: any*/),
"type": "Mutation",
"abstractKey": null
},
"kind": "Request",
"operation": {
"argumentDefinitions": (v0/*: any*/),
"kind": "Operation",
"name": "LinkControlDialogUnlinkMutation",
"selections": (v1/*: any*/)
},
"params": {
"cacheID": "560cb4342a2a277881705e91b5b6a17c",
"id": null,
"metadata": {},
"name": "LinkControlDialogUnlinkMutation",
"operationKind": "mutation",
"text": "mutation LinkControlDialogUnlinkMutation(\n $input: DeleteApplicabilityStatementInput!\n) {\n deleteApplicabilityStatement(input: $input) {\n deletedApplicabilityStatementId\n }\n}\n"
}
};
})();
(node as any).hash = "80dd4efb13f7b677ad62792150ca70d9";
export default node;

View File

@@ -1,5 +1,5 @@
/**
* @generated SignedSource<<032b44ec9c5c4d5fc0281269dad54098>>
* @generated SignedSource<<3fb1661c5bda6573c377f516b970643a>>
* @lightSyntaxTransform
* @nogrep
*/
@@ -22,7 +22,7 @@ export type PublishDocumentsDialogMutation$data = {
readonly documentEdges: ReadonlyArray<{
readonly node: {
readonly id: string;
readonly " $fragmentSpreads": FragmentRefs<"DocumentsPageRowFragment">;
readonly " $fragmentSpreads": FragmentRefs<"DocumentListItemFragment">;
};
}>;
};
@@ -89,7 +89,7 @@ return {
{
"args": null,
"kind": "FragmentSpread",
"name": "DocumentsPageRowFragment"
"name": "DocumentListItemFragment"
}
],
"storageKey": null
@@ -142,13 +142,6 @@ return {
"name": "title",
"storageKey": null
},
{
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "description",
"storageKey": null
},
{
"alias": null,
"args": null,
@@ -315,16 +308,16 @@ return {
]
},
"params": {
"cacheID": "56634e96a607e273bf269d4720cd75d9",
"cacheID": "9e790eaab9b8c776beb9d021942bdf22",
"id": null,
"metadata": {},
"name": "PublishDocumentsDialogMutation",
"operationKind": "mutation",
"text": "mutation PublishDocumentsDialogMutation(\n $input: BulkPublishDocumentVersionsInput!\n) {\n bulkPublishDocumentVersions(input: $input) {\n documentEdges {\n node {\n id\n ...DocumentsPageRowFragment\n }\n }\n }\n}\n\nfragment DocumentsPageRowFragment on Document {\n id\n title\n description\n documentType\n classification\n updatedAt\n canDelete: permission(action: \"core:document:delete\")\n owner {\n id\n fullName\n }\n versions(first: 1) {\n edges {\n node {\n id\n status\n version\n signatures(first: 1000) {\n edges {\n node {\n id\n state\n }\n }\n }\n }\n }\n }\n}\n"
"text": "mutation PublishDocumentsDialogMutation(\n $input: BulkPublishDocumentVersionsInput!\n) {\n bulkPublishDocumentVersions(input: $input) {\n documentEdges {\n node {\n id\n ...DocumentListItemFragment\n }\n }\n }\n}\n\nfragment DocumentListItemFragment on Document {\n id\n title\n documentType\n classification\n updatedAt\n canDelete: permission(action: \"core:document:delete\")\n owner {\n id\n fullName\n }\n versions(first: 1) {\n edges {\n node {\n id\n status\n version\n signatures(first: 1000) {\n edges {\n node {\n id\n state\n }\n }\n }\n }\n }\n }\n}\n"
}
};
})();
(node as any).hash = "c9d699258bb8638d5474ab5e6b5e4585";
(node as any).hash = "c28e9ea550947901058300bc4ba8f7f1";
export default node;