Rename owner by approver

Document owner does not make sense it's more an document approver.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
This commit is contained in:
Bryan Frimin
2026-02-13 10:12:48 +01:00
committed by Sacha Al Himdani
parent 891d607602
commit 3d8c7c4dd6
32 changed files with 301 additions and 296 deletions

View File

@@ -1,5 +1,5 @@
/**
* @generated SignedSource<<499820c9df6a66e5a4969b593e6f257c>>
* @generated SignedSource<<91bce548869c16de31b1edc3445874d2>>
* @lightSyntaxTransform
* @nogrep
*/
@@ -14,11 +14,11 @@ export type DocumentClassification = "CONFIDENTIAL" | "INTERNAL" | "PUBLIC" | "S
export type DocumentType = "ISMS" | "OTHER" | "POLICY" | "PROCEDURE";
export type TrustCenterVisibility = "NONE" | "PRIVATE" | "PUBLIC";
export type UpdateDocumentInput = {
approverId?: string | null | undefined;
classification?: DocumentClassification | null | undefined;
content?: string | null | undefined;
documentType?: DocumentType | null | undefined;
id: string;
ownerId?: string | null | undefined;
title?: string | null | undefined;
trustCenterVisibility?: TrustCenterVisibility | null | undefined;
};

View File

@@ -1,5 +1,5 @@
/**
* @generated SignedSource<<922a06289e517787e87d62f788a0cbd7>>
* @generated SignedSource<<4aabb7a5e515082b00152627b1f7c2f1>>
* @lightSyntaxTransform
* @nogrep
*/
@@ -14,11 +14,11 @@ export type DocumentClassification = "CONFIDENTIAL" | "INTERNAL" | "PUBLIC" | "S
export type DocumentType = "ISMS" | "OTHER" | "POLICY" | "PROCEDURE";
export type TrustCenterVisibility = "NONE" | "PRIVATE" | "PUBLIC";
export type CreateDocumentInput = {
approverId: string;
classification: DocumentClassification;
content: string;
documentType: DocumentType;
organizationId: string;
ownerId: string;
title: string;
trustCenterVisibility?: TrustCenterVisibility | null | undefined;
};
@@ -213,7 +213,7 @@ return {
"args": null,
"concreteType": "Profile",
"kind": "LinkedField",
"name": "owner",
"name": "approver",
"plural": false,
"selections": [
(v3/*: any*/),
@@ -358,12 +358,12 @@ return {
]
},
"params": {
"cacheID": "089c02e59ef9b51883dd556df68891b9",
"cacheID": "1ec326debfa93388837c2779cb693dca",
"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 ...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 lastVersion: versions(first: 1, orderBy: {field: CREATED_AT, direction: DESC}) {\n edges {\n node {\n id\n status\n version\n signatures(first: 0, filter: {activeContract: true}) {\n totalCount\n }\n signedSignatures: signatures(first: 0, filter: {states: [SIGNED], activeContract: true}) {\n totalCount\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 approver {\n id\n fullName\n }\n lastVersion: versions(first: 1, orderBy: {field: CREATED_AT, direction: DESC}) {\n edges {\n node {\n id\n status\n version\n signatures(first: 0, filter: {activeContract: true}) {\n totalCount\n }\n signedSignatures: signatures(first: 0, filter: {states: [SIGNED], activeContract: true}) {\n totalCount\n }\n }\n }\n }\n}\n"
}
};
})();

View File

@@ -1,5 +1,5 @@
/**
* @generated SignedSource<<334e066f78a528494ef5c68d088c002a>>
* @generated SignedSource<<5cb0be6e5ab775bdf7d509d9789e9821>>
* @lightSyntaxTransform
* @nogrep
*/
@@ -13,11 +13,11 @@ export type DocumentClassification = "CONFIDENTIAL" | "INTERNAL" | "PUBLIC" | "S
export type DocumentType = "ISMS" | "OTHER" | "POLICY" | "PROCEDURE";
export type TrustCenterVisibility = "NONE" | "PRIVATE" | "PUBLIC";
export type UpdateDocumentInput = {
approverId?: string | null | undefined;
classification?: DocumentClassification | null | undefined;
content?: string | null | undefined;
documentType?: DocumentType | null | undefined;
id: string;
ownerId?: string | null | undefined;
title?: string | null | undefined;
trustCenterVisibility?: TrustCenterVisibility | null | undefined;
};
@@ -27,13 +27,13 @@ export type DocumentLayoutDrawerMutation$variables = {
export type DocumentLayoutDrawerMutation$data = {
readonly updateDocument: {
readonly document: {
readonly classification: DocumentClassification;
readonly documentType: DocumentType;
readonly id: string;
readonly owner: {
readonly approver: {
readonly fullName: string;
readonly id: string;
};
readonly classification: DocumentClassification;
readonly documentType: DocumentType;
readonly id: string;
};
};
};
@@ -100,7 +100,7 @@ v2 = [
"args": null,
"concreteType": "Profile",
"kind": "LinkedField",
"name": "owner",
"name": "approver",
"plural": false,
"selections": [
(v1/*: any*/),
@@ -139,16 +139,16 @@ return {
"selections": (v2/*: any*/)
},
"params": {
"cacheID": "968dc4701234cb6c5761eeea9faff752",
"cacheID": "717ce480e61acba39409ff42ee5344cb",
"id": null,
"metadata": {},
"name": "DocumentLayoutDrawerMutation",
"operationKind": "mutation",
"text": "mutation DocumentLayoutDrawerMutation(\n $input: UpdateDocumentInput!\n) {\n updateDocument(input: $input) {\n document {\n id\n documentType\n classification\n owner {\n id\n fullName\n }\n }\n }\n}\n"
"text": "mutation DocumentLayoutDrawerMutation(\n $input: UpdateDocumentInput!\n) {\n updateDocument(input: $input) {\n document {\n id\n documentType\n classification\n approver {\n id\n fullName\n }\n }\n }\n}\n"
}
};
})();
(node as any).hash = "80901db65cb0c486e23b823bd2c16bc0";
(node as any).hash = "815cb617b0685f018afe95e97c910771";
export default node;

View File

@@ -1,5 +1,5 @@
/**
* @generated SignedSource<<02a8fd2b19d7f7fdc180b373fa0b17c9>>
* @generated SignedSource<<a1338ba7fb986ab8e4f5d1e0355a4671>>
* @lightSyntaxTransform
* @nogrep
*/
@@ -13,12 +13,12 @@ export type DocumentClassification = "CONFIDENTIAL" | "INTERNAL" | "PUBLIC" | "S
export type DocumentStatus = "DRAFT" | "PUBLISHED";
import { FragmentRefs } from "relay-runtime";
export type DocumentLayoutDrawer_versionFragment$data = {
readonly classification: DocumentClassification;
readonly id: string;
readonly owner: {
readonly approver: {
readonly fullName: string;
readonly id: string;
};
readonly classification: DocumentClassification;
readonly id: string;
readonly publishedAt: string | null | undefined;
readonly status: DocumentStatus;
readonly updatedAt: string;
@@ -57,7 +57,7 @@ return {
"args": null,
"concreteType": "Profile",
"kind": "LinkedField",
"name": "owner",
"name": "approver",
"plural": false,
"selections": [
(v0/*: any*/),
@@ -105,6 +105,6 @@ return {
};
})();
(node as any).hash = "f5e9183b163586bab18475a19843b186";
(node as any).hash = "63b956326e98c7620715250f4e7d1129";
export default node;

View File

@@ -1,5 +1,5 @@
/**
* @generated SignedSource<<de8021b4f5b3813e939cdcd787fb254c>>
* @generated SignedSource<<41d49c06d7dfad15f6c1d39cd9eddc80>>
* @lightSyntaxTransform
* @nogrep
*/
@@ -279,7 +279,7 @@ v20 = {
"args": null,
"concreteType": "Profile",
"kind": "LinkedField",
"name": "owner",
"name": "approver",
"plural": false,
"selections": [
(v3/*: any*/),
@@ -668,12 +668,12 @@ return {
]
},
"params": {
"cacheID": "d59daf2c6257e5a744e20896c646fc38",
"cacheID": "3e4d94e71ac7cf5c557b5ee59e0917ed",
"id": null,
"metadata": {},
"name": "DocumentLayoutQuery",
"operationKind": "query",
"text": "query DocumentLayoutQuery(\n $documentId: ID!\n $versionId: ID!\n $versionSpecified: Boolean!\n) {\n version: node(id: $versionId) @include(if: $versionSpecified) {\n __typename\n ... on DocumentVersion {\n id\n status\n ...DocumentActionsDropdown_versionFragment\n ...DocumentLayoutDrawer_versionFragment\n signatures(first: 0, filter: {activeContract: true}) {\n totalCount\n }\n signedSignatures: signatures(first: 0, filter: {states: [SIGNED], activeContract: true}) {\n totalCount\n }\n }\n id\n }\n document: node(id: $documentId) {\n __typename\n ... on Document {\n id\n title\n canPublish: permission(action: \"core:document-version:publish\")\n controlInfo: controls(first: 0) {\n totalCount\n }\n ...DocumentTitleFormFragment\n ...DocumentActionsDropdown_documentFragment\n ...DocumentLayoutDrawer_documentFragment\n lastVersion: versions(first: 1, orderBy: {field: CREATED_AT, direction: DESC}) @skip(if: $versionSpecified) {\n edges {\n node {\n id\n status\n ...DocumentActionsDropdown_versionFragment\n ...DocumentLayoutDrawer_versionFragment\n signatures(first: 0, filter: {activeContract: true}) {\n totalCount\n }\n signedSignatures: signatures(first: 0, filter: {states: [SIGNED], activeContract: true}) {\n totalCount\n }\n }\n }\n }\n }\n id\n }\n}\n\nfragment DocumentActionsDropdown_documentFragment on Document {\n id\n title\n canUpdate: permission(action: \"core:document:update\")\n canDelete: permission(action: \"core:document:delete\")\n versions(first: 20) {\n totalCount\n }\n ...UpdateVersionDialogFragment\n}\n\nfragment DocumentActionsDropdown_versionFragment on DocumentVersion {\n id\n version\n status\n canDeleteDraft: permission(action: \"core:document-version:delete-draft\")\n}\n\nfragment DocumentLayoutDrawer_documentFragment on Document {\n id\n documentType\n canUpdate: permission(action: \"core:document:update\")\n}\n\nfragment DocumentLayoutDrawer_versionFragment on DocumentVersion {\n id\n classification\n owner {\n id\n fullName\n }\n version\n status\n updatedAt\n publishedAt\n}\n\nfragment DocumentTitleFormFragment on Document {\n id\n title\n canUpdate: permission(action: \"core:document:update\")\n}\n\nfragment UpdateVersionDialogFragment on Document {\n id\n versions(first: 20) {\n edges {\n node {\n id\n status\n content\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n }\n }\n}\n"
"text": "query DocumentLayoutQuery(\n $documentId: ID!\n $versionId: ID!\n $versionSpecified: Boolean!\n) {\n version: node(id: $versionId) @include(if: $versionSpecified) {\n __typename\n ... on DocumentVersion {\n id\n status\n ...DocumentActionsDropdown_versionFragment\n ...DocumentLayoutDrawer_versionFragment\n signatures(first: 0, filter: {activeContract: true}) {\n totalCount\n }\n signedSignatures: signatures(first: 0, filter: {states: [SIGNED], activeContract: true}) {\n totalCount\n }\n }\n id\n }\n document: node(id: $documentId) {\n __typename\n ... on Document {\n id\n title\n canPublish: permission(action: \"core:document-version:publish\")\n controlInfo: controls(first: 0) {\n totalCount\n }\n ...DocumentTitleFormFragment\n ...DocumentActionsDropdown_documentFragment\n ...DocumentLayoutDrawer_documentFragment\n lastVersion: versions(first: 1, orderBy: {field: CREATED_AT, direction: DESC}) @skip(if: $versionSpecified) {\n edges {\n node {\n id\n status\n ...DocumentActionsDropdown_versionFragment\n ...DocumentLayoutDrawer_versionFragment\n signatures(first: 0, filter: {activeContract: true}) {\n totalCount\n }\n signedSignatures: signatures(first: 0, filter: {states: [SIGNED], activeContract: true}) {\n totalCount\n }\n }\n }\n }\n }\n id\n }\n}\n\nfragment DocumentActionsDropdown_documentFragment on Document {\n id\n title\n canUpdate: permission(action: \"core:document:update\")\n canDelete: permission(action: \"core:document:delete\")\n versions(first: 20) {\n totalCount\n }\n ...UpdateVersionDialogFragment\n}\n\nfragment DocumentActionsDropdown_versionFragment on DocumentVersion {\n id\n version\n status\n canDeleteDraft: permission(action: \"core:document-version:delete-draft\")\n}\n\nfragment DocumentLayoutDrawer_documentFragment on Document {\n id\n documentType\n canUpdate: permission(action: \"core:document:update\")\n}\n\nfragment DocumentLayoutDrawer_versionFragment on DocumentVersion {\n id\n classification\n approver {\n id\n fullName\n }\n version\n status\n updatedAt\n publishedAt\n}\n\nfragment DocumentTitleFormFragment on Document {\n id\n title\n canUpdate: permission(action: \"core:document:update\")\n}\n\nfragment UpdateVersionDialogFragment on Document {\n id\n versions(first: 20) {\n edges {\n node {\n id\n status\n content\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n }\n }\n}\n"
}
};
})();

View File

@@ -1,5 +1,5 @@
/**
* @generated SignedSource<<7dc6855a815d76f559d0efe4a8b34c66>>
* @generated SignedSource<<ac954cbaf8e5e859cbf2112ce60b3047>>
* @lightSyntaxTransform
* @nogrep
*/
@@ -14,6 +14,10 @@ export type DocumentStatus = "DRAFT" | "PUBLISHED";
export type DocumentType = "ISMS" | "OTHER" | "POLICY" | "PROCEDURE";
import { FragmentRefs } from "relay-runtime";
export type DocumentListItemFragment$data = {
readonly approver: {
readonly fullName: string;
readonly id: string;
};
readonly canDelete: boolean;
readonly classification: DocumentClassification;
readonly documentType: DocumentType;
@@ -33,10 +37,6 @@ export type DocumentListItemFragment$data = {
};
}>;
};
readonly owner: {
readonly fullName: string;
readonly id: string;
};
readonly title: string;
readonly updatedAt: string;
readonly " $fragmentType": "DocumentListItemFragment";
@@ -121,7 +121,7 @@ return {
"args": null,
"concreteType": "Profile",
"kind": "LinkedField",
"name": "owner",
"name": "approver",
"plural": false,
"selections": [
(v0/*: any*/),
@@ -244,6 +244,6 @@ return {
};
})();
(node as any).hash = "6e72b37fa90b7a272ebba38fe80b9f93";
(node as any).hash = "18456198eadac7ae24bbeebf0f75b5c9";
export default node;

View File

@@ -1,5 +1,5 @@
/**
* @generated SignedSource<<4cf4c96941ac10dd2b17b67c89a1dfe2>>
* @generated SignedSource<<7ed1236265330f981095a621f4462123>>
* @lightSyntaxTransform
* @nogrep
*/
@@ -14,11 +14,11 @@ export type DocumentClassification = "CONFIDENTIAL" | "INTERNAL" | "PUBLIC" | "S
export type DocumentType = "ISMS" | "OTHER" | "POLICY" | "PROCEDURE";
export type TrustCenterVisibility = "NONE" | "PRIVATE" | "PUBLIC";
export type UpdateDocumentInput = {
approverId?: string | null | undefined;
classification?: DocumentClassification | null | undefined;
content?: string | null | undefined;
documentType?: DocumentType | null | undefined;
id: string;
ownerId?: string | null | undefined;
title?: string | null | undefined;
trustCenterVisibility?: TrustCenterVisibility | null | undefined;
};

View File

@@ -1,5 +1,5 @@
/**
* @generated SignedSource<<65c0e47a4a410a9ec6f917ec991f8ae9>>
* @generated SignedSource<<bbb5bdb7a678a554aeb043bc7e2941f0>>
* @lightSyntaxTransform
* @nogrep
*/
@@ -301,7 +301,7 @@ return {
"args": null,
"concreteType": "Profile",
"kind": "LinkedField",
"name": "owner",
"name": "approver",
"plural": false,
"selections": [
(v12/*: any*/),
@@ -507,12 +507,12 @@ return {
]
},
"params": {
"cacheID": "d79ffc90943fa44e309a27784a8c65b8",
"cacheID": "0e6f334d4bea09ecf47fe18b87ef3b84",
"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 ...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 lastVersion: versions(first: 1, orderBy: {field: CREATED_AT, direction: DESC}) {\n edges {\n node {\n id\n status\n version\n signatures(first: 0, filter: {activeContract: true}) {\n totalCount\n }\n signedSignatures: signatures(first: 0, filter: {states: [SIGNED], activeContract: true}) {\n totalCount\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 approver {\n id\n fullName\n }\n lastVersion: versions(first: 1, orderBy: {field: CREATED_AT, direction: DESC}) {\n edges {\n node {\n id\n status\n version\n signatures(first: 0, filter: {activeContract: true}) {\n totalCount\n }\n signedSignatures: signatures(first: 0, filter: {states: [SIGNED], activeContract: true}) {\n totalCount\n }\n }\n }\n }\n}\n"
}
};
})();

View File

@@ -1,5 +1,5 @@
/**
* @generated SignedSource<<dbed368b10910bc2b0b62eb50f9f7e36>>
* @generated SignedSource<<dcfc5a0f97ee1ee02c8679797141e265>>
* @lightSyntaxTransform
* @nogrep
*/
@@ -316,7 +316,7 @@ return {
"args": null,
"concreteType": "Profile",
"kind": "LinkedField",
"name": "owner",
"name": "approver",
"plural": false,
"selections": [
(v8/*: any*/),
@@ -523,12 +523,12 @@ return {
]
},
"params": {
"cacheID": "be5d2e7f4a87fba4bf56e605bd849d7d",
"cacheID": "5d465e00a354c06dc571df056624dd39",
"id": null,
"metadata": {},
"name": "DocumentsPageQuery",
"operationKind": "query",
"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 lastVersion: versions(first: 1, orderBy: {field: CREATED_AT, direction: DESC}) {\n edges {\n node {\n id\n status\n version\n signatures(first: 0, filter: {activeContract: true}) {\n totalCount\n }\n signedSignatures: signatures(first: 0, filter: {states: [SIGNED], activeContract: true}) {\n totalCount\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 approver {\n id\n fullName\n }\n lastVersion: versions(first: 1, orderBy: {field: CREATED_AT, direction: DESC}) {\n edges {\n node {\n id\n status\n version\n signatures(first: 0, filter: {activeContract: true}) {\n totalCount\n }\n signedSignatures: signatures(first: 0, filter: {states: [SIGNED], activeContract: true}) {\n totalCount\n }\n }\n }\n }\n}\n"
}
};
})();

View File

@@ -1,5 +1,5 @@
/**
* @generated SignedSource<<d4d20efd4d936984e9a38123528ae7af>>
* @generated SignedSource<<ca358b419eca687c5ba8119e7de24829>>
* @lightSyntaxTransform
* @nogrep
*/
@@ -195,7 +195,7 @@ return {
"args": null,
"concreteType": "Profile",
"kind": "LinkedField",
"name": "owner",
"name": "approver",
"plural": false,
"selections": [
(v2/*: any*/),
@@ -324,12 +324,12 @@ return {
]
},
"params": {
"cacheID": "0ac164af501f3f1bb74483e15b320715",
"cacheID": "0672eb52643ef05e90565df777644a7b",
"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 ...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 lastVersion: versions(first: 1, orderBy: {field: CREATED_AT, direction: DESC}) {\n edges {\n node {\n id\n status\n version\n signatures(first: 0, filter: {activeContract: true}) {\n totalCount\n }\n signedSignatures: signatures(first: 0, filter: {states: [SIGNED], activeContract: true}) {\n totalCount\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 approver {\n id\n fullName\n }\n lastVersion: versions(first: 1, orderBy: {field: CREATED_AT, direction: DESC}) {\n edges {\n node {\n id\n status\n version\n signatures(first: 0, filter: {activeContract: true}) {\n totalCount\n }\n signedSignatures: signatures(first: 0, filter: {states: [SIGNED], activeContract: true}) {\n totalCount\n }\n }\n }\n }\n}\n"
}
};
})();

View File

@@ -5,7 +5,7 @@ import { useFormWithSchema } from "../useFormWithSchema";
export const documentSchema = z.object({
title: z.string().min(1, "Title is required"),
content: z.string().min(1, "Content is required"),
ownerId: z.string().min(1, "Owner is required"),
approverId: z.string().min(1, "Approver is required"),
documentType: z.enum(["OTHER", "ISMS", "POLICY", "PROCEDURE"]),
classification: z.enum(["PUBLIC", "INTERNAL", "CONFIDENTIAL", "SECRET"]),
});

View File

@@ -143,12 +143,12 @@ export function CreateDocumentDialog({ trigger, connection }: Props) {
</PropertyRow>
<PropertyRow
id="ownerId"
label={__("Owner")}
error={errors.ownerId?.message}
id="approverId"
label={__("Approver")}
error={errors.approverId?.message}
>
<PeopleSelectField
name="ownerId"
name="approverId"
control={control}
organizationId={organizationId}
/>

View File

@@ -29,7 +29,7 @@ const versionFragment = graphql`
fragment DocumentLayoutDrawer_versionFragment on DocumentVersion {
id
classification
owner {
approver {
id
fullName
}
@@ -47,7 +47,7 @@ const updateDocumentMutation = graphql`
id
documentType
classification
owner {
approver {
id
fullName
}
@@ -57,7 +57,7 @@ const updateDocumentMutation = graphql`
`;
const schema = z.object({
ownerId: z.string().min(1, "Owner is required"),
approverId: z.string().min(1, "Approver is required"),
documentType: z.enum(documentTypes),
classification: z.enum(documentClassifications),
});
@@ -71,7 +71,7 @@ export function DocumentLayoutDrawer(props: {
const organizationId = useOrganizationId();
const { __ } = useTranslate();
const [isEditingOwner, setIsEditingOwner] = useState(false);
const [isEditingApprover, setIsEditingApprover] = useState(false);
const [isEditingType, setIsEditingType] = useState(false);
const [isEditingClassification, setIsEditingClassification] = useState(false);
@@ -84,7 +84,7 @@ export function DocumentLayoutDrawer(props: {
schema,
{
defaultValues: {
ownerId: version.owner.id,
approverId: version.approver.id,
documentType: document.documentType,
classification: version.classification,
},
@@ -100,16 +100,16 @@ export function DocumentLayoutDrawer(props: {
},
);
const handleUpdateOwner = async (data: { ownerId: string }) => {
const handleUpdateApprover = async (data: { approverId: string }) => {
await updateDocument({
variables: {
input: {
id: document.id,
ownerId: data.ownerId,
approverId: data.approverId,
},
},
onSuccess: () => {
setIsEditingOwner(false);
setIsEditingApprover(false);
},
});
};
@@ -151,19 +151,19 @@ export function DocumentLayoutDrawer(props: {
<div className="text-base text-txt-primary font-medium mb-4">
{__("Properties")}
</div>
<PropertyRow label={__("Owner")}>
{isEditingOwner
<PropertyRow label={__("Approver")}>
{isEditingApprover
? (
<EditablePropertyContent
onSave={() => void handleSubmit(handleUpdateOwner)()}
onSave={() => void handleSubmit(handleUpdateApprover)()}
onCancel={() => {
setIsEditingOwner(false);
setIsEditingApprover(false);
reset();
}}
disabled={isUpdatingDocument}
>
<PeopleSelectField
name="ownerId"
name="approverId"
control={control}
organizationId={organizationId}
/>
@@ -171,12 +171,12 @@ export function DocumentLayoutDrawer(props: {
)
: (
<ReadOnlyPropertyContent
onEdit={() => setIsEditingOwner(true)}
onEdit={() => setIsEditingApprover(true)}
canEdit={document.canUpdate}
>
<Badge variant="highlight" size="md" className="gap-2">
<Avatar name={version.owner.fullName} />
{version.owner.fullName}
<Avatar name={version.approver.fullName} />
{version.approver.fullName}
</Badge>
</ReadOnlyPropertyContent>
)}

View File

@@ -167,7 +167,7 @@ export function DocumentList(props: {
{__("Type")}
</SortableTh>
<Th className="w-32">{__("Classification")}</Th>
<Th className="w-60">{__("Owner")}</Th>
<Th className="w-60">{__("Approver")}</Th>
<Th className="w-60">{__("Last update")}</Th>
<Th className="w-20">{__("Signatures")}</Th>
{hasAnyAction && <Th className="w-18"></Th>}

View File

@@ -17,7 +17,7 @@ const fragment = graphql`
classification
updatedAt
canDelete: permission(action: "core:document:delete")
owner {
approver {
id
fullName
}
@@ -129,8 +129,8 @@ export function DocumentListItem(props: {
</Td>
<Td className="w-60">
<div className="flex gap-2 items-center">
<Avatar name={document.owner?.fullName ?? ""} />
{document.owner?.fullName}
<Avatar name={document.approver?.fullName ?? ""} />
{document.approver?.fullName}
</div>
</Td>
<Td className="w-60">{formatDate(document.updatedAt)}</Td>