refactor: add comment

This commit is contained in:
RaktimaNXG
2024-05-07 16:04:47 +05:30
parent 51c3a0f71a
commit d9126d6701
5 changed files with 11 additions and 5 deletions
+4 -3
View File
@@ -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}
+2 -2
View File
@@ -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}`
);
@@ -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}`;
};
@@ -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,
@@ -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,