Skip to content

🔥 The free & Open Source DocuSign alternative

refactor: add comment

RaktimaNXGd9126d6701cb
diff --git a/apps/OpenSign/src/pages/PdfRequestFiles.js b/apps/OpenSign/src/pages/PdfRequestFiles.js
index 2a71a2f4c..a1d768fad 100644
--- a/apps/OpenSign/src/pages/PdfRequestFiles.js
+++ b/apps/OpenSign/src/pages/PdfRequestFiles.js
@@ -747,6 +747,7 @@ function PdfRequestFiles() {
// "parseAppId"
// )}&${localStorage.getItem("_appName")}`;
const hostUrl = window.location.origin;
+ //encode this url value `${pdfDetails?.[0].objectId}/${user.Email}/${objectId}` to base64 using `btoa` function
const encodeBase64 = btoa(
`${pdfDetails?.[0].objectId}/${user.Email}/${objectId}`
);
@@ -1249,9 +1250,9 @@ function PdfRequestFiles() {
isDecline.currnt === "Sure"
? "Are you sure want to decline this document ?"
: isDecline.currnt === "YouDeclined"
- ? "You have declined this document!"
- : isDecline.currnt === "another" &&
- "You can not sign this document as it has been declined/revoked."
+ ? "You have declined this document!"
+ : isDecline.currnt === "another" &&
+ "You can not sign this document as it has been declined/revoked."
}
footerMessage={isDecline.currnt === "Sure"}
declineDoc={declineDoc}
diff --git a/apps/OpenSign/src/pages/PlaceHolderSign.js b/apps/OpenSign/src/pages/PlaceHolderSign.js
index 516ffa68c..978eec980 100644
--- a/apps/OpenSign/src/pages/PlaceHolderSign.js
+++ b/apps/OpenSign/src/pages/PlaceHolderSign.js
@@ -969,7 +969,7 @@ function PlaceHolderSign() {
for (let i = 0; i < signerMail.length; i++) {
const objectId = signerMail[i].objectId;
const hostUrl = window.location.origin;
- //convert this url documentId/signersEmail/signerObjId base64 and send url
+ //encode this url value `${pdfDetails?.[0].objectId}/${signerMail[i].Email}/${objectId}` to base64 using `btoa` function
const encodeBase64 = btoa(
`${pdfDetails?.[0].objectId}/${signerMail[i].Email}/${objectId}`
);
@@ -1049,7 +1049,7 @@ function PlaceHolderSign() {
};
const objectId = signerMail[i].objectId;
const hostUrl = window.location.origin;
- //convert this url documentId/signersEmail/signerObjId base64 and send url
+ //encode this url value `${pdfDetails?.[0].objectId}/${signerMail[i].Email}/${objectId}` to base64 using `btoa` function
const encodeBase64 = btoa(
`${pdfDetails?.[0].objectId}/${signerMail[i].Email}/${objectId}`
);
diff --git a/apps/OpenSign/src/primitives/GetReportDisplay.js b/apps/OpenSign/src/primitives/GetReportDisplay.js
index d492b83e4..fe54580cd 100644
--- a/apps/OpenSign/src/primitives/GetReportDisplay.js
+++ b/apps/OpenSign/src/primitives/GetReportDisplay.js
@@ -293,6 +293,7 @@ const ReportTable = (props) => {
// const baseURL = serverUrl.replace(/\//g, "%2F");
const getUrl = (x) => {
+ //encode this url value `${item.objectId}/${x.Email}/${x.objectId}` to base64 using `btoa` function
const encodeBase64 = btoa(`${item.objectId}/${x.Email}/${x.objectId}`);
return `${host}/login/${encodeBase64}`;
};
diff --git a/apps/OpenSignServer/cloud/customRoute/v1/routes/CreateDocumentWithTemplate.js b/apps/OpenSignServer/cloud/customRoute/v1/routes/CreateDocumentWithTemplate.js
index bc5343487..a075f3aae 100644
--- a/apps/OpenSignServer/cloud/customRoute/v1/routes/CreateDocumentWithTemplate.js
+++ b/apps/OpenSignServer/cloud/customRoute/v1/routes/CreateDocumentWithTemplate.js
@@ -219,6 +219,7 @@ export default async function createDocumentWithTemplate(request, response) {
const objectId = contactMail[i].contactPtr.objectId;
const hostUrl = baseUrl.origin;
// let signPdf = `${hostUrl}/login/${res.id}/${contactMail[i].email}/${objectId}/${serverParams}`;
+ //encode this url value `${res.id}/${contactMail[i].email}/${objectId}` to base64 using `btoa` function
const encodeBase64 = btoa(`${res.id}/${contactMail[i].email}/${objectId}`);
let signPdf = `${hostUrl}/login/${encodeBase64}`;
const openSignUrl = 'https://www.opensignlabs.com/contact-us';
@@ -317,6 +318,7 @@ export default async function createDocumentWithTemplate(request, response) {
properties: { response_code: 200 },
});
}
+ //encode this url value `${res.id}/${x.email}/${x.contactPtr.objectId}` to base64 using `btoa` function
const encodeBase64 = btoa(`${res.id}/${x.email}/${x.contactPtr.objectId}`);
return response.json({
objectId: res.id,
diff --git a/apps/OpenSignServer/cloud/customRoute/v1/routes/createDocumentwithCoordinate.js b/apps/OpenSignServer/cloud/customRoute/v1/routes/createDocumentwithCoordinate.js
index 435bda342..b954e046e 100644
--- a/apps/OpenSignServer/cloud/customRoute/v1/routes/createDocumentwithCoordinate.js
+++ b/apps/OpenSignServer/cloud/customRoute/v1/routes/createDocumentwithCoordinate.js
@@ -278,6 +278,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}`);
let signPdf = `${hostUrl}/login/${encodeBase64}`;
// let signPdf = `${hostUrl}/login/${res.id}/${contactMail[i].email}/${objectId}/${serverParams}`;
@@ -361,6 +362,7 @@ export default async function createDocumentwithCoordinate(request, response) {
properties: { response_code: 200 },
});
}
+ //encode this url value `${res.id}/${x.email}/${x.contactPtr.objectId}` to base64 using `btoa` function
const encodeBase64 = btoa(`${res.id}/${x.email}/${x.contactPtr.objectId}`);
return response.json({
objectId: res.id,