Use electronic signature for compliage page NDA
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
This commit is contained in:
@@ -31,10 +31,12 @@ export const ndaPageQuery = graphql`
|
||||
organization {
|
||||
name
|
||||
}
|
||||
ndaFileUrl
|
||||
ndaFileName
|
||||
ndaSignature {
|
||||
status
|
||||
nonDisclosureAgreement {
|
||||
fileName
|
||||
fileUrl
|
||||
viewerSignature {
|
||||
status
|
||||
}
|
||||
}
|
||||
...NDAPageFragment
|
||||
}
|
||||
@@ -44,11 +46,13 @@ export const ndaPageQuery = graphql`
|
||||
const ndaPageFragment = graphql`
|
||||
fragment NDAPageFragment on TrustCenter
|
||||
@refetchable(queryName: "NDAPageRefetchQuery") {
|
||||
ndaSignature @required(action: THROW) {
|
||||
id
|
||||
status
|
||||
consentText
|
||||
lastError
|
||||
nonDisclosureAgreement @required(action: THROW) {
|
||||
viewerSignature @required(action: THROW) {
|
||||
id
|
||||
status
|
||||
consentText
|
||||
lastError
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
@@ -95,7 +99,7 @@ export function NDAPage(props: {
|
||||
ndaPageFragment,
|
||||
trustCenter,
|
||||
);
|
||||
const ndaSignature = data.ndaSignature;
|
||||
const ndaSignature = data.nonDisclosureAgreement.viewerSignature;
|
||||
|
||||
const { width } = useWindowSize();
|
||||
const isMobile = width < 1100;
|
||||
@@ -208,10 +212,11 @@ export function NDAPage(props: {
|
||||
}
|
||||
};
|
||||
|
||||
const nda = trustCenter.nonDisclosureAgreement;
|
||||
if (
|
||||
!trustCenter.ndaFileUrl
|
||||
|| !trustCenter.ndaSignature
|
||||
|| trustCenter.ndaSignature.status === "COMPLETED"
|
||||
!nda
|
||||
|| !nda.viewerSignature
|
||||
|| nda.viewerSignature.status === "COMPLETED"
|
||||
) {
|
||||
return <Navigate to="/overview" replace />;
|
||||
}
|
||||
@@ -241,11 +246,11 @@ export function NDAPage(props: {
|
||||
trustCenter.organization.name,
|
||||
)}
|
||||
</p>
|
||||
{isMobile && trustCenter.ndaFileUrl && (
|
||||
{isMobile && nda?.fileUrl && (
|
||||
<Card className="flex justify-between py-3 px-4 text-sm items-center mt-6">
|
||||
{trustCenter.ndaFileName}
|
||||
{nda?.fileName}
|
||||
<Button variant="secondary" asChild>
|
||||
<a target="_blank" rel="noopener noreferrer" href={trustCenter.ndaFileUrl}>
|
||||
<a target="_blank" rel="noopener noreferrer" href={nda.fileUrl}>
|
||||
{__("View document")}
|
||||
</a>
|
||||
</Button>
|
||||
@@ -323,7 +328,7 @@ export function NDAPage(props: {
|
||||
</div>
|
||||
{isDesktop && (
|
||||
<div className="bg-subtle h-full border-l border-border-solid min-h-0">
|
||||
{trustCenter.ndaFileUrl && <PDFPreview src={trustCenter.ndaFileUrl} name={trustCenter.ndaFileName ?? ""} />}
|
||||
{nda?.fileUrl && <PDFPreview src={nda.fileUrl} name={nda.fileName ?? ""} />}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @generated SignedSource<<93f8676826dfa28c1681da68a6ac1cf2>>
|
||||
* @generated SignedSource<<99908411212decf464eafa45b1fc0e04>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
@@ -13,11 +13,13 @@ export type ElectronicSignatureStatus = "ACCEPTED" | "COMPLETED" | "FAILED" | "P
|
||||
import { FragmentRefs } from "relay-runtime";
|
||||
export type NDAPageFragment$data = {
|
||||
readonly id: string;
|
||||
readonly ndaSignature: {
|
||||
readonly consentText: string;
|
||||
readonly id: string;
|
||||
readonly lastError: string | null | undefined;
|
||||
readonly status: ElectronicSignatureStatus;
|
||||
readonly nonDisclosureAgreement: {
|
||||
readonly viewerSignature: {
|
||||
readonly consentText: string;
|
||||
readonly id: string;
|
||||
readonly lastError: string | null | undefined;
|
||||
readonly status: ElectronicSignatureStatus;
|
||||
};
|
||||
};
|
||||
readonly " $fragmentType": "NDAPageFragment";
|
||||
};
|
||||
@@ -59,32 +61,47 @@ return {
|
||||
"field": {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "ElectronicSignature",
|
||||
"concreteType": "NonDisclosureAgreement",
|
||||
"kind": "LinkedField",
|
||||
"name": "ndaSignature",
|
||||
"name": "nonDisclosureAgreement",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v0/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "status",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "consentText",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "lastError",
|
||||
"storageKey": null
|
||||
"kind": "RequiredField",
|
||||
"field": {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "ElectronicSignature",
|
||||
"kind": "LinkedField",
|
||||
"name": "viewerSignature",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v0/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "status",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "consentText",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "lastError",
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
"action": "THROW"
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
@@ -98,6 +115,6 @@ return {
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "b53a5f455508ed45124b7d09cfb573da";
|
||||
(node as any).hash = "503859b8c00b27214f9f3253bffcb670";
|
||||
|
||||
export default node;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @generated SignedSource<<f1cae8462501cdf634eb02eb143c3806>>
|
||||
* @generated SignedSource<<10a0ee1dfa19239c5c5820f3d58a1e19>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
@@ -14,10 +14,12 @@ export type ElectronicSignatureStatus = "ACCEPTED" | "COMPLETED" | "FAILED" | "P
|
||||
export type NDAPageQuery$variables = Record<PropertyKey, never>;
|
||||
export type NDAPageQuery$data = {
|
||||
readonly currentTrustCenter: {
|
||||
readonly ndaFileName: string | null | undefined;
|
||||
readonly ndaFileUrl: string | null | undefined;
|
||||
readonly ndaSignature: {
|
||||
readonly status: ElectronicSignatureStatus;
|
||||
readonly nonDisclosureAgreement: {
|
||||
readonly fileName: string;
|
||||
readonly fileUrl: string;
|
||||
readonly viewerSignature: {
|
||||
readonly status: ElectronicSignatureStatus;
|
||||
} | null | undefined;
|
||||
} | null | undefined;
|
||||
readonly organization: {
|
||||
readonly name: string;
|
||||
@@ -52,14 +54,14 @@ v2 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "ndaFileUrl",
|
||||
"name": "fileName",
|
||||
"storageKey": null
|
||||
},
|
||||
v3 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "ndaFileName",
|
||||
"name": "fileUrl",
|
||||
"storageKey": null
|
||||
},
|
||||
v4 = {
|
||||
@@ -117,17 +119,28 @@ return {
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
(v2/*: any*/),
|
||||
(v3/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "ElectronicSignature",
|
||||
"concreteType": "NonDisclosureAgreement",
|
||||
"kind": "LinkedField",
|
||||
"name": "ndaSignature",
|
||||
"name": "nonDisclosureAgreement",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v4/*: any*/)
|
||||
(v2/*: any*/),
|
||||
(v3/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "ElectronicSignature",
|
||||
"kind": "LinkedField",
|
||||
"name": "viewerSignature",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v4/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
@@ -185,30 +198,41 @@ return {
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
(v2/*: any*/),
|
||||
(v3/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "ElectronicSignature",
|
||||
"concreteType": "NonDisclosureAgreement",
|
||||
"kind": "LinkedField",
|
||||
"name": "ndaSignature",
|
||||
"name": "nonDisclosureAgreement",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v4/*: any*/),
|
||||
(v5/*: any*/),
|
||||
(v2/*: any*/),
|
||||
(v3/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "consentText",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "lastError",
|
||||
"concreteType": "ElectronicSignature",
|
||||
"kind": "LinkedField",
|
||||
"name": "viewerSignature",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v4/*: any*/),
|
||||
(v5/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "consentText",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "lastError",
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
@@ -221,16 +245,16 @@ return {
|
||||
]
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "c0b175c435c5730e390fcfde596d8bc3",
|
||||
"cacheID": "e1ab3a5206a4ea200ebdb991023a0e99",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "NDAPageQuery",
|
||||
"operationKind": "query",
|
||||
"text": "query NDAPageQuery {\n viewer {\n fullName\n id\n }\n currentTrustCenter {\n organization {\n name\n id\n }\n ndaFileUrl\n ndaFileName\n ndaSignature {\n status\n id\n }\n ...NDAPageFragment\n id\n }\n}\n\nfragment NDAPageFragment on TrustCenter {\n ndaSignature {\n id\n status\n consentText\n lastError\n }\n id\n}\n"
|
||||
"text": "query NDAPageQuery {\n viewer {\n fullName\n id\n }\n currentTrustCenter {\n organization {\n name\n id\n }\n nonDisclosureAgreement {\n fileName\n fileUrl\n viewerSignature {\n status\n id\n }\n }\n ...NDAPageFragment\n id\n }\n}\n\nfragment NDAPageFragment on TrustCenter {\n nonDisclosureAgreement {\n viewerSignature {\n id\n status\n consentText\n lastError\n }\n }\n id\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "a78bf8b65feba4627ecb265ca882f645";
|
||||
(node as any).hash = "4f0f0dd672862fb6c3fb5ef2eff80cd9";
|
||||
|
||||
export default node;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @generated SignedSource<<d2d531924e3667658020b431850c193e>>
|
||||
* @generated SignedSource<<58dbdcc5fc52f0dab9eb156856522fd1>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
@@ -9,7 +9,7 @@
|
||||
// @ts-nocheck
|
||||
|
||||
import { ConcreteRequest } from 'relay-runtime';
|
||||
export type ElectronicSignatureEventType = "CERTIFICATE_GENERATED" | "CONSENT_GIVEN" | "DOCUMENT_VIEWED" | "FULL_NAME_TYPED" | "SEAL_COMPUTED" | "SIGNATURE_ACCEPTED" | "SIGNATURE_COMPLETED" | "TIMESTAMP_REQUESTED";
|
||||
export type ElectronicSignatureEventType = "CERTIFICATE_GENERATED" | "CONSENT_GIVEN" | "DOCUMENT_VIEWED" | "FULL_NAME_TYPED" | "PROCESSING_ERROR" | "SEAL_COMPUTED" | "SIGNATURE_ACCEPTED" | "SIGNATURE_COMPLETED" | "TIMESTAMP_REQUESTED";
|
||||
export type RecordSigningEventInput = {
|
||||
eventType: ElectronicSignatureEventType;
|
||||
signatureId: string;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @generated SignedSource<<47d15b007fc81de3850393c9b158726c>>
|
||||
* @generated SignedSource<<5c6134b4d6615f24a63ea534c80e76c1>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
@@ -100,31 +100,42 @@ return {
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "ElectronicSignature",
|
||||
"concreteType": "NonDisclosureAgreement",
|
||||
"kind": "LinkedField",
|
||||
"name": "ndaSignature",
|
||||
"name": "nonDisclosureAgreement",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v2/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "status",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "consentText",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "lastError",
|
||||
"concreteType": "ElectronicSignature",
|
||||
"kind": "LinkedField",
|
||||
"name": "viewerSignature",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v2/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "status",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "consentText",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "lastError",
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
@@ -140,16 +151,16 @@ return {
|
||||
]
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "1c61baa555ad2b24794ce0bf5ecc14ac",
|
||||
"cacheID": "fcf227efd02b14a0cb1599e4a5f944bd",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "NDAPageRefetchQuery",
|
||||
"operationKind": "query",
|
||||
"text": "query NDAPageRefetchQuery(\n $id: ID!\n) {\n node(id: $id) {\n __typename\n ...NDAPageFragment\n id\n }\n}\n\nfragment NDAPageFragment on TrustCenter {\n ndaSignature {\n id\n status\n consentText\n lastError\n }\n id\n}\n"
|
||||
"text": "query NDAPageRefetchQuery(\n $id: ID!\n) {\n node(id: $id) {\n __typename\n ...NDAPageFragment\n id\n }\n}\n\nfragment NDAPageFragment on TrustCenter {\n nonDisclosureAgreement {\n viewerSignature {\n id\n status\n consentText\n lastError\n }\n }\n id\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "b53a5f455508ed45124b7d09cfb573da";
|
||||
(node as any).hash = "503859b8c00b27214f9f3253bffcb670";
|
||||
|
||||
export default node;
|
||||
|
||||
Reference in New Issue
Block a user