From f6f5b08d430fb8399dfa51b75198d3c59587ad28 Mon Sep 17 00:00:00 2001 From: RaktimaNXG Date: Fri, 19 Jul 2024 16:31:43 +0530 Subject: [PATCH] fix: the quick-send flow in-progress report shows the finish button even though the current user isn't a signer --- .../src/components/opensigndrive/DriveBody.js | 2 +- apps/OpenSign/src/components/pdf/DraftDocument.js | 2 +- apps/OpenSign/src/pages/PdfRequestFiles.js | 12 +++++++----- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/apps/OpenSign/src/components/opensigndrive/DriveBody.js b/apps/OpenSign/src/components/opensigndrive/DriveBody.js index c4884d7a0..6d12575a1 100644 --- a/apps/OpenSign/src/components/opensigndrive/DriveBody.js +++ b/apps/OpenSign/src/components/opensigndrive/DriveBody.js @@ -122,7 +122,7 @@ function DriveBody(props) { navigate(`/placeHolderSign/${data.objectId}`); } //Inprogress document - else if (isPlaceholder?.length > 0 && signerExist?.length > 0) { + else if (isPlaceholder?.length > 0 && signedUrl) { navigate(`/recipientSignPdf/${data.objectId}`); } //placeholder draft document else if ( diff --git a/apps/OpenSign/src/components/pdf/DraftDocument.js b/apps/OpenSign/src/components/pdf/DraftDocument.js index 5f14dfad8..8b4f63b87 100644 --- a/apps/OpenSign/src/components/pdf/DraftDocument.js +++ b/apps/OpenSign/src/components/pdf/DraftDocument.js @@ -67,7 +67,7 @@ function DraftDocument() { navigate(`/placeHolderSign/${data.objectId}`); } //Inprogress document - else if (isPlaceholder?.length > 0 && signerExist?.length > 0) { + else if (isPlaceholder?.length > 0 && signedUrl) { navigate(`/recipientSignPdf/${data.objectId}`); } //placeholder draft document else if ( diff --git a/apps/OpenSign/src/pages/PdfRequestFiles.js b/apps/OpenSign/src/pages/PdfRequestFiles.js index 9308c5c54..85bfd1c3f 100644 --- a/apps/OpenSign/src/pages/PdfRequestFiles.js +++ b/apps/OpenSign/src/pages/PdfRequestFiles.js @@ -419,11 +419,13 @@ function PdfRequestFiles(props) { "You have successfully signed the document. You can download or print a copy of the partially signed document. A copy of the digitally signed document will be sent to the owner over email once it is signed by all signers." }); } else { - const checkCurrentUser = documentData[0].Placeholders.find( - (data) => data.signerObjId === currUserId - ); - if (checkCurrentUser) { - setCurrentSigner(true); + if (currUserId) { + const checkCurrentUser = documentData[0].Placeholders.find( + (data) => data?.signerObjId === currUserId + ); + if (checkCurrentUser) { + setCurrentSigner(true); + } } } const audittrailData =