diff --git a/.all-contributorsrc b/.all-contributorsrc
index c6fe8646b..1a28fb5e9 100644
--- a/.all-contributorsrc
+++ b/.all-contributorsrc
@@ -205,6 +205,33 @@
"contributions": [
"code"
]
+ },
+ {
+ "login": "ugoconsonni",
+ "name": "ugoconsonni",
+ "avatar_url": "https://avatars.githubusercontent.com/u/13661702?v=4",
+ "profile": "https://github.com/ugoconsonni",
+ "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"
+ ]
+ },
+ {
+ "login": "Zathiel",
+ "name": "Zathiel",
+ "avatar_url": "https://avatars.githubusercontent.com/u/26553418?v=4",
+ "profile": "https://github.com/Zathiel",
+ "contributions": [
+ "code"
+ ]
}
]
}
diff --git a/README.md b/README.md
index 82a1c3b4c..24e1046fc 100644
--- a/README.md
+++ b/README.md
@@ -134,6 +134,9 @@ We would like to thank all our contributors and users for their support and feed
 Vikram 💻 |
+  ugoconsonni 💻 |
+  Daniel Mutwiri 💻 |
+  Zathiel 💻 |
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.
diff --git a/apps/OpenSign/src/pages/PlaceHolderSign.js b/apps/OpenSign/src/pages/PlaceHolderSign.js
index 6fc5fa190..fbda16dad 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 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
+ 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) {
+ isSignatureExist = false;
+ 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 (isSignatureExist) {
+ 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);
@@ -1687,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 7fe144910..027abb889 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,26 @@ 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({
+ header: "Fields required",
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 +723,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;
@@ -1161,7 +1171,7 @@ function SignYourSelf() {
{
setIsAlert({
isShow: false,
@@ -1171,28 +1181,6 @@ function SignYourSelf() {
>
{isAlert.alertMessage}
-
-
-
diff --git a/apps/OpenSignServer/cloud/customRoute/v1/routes/CreateDocumentWithTemplate.js b/apps/OpenSignServer/cloud/customRoute/v1/routes/CreateDocumentWithTemplate.js
index 1e2e0bc9a..9b5c9e8fa 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 68f911ed7..da93d48b6 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);
@@ -279,7 +280,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 : '';
@@ -332,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,
};
}
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,