From 18e25f6cd9b03f5664636bb13d72e94e315c59b1 Mon Sep 17 00:00:00 2001 From: "allcontributors[bot]" <46447321+allcontributors[bot]@users.noreply.github.com> Date: Tue, 7 May 2024 15:05:50 +0000 Subject: [PATCH 01/15] docs: update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 82a1c3b4c..c844211b5 100644 --- a/README.md +++ b/README.md @@ -134,6 +134,7 @@ We would like to thank all our contributors and users for their support and feed Vikram
Vikram

💻 + ugoconsonni
ugoconsonni

💻 From d3bf9e9e9b971cf78e75a8d0aa8c923e1de745bc Mon Sep 17 00:00:00 2001 From: "allcontributors[bot]" <46447321+allcontributors[bot]@users.noreply.github.com> Date: Tue, 7 May 2024 15:05:51 +0000 Subject: [PATCH 02/15] docs: update .all-contributorsrc --- .all-contributorsrc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.all-contributorsrc b/.all-contributorsrc index c6fe8646b..ae439aea3 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -205,6 +205,15 @@ "contributions": [ "code" ] + }, + { + "login": "ugoconsonni", + "name": "ugoconsonni", + "avatar_url": "https://avatars.githubusercontent.com/u/13661702?v=4", + "profile": "https://github.com/ugoconsonni", + "contributions": [ + "code" + ] } ] } From 9e3ba2cf5c06429baf6a11d495358520f2cf8918 Mon Sep 17 00:00:00 2001 From: "allcontributors[bot]" <46447321+allcontributors[bot]@users.noreply.github.com> Date: Tue, 7 May 2024 15:06:42 +0000 Subject: [PATCH 03/15] docs: update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index c844211b5..c1b9314b5 100644 --- a/README.md +++ b/README.md @@ -135,6 +135,7 @@ We would like to thank all our contributors and users for their support and feed Vikram
Vikram

💻 ugoconsonni
ugoconsonni

💻 + Zathiel
Zathiel

💻 From e9eb59aa7aabe58c488c382fb1dec1d6fea48441 Mon Sep 17 00:00:00 2001 From: "allcontributors[bot]" <46447321+allcontributors[bot]@users.noreply.github.com> Date: Tue, 7 May 2024 15:06:43 +0000 Subject: [PATCH 04/15] docs: update .all-contributorsrc --- .all-contributorsrc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.all-contributorsrc b/.all-contributorsrc index ae439aea3..7f60b7e10 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -214,6 +214,15 @@ "contributions": [ "code" ] + }, + { + "login": "Zathiel", + "name": "Zathiel", + "avatar_url": "https://avatars.githubusercontent.com/u/26553418?v=4", + "profile": "https://github.com/Zathiel", + "contributions": [ + "code" + ] } ] } From d45566257f9eb710c1127749be9ba54d7ef92e18 Mon Sep 17 00:00:00 2001 From: "allcontributors[bot]" <46447321+allcontributors[bot]@users.noreply.github.com> Date: Tue, 7 May 2024 15:07:20 +0000 Subject: [PATCH 05/15] docs: update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index c844211b5..e88d26f39 100644 --- a/README.md +++ b/README.md @@ -135,6 +135,7 @@ We would like to thank all our contributors and users for their support and feed Vikram
Vikram

💻 ugoconsonni
ugoconsonni

💻 + Daniel Mutwiri
Daniel Mutwiri

💻 From 3fd06134070c4eb3c1564663a9971813a24a6ced Mon Sep 17 00:00:00 2001 From: "allcontributors[bot]" <46447321+allcontributors[bot]@users.noreply.github.com> Date: Tue, 7 May 2024 15:07:21 +0000 Subject: [PATCH 06/15] docs: update .all-contributorsrc --- .all-contributorsrc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.all-contributorsrc b/.all-contributorsrc index ae439aea3..a2616371d 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -214,6 +214,15 @@ "contributions": [ "code" ] + }, + { + "login": "daniel-mutwiri", + "name": "Daniel Mutwiri", + "avatar_url": "https://avatars.githubusercontent.com/u/8936960?v=4", + "profile": "https://github.com/daniel-mutwiri", + "contributions": [ + "code" + ] } ] } From 2c2065aca8af952f89eed8913f3a753fec5f83ce Mon Sep 17 00:00:00 2001 From: prafull-opensignlabs Date: Wed, 8 May 2024 11:03:38 +0530 Subject: [PATCH 07/15] fix: issue of showing document in drafts report after creating from document API --- .../cloud/customRoute/v1/routes/CreateDocumentWithTemplate.js | 1 + .../cloud/customRoute/v1/routes/createDocumentwithCoordinate.js | 1 + 2 files changed, 2 insertions(+) diff --git a/apps/OpenSignServer/cloud/customRoute/v1/routes/CreateDocumentWithTemplate.js b/apps/OpenSignServer/cloud/customRoute/v1/routes/CreateDocumentWithTemplate.js index 851b837c8..88be8b248 100644 --- a/apps/OpenSignServer/cloud/customRoute/v1/routes/CreateDocumentWithTemplate.js +++ b/apps/OpenSignServer/cloud/customRoute/v1/routes/CreateDocumentWithTemplate.js @@ -169,6 +169,7 @@ export default async function createDocumentWithTemplate(request, response) { object.set('Signers', templateSigner); } object.set('URL', template.URL); + object.set('SignedUrl', template.URL); object.set('CreatedBy', template.CreatedBy); object.set('ExtUserPtr', { __type: 'Pointer', diff --git a/apps/OpenSignServer/cloud/customRoute/v1/routes/createDocumentwithCoordinate.js b/apps/OpenSignServer/cloud/customRoute/v1/routes/createDocumentwithCoordinate.js index 29197ecb1..37dea278e 100644 --- a/apps/OpenSignServer/cloud/customRoute/v1/routes/createDocumentwithCoordinate.js +++ b/apps/OpenSignServer/cloud/customRoute/v1/routes/createDocumentwithCoordinate.js @@ -130,6 +130,7 @@ export default async function createDocumentwithCoordinate(request, response) { object.set('SendinOrder', sendInOrder); } object.set('URL', fileUrl); + object.set('SignedUrl', fileUrl); object.set('CreatedBy', userPtr); object.set('ExtUserPtr', extUserPtr); object.set('IsSendMail', send_email); From 5778bdecae2dbbb095bc8f5be9cdfe70f965f51c Mon Sep 17 00:00:00 2001 From: prafull-opensignlabs <93375423+prafull-opensignlabs@users.noreply.github.com> Date: Wed, 8 May 2024 12:10:11 +0530 Subject: [PATCH 08/15] fix: something went wrong error in guest login when document created through Document API --- .../cloud/customRoute/v1/routes/createDocumentwithCoordinate.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/OpenSignServer/cloud/customRoute/v1/routes/createDocumentwithCoordinate.js b/apps/OpenSignServer/cloud/customRoute/v1/routes/createDocumentwithCoordinate.js index 68f911ed7..1938dd243 100644 --- a/apps/OpenSignServer/cloud/customRoute/v1/routes/createDocumentwithCoordinate.js +++ b/apps/OpenSignServer/cloud/customRoute/v1/routes/createDocumentwithCoordinate.js @@ -279,7 +279,7 @@ export default async function createDocumentwithCoordinate(request, response) { const objectId = contactMail[i].contactPtr.objectId; const hostUrl = baseUrl.origin; //encode this url value `${response.id}/${contactMail[i].email}/${objectId}` to base64 using `btoa` function - const encodeBase64 = btoa(`${response.id}/${contactMail[i].email}/${objectId}`); + const encodeBase64 = btoa(`${res.id}/${contactMail[i].email}/${objectId}`); let signPdf = `${hostUrl}/login/${encodeBase64}`; const openSignUrl = 'https://www.opensignlabs.com/contact-us'; const orgName = parseExtUser.Company ? parseExtUser.Company : ''; From 659b7fe0f49c6d07bf361b8d39ac464d926f33d1 Mon Sep 17 00:00:00 2001 From: prafull-opensignlabs <93375423+prafull-opensignlabs@users.noreply.github.com> Date: Wed, 8 May 2024 12:54:01 +0530 Subject: [PATCH 09/15] fix: issue of showing originator in completion certificate's signer list when add only one signer --- .../cloud/parsefunction/pdf/GenerateCertificate.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/OpenSignServer/cloud/parsefunction/pdf/GenerateCertificate.js b/apps/OpenSignServer/cloud/parsefunction/pdf/GenerateCertificate.js index 0845e7fbd..099158778 100644 --- a/apps/OpenSignServer/cloud/parsefunction/pdf/GenerateCertificate.js +++ b/apps/OpenSignServer/cloud/parsefunction/pdf/GenerateCertificate.js @@ -28,7 +28,7 @@ export default async function GenerateCertificate(docDetails) { const company = docDetails?.ExtUserPtr?.Company || ''; const createdAt = docDetails?.DocSentAt?.iso || docDetails.createdAt; const auditTrail = - docDetails.AuditTrail?.length > 1 + docDetails?.Signers?.length > 0 ? docDetails.AuditTrail.map(x => { const data = docDetails.Signers.find(y => y.objectId === x.UserPtr.objectId); return { @@ -281,7 +281,7 @@ export default async function GenerateCertificate(docDetails) { }); page.drawText('Viewed on :', { - x: half +55, + x: half + 55, y: yPosition2, size: timeText, font: timesRomanFont, From e4c62c4eebd6d38698605288f9dbdace43b6cf1f Mon Sep 17 00:00:00 2001 From: RaktimaNXG Date: Wed, 8 May 2024 14:12:18 +0530 Subject: [PATCH 10/15] feat : integrate validation for the signature widget as mandatory. --- apps/OpenSign/src/pages/PlaceHolderSign.js | 54 ++++++++++++++++------ apps/OpenSign/src/pages/SignyourselfPdf.js | 39 ++++++++++------ 2 files changed, 64 insertions(+), 29 deletions(-) diff --git a/apps/OpenSign/src/pages/PlaceHolderSign.js b/apps/OpenSign/src/pages/PlaceHolderSign.js index 6fc5fa190..d082df880 100644 --- a/apps/OpenSign/src/pages/PlaceHolderSign.js +++ b/apps/OpenSign/src/pages/PlaceHolderSign.js @@ -830,11 +830,11 @@ function PlaceHolderSign() { return pdfDetails[0].URL; } }; - const alertSendEmail = async () => { const filterPrefill = signerPos?.filter((data) => data.Role !== "prefill"); const getPrefill = signerPos?.filter((data) => data.Role === "prefill"); let isLabel = false; + //condition is used to check text widget data is empty or have response if (getPrefill && getPrefill.length > 0) { const prefillPlaceholder = getPrefill[0].placeHolder; if (prefillPlaceholder) { @@ -845,6 +845,29 @@ function PlaceHolderSign() { }); } } + let notExistSignature = false; // variable is used to check a signature widget exit or not then execute other code + //for loop is used to check signature widget exist or not + for (let item of filterPrefill) { + let signatureExist = false; // Reset for each iteration + for (let x of item.placeHolder) { + if (!signatureExist) { + const typeExist = x.pos.some((data) => data?.type); + if (typeExist) { + signatureExist = x.pos.some((data) => data?.type === "signature"); + } else { + signatureExist = x.pos.some((data) => !data.isStamp); + } + } + } + if (!signatureExist) { + notExistSignature = true; + const alert = { + mssg: "sure", + alert: true + }; + setIsSendAlert(alert); + } + } if (getPrefill && isLabel) { const alert = { @@ -852,23 +875,26 @@ function PlaceHolderSign() { alert: true }; setIsSendAlert(alert); - } else if (filterPrefill.length === signersdata.length) { - const IsSignerNotExist = filterPrefill?.filter((x) => !x.signerObjId); - if (IsSignerNotExist && IsSignerNotExist?.length > 0) { - setSignerExistModal(true); - setSelectWidgetId(IsSignerNotExist[0]?.placeHolder?.[0]?.pos?.[0]?.key); + } else if (!notExistSignature) { + if (filterPrefill.length === signersdata.length) { + const IsSignerNotExist = filterPrefill?.filter((x) => !x.signerObjId); + if (IsSignerNotExist && IsSignerNotExist?.length > 0) { + setSignerExistModal(true); + setSelectWidgetId( + IsSignerNotExist[0]?.placeHolder?.[0]?.pos?.[0]?.key + ); + } else { + saveDocumentDetails(); + } } else { - saveDocumentDetails(); + const alert = { + mssg: "sure", + alert: true + }; + setIsSendAlert(alert); } - } else { - const alert = { - mssg: "sure", - alert: true - }; - setIsSendAlert(alert); } }; - //function to use save placeholder details in contracts_document const saveDocumentDetails = async () => { setIsUiLoading(true); diff --git a/apps/OpenSign/src/pages/SignyourselfPdf.js b/apps/OpenSign/src/pages/SignyourselfPdf.js index 7fe144910..63fb8e8b7 100644 --- a/apps/OpenSign/src/pages/SignyourselfPdf.js +++ b/apps/OpenSign/src/pages/SignyourselfPdf.js @@ -480,13 +480,13 @@ function SignYourSelf() { Width: widgetTypeExist ? calculateInitialWidthHeight(dragTypeValue, widgetValue).getWidth : dragTypeValue === "initials" - ? defaultWidthHeight(dragTypeValue).width - : "", + ? defaultWidthHeight(dragTypeValue).width + : "", Height: widgetTypeExist ? calculateInitialWidthHeight(dragTypeValue, widgetValue).getHeight : dragTypeValue === "initials" - ? defaultWidthHeight(dragTypeValue).height - : "", + ? defaultWidthHeight(dragTypeValue).height + : "", options: addWidgetOptions(dragTypeValue) }; @@ -603,7 +603,8 @@ function SignYourSelf() { }; //function for send placeholder's co-ordinate(x,y) position embed signature url or stamp url async function embedWidgetsData() { - let showAlert = false; + let showAlert = false, + isSignatureExist = false; try { for (let i = 0; i < xyPostion?.length; i++) { const requiredWidgets = xyPostion[i].pos.filter( @@ -627,17 +628,25 @@ function SignYourSelf() { } } } + //condition to check exist signature widget or not + if (!isSignatureExist) { + isSignatureExist = xyPostion[i].pos.some( + (data) => data?.type === "signature" + ); + } } - if (xyPostion.length === 0) { + if (xyPostion.length === 0 || !isSignatureExist) { setIsAlert({ isShow: true, - alertMessage: "Please complete your signature!" + alertMessage: + "Please ensure there's at least one signature widget added" }); return; } else if (showAlert) { setIsAlert({ isShow: true, - alertMessage: "Please complete your signature!" + alertMessage: + "Please ensure all field is accurately filled and meets all requirements." }); return; } else { @@ -713,13 +722,13 @@ function SignYourSelf() { // for adding it in completion certificate let getSignature; for (let item of xyPostion) { - const typeExist = item.pos.some((data) => data?.type); - if (typeExist) { - getSignature = item.pos.find((data) => data?.type === "signature"); - break; - } else { - getSignature = item.pos.find((data) => !data.isStamp); - break; + if (!getSignature) { + const typeExist = item.pos.some((data) => data?.type); + if (typeExist) { + getSignature = item.pos.find((data) => data?.type === "signature"); + } else { + getSignature = item.pos.find((data) => !data.isStamp); + } } } let base64Sign = getSignature.SignUrl; From a3a398bd926f51342245011c9c1af99732caa2f4 Mon Sep 17 00:00:00 2001 From: prafull-opensignlabs <93375423+prafull-opensignlabs@users.noreply.github.com> Date: Wed, 8 May 2024 15:38:27 +0530 Subject: [PATCH 11/15] refactor: update certificate generating message --- apps/OpenSign/src/components/pdf/PdfHeader.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/OpenSign/src/components/pdf/PdfHeader.js b/apps/OpenSign/src/components/pdf/PdfHeader.js index eeac61ee3..52155335b 100644 --- a/apps/OpenSign/src/components/pdf/PdfHeader.js +++ b/apps/OpenSign/src/components/pdf/PdfHeader.js @@ -577,8 +577,8 @@ function Header({ handleClose={() => setIsCertificate(false)} >
-

Completion certificate is generating,

-

please wait for some time if not download try again later

+

Your completion certificate is being generated. Please wait momentarily.

+

If the download doesn't start shortly, click the button again.

From 0a5653f53d42b981a1966ad69f597343396080f0 Mon Sep 17 00:00:00 2001 From: RaktimaNXG Date: Wed, 8 May 2024 15:48:53 +0530 Subject: [PATCH 12/15] fix: modal design of signature validation in both flow signyour-self and request-sign --- apps/OpenSign/src/pages/PlaceHolderSign.js | 10 +++++----- apps/OpenSign/src/pages/SignyourselfPdf.js | 15 ++------------- 2 files changed, 7 insertions(+), 18 deletions(-) diff --git a/apps/OpenSign/src/pages/PlaceHolderSign.js b/apps/OpenSign/src/pages/PlaceHolderSign.js index d082df880..fbda16dad 100644 --- a/apps/OpenSign/src/pages/PlaceHolderSign.js +++ b/apps/OpenSign/src/pages/PlaceHolderSign.js @@ -845,7 +845,7 @@ function PlaceHolderSign() { }); } } - let notExistSignature = false; // variable is used to check a signature widget exit or not then execute other code + let isSignatureExist = true; // variable is used to check a signature widget exit or not then execute other code //for loop is used to check signature widget exist or not for (let item of filterPrefill) { let signatureExist = false; // Reset for each iteration @@ -860,7 +860,7 @@ function PlaceHolderSign() { } } if (!signatureExist) { - notExistSignature = true; + isSignatureExist = false; const alert = { mssg: "sure", alert: true @@ -875,7 +875,7 @@ function PlaceHolderSign() { alert: true }; setIsSendAlert(alert); - } else if (!notExistSignature) { + } else if (isSignatureExist) { if (filterPrefill.length === signersdata.length) { const IsSignerNotExist = filterPrefill?.filter((x) => !x.signerObjId); if (IsSignerNotExist && IsSignerNotExist?.length > 0) { @@ -1713,8 +1713,8 @@ function PlaceHolderSign() { > {isSendAlert.mssg === "sure" ? ( - Please add at least one signature field for all - recipients. + Please ensure there's at least one signature widget + added for all recipients. ) : isSendAlert.mssg === textWidget ? (

Please confirm that you have filled the text field.

diff --git a/apps/OpenSign/src/pages/SignyourselfPdf.js b/apps/OpenSign/src/pages/SignyourselfPdf.js index 63fb8e8b7..cafb5da33 100644 --- a/apps/OpenSign/src/pages/SignyourselfPdf.js +++ b/apps/OpenSign/src/pages/SignyourselfPdf.js @@ -637,6 +637,7 @@ function SignYourSelf() { } if (xyPostion.length === 0 || !isSignatureExist) { setIsAlert({ + header: "Fields required", isShow: true, alertMessage: "Please ensure there's at least one signature widget added" @@ -1170,7 +1171,7 @@ function SignYourSelf() { { setIsAlert({ isShow: false, @@ -1190,18 +1191,6 @@ function SignYourSelf() { marginBottom: "15px" }} > - From 4a4c9eaa2d2af41e8a0210a839402a95d4f7d9d0 Mon Sep 17 00:00:00 2001 From: RaktimaNXG Date: Wed, 8 May 2024 15:54:48 +0530 Subject: [PATCH 13/15] refactor: remove line --- apps/OpenSign/src/pages/SignyourselfPdf.js | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/apps/OpenSign/src/pages/SignyourselfPdf.js b/apps/OpenSign/src/pages/SignyourselfPdf.js index cafb5da33..027abb889 100644 --- a/apps/OpenSign/src/pages/SignyourselfPdf.js +++ b/apps/OpenSign/src/pages/SignyourselfPdf.js @@ -1181,16 +1181,6 @@ function SignYourSelf() { >

{isAlert.alertMessage}

- -
From bce028877b1c356c1c4c622b9a028188b0f8571a Mon Sep 17 00:00:00 2001 From: prafull-opensignlabs <93375423+prafull-opensignlabs@users.noreply.github.com> Date: Wed, 8 May 2024 15:58:51 +0530 Subject: [PATCH 14/15] Fix: issue of user name is visible in subject of mail instead of document title --- .../cloud/customRoute/v1/routes/createDocumentwithCoordinate.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/OpenSignServer/cloud/customRoute/v1/routes/createDocumentwithCoordinate.js b/apps/OpenSignServer/cloud/customRoute/v1/routes/createDocumentwithCoordinate.js index 2f30625ed..2e6fa39e7 100644 --- a/apps/OpenSignServer/cloud/customRoute/v1/routes/createDocumentwithCoordinate.js +++ b/apps/OpenSignServer/cloud/customRoute/v1/routes/createDocumentwithCoordinate.js @@ -333,7 +333,7 @@ export default async function createDocumentwithCoordinate(request, response) { ); } else { replaceVar = { - subject: `${parseExtUser.Name} has requested you to sign "${parseExtUser.Name}"`, + subject: `${parseExtUser.Name} has requested you to sign "${name}"`, body: email_html, }; } From 6355c02485ed842a35688ab616e0dfd88c0bd2d7 Mon Sep 17 00:00:00 2001 From: prafull-opensignlabs <93375423+prafull-opensignlabs@users.noreply.github.com> Date: Wed, 8 May 2024 16:00:02 +0530 Subject: [PATCH 15/15] Update createDocumentwithCoordinate.js --- .../cloud/customRoute/v1/routes/createDocumentwithCoordinate.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/OpenSignServer/cloud/customRoute/v1/routes/createDocumentwithCoordinate.js b/apps/OpenSignServer/cloud/customRoute/v1/routes/createDocumentwithCoordinate.js index 2e6fa39e7..da93d48b6 100644 --- a/apps/OpenSignServer/cloud/customRoute/v1/routes/createDocumentwithCoordinate.js +++ b/apps/OpenSignServer/cloud/customRoute/v1/routes/createDocumentwithCoordinate.js @@ -333,7 +333,7 @@ export default async function createDocumentwithCoordinate(request, response) { ); } else { replaceVar = { - subject: `${parseExtUser.Name} has requested you to sign "${name}"`, + subject: `${parseExtUser.Name} has requested you to sign "${name}"`, body: email_html, }; }