Skip to content

🔥 The free & Open Source DocuSign alternative

Merge branch 'staging' of https://github.com/OpenSignLabs/OpenSign into feat_widget

RaktimaNXG708a3f4ad982
diff --cc microfrontends/SignDocuments/package-lock.json
index 7ff11f516,671905ecc..4d86ba058
--- a/microfrontends/SignDocuments/package-lock.json
+++ b/microfrontends/SignDocuments/package-lock.json
@@@ -17,8 -17,7 +17,8 @@@
"file-saver": "^2.0.5",
"gh-pages": "^6.0.0",
"mf-cra": "^0.0.5",
+ "moment": "^2.30.1",
- "parse": "^4.2.0",
+ "parse": "^4.3.1",
"pdf-lib": "^1.17.1",
"print-js": "^1.6.0",
"radix-ui": "^1.0.1",
@@@ -17970,25 -17991,13 +18047,26 @@@
"resolved": "https://registry.npmjs.org/react-native-crypto-js/-/react-native-crypto-js-1.0.0.tgz",
"integrity": "sha512-FNbLuG/HAdapQoybeZSoes1PWdOj0w242gb+e1R0hicf3Gyj/Mf8M9NaED2AnXVOX01b2FXomwUiw1xP1K+8sA=="
},
+ "node_modules/react-onclickoutside": {
+ "version": "6.13.0",
+ "resolved": "https://registry.npmjs.org/react-onclickoutside/-/react-onclickoutside-6.13.0.tgz",
+ "integrity": "sha512-ty8So6tcUpIb+ZE+1HAhbLROvAIJYyJe/1vRrrcmW+jLsaM+/powDRqxzo6hSh9CuRZGSL1Q8mvcF5WRD93a0A==",
+ "funding": {
+ "type": "individual",
+ "url": "https://github.com/Pomax/react-onclickoutside/blob/master/FUNDING.md"
+ },
+ "peerDependencies": {
+ "react": "^15.5.x || ^16.x || ^17.x || ^18.x",
+ "react-dom": "^15.5.x || ^16.x || ^17.x || ^18.x"
+ }
+ },
"node_modules/react-pdf": {
- "version": "7.4.0",
- "resolved": "https://registry.npmjs.org/react-pdf/-/react-pdf-7.4.0.tgz",
- "integrity": "sha512-L2GIUc9eBLdb51DRqUe3zlkTmvOq7KQN5cKmgcrWdnWNwhYgrOGgpJQ3f56kG26G+B5GoasAHI6RjQrLfTjTnw==",
+ "version": "7.7.0",
+ "resolved": "https://registry.npmjs.org/react-pdf/-/react-pdf-7.7.0.tgz",
+ "integrity": "sha512-704ObLnRDm5lixL4e6NXNLaincBHGNLo+NGdbO3rEXE963NlNzwLxFpmKcbdXHAMQL4rYJQWb1L0w5IL6y8Osw==",
"dependencies": {
"clsx": "^2.0.0",
+ "dequal": "^2.0.3",
"make-cancellable-promise": "^1.3.1",
"make-event-props": "^1.6.0",
"merge-refs": "^1.2.1",
diff --cc microfrontends/SignDocuments/package.json
index aa8f72a0b,c269de2dd..a1a69abfc
--- a/microfrontends/SignDocuments/package.json
+++ b/microfrontends/SignDocuments/package.json
@@@ -13,8 -13,7 +13,8 @@@
"file-saver": "^2.0.5",
"gh-pages": "^6.0.0",
"mf-cra": "^0.0.5",
+ "moment": "^2.30.1",
- "parse": "^4.2.0",
+ "parse": "^4.3.1",
"pdf-lib": "^1.17.1",
"print-js": "^1.6.0",
"radix-ui": "^1.0.1",
diff --cc microfrontends/SignDocuments/src/Component/PdfRequestFiles.js
index 6442a6c8d,992305225..005cc4cb2
--- a/microfrontends/SignDocuments/src/Component/PdfRequestFiles.js
+++ b/microfrontends/SignDocuments/src/Component/PdfRequestFiles.js
@@@ -86,9 -79,7 +86,10 @@@ function PdfRequestFiles()
const [isExpired, setIsExpired] = useState(false);
const [alreadySign, setAlreadySign] = useState(false);
const [containerWH, setContainerWH] = useState({});
+ const [validateAlert, setValidateAlert] = useState(false);
+ const [widgetsTour, setWidgetsTour] = useState(false);
+ const [minRequiredCount, setminRequiredCount] = useState();
+ const [sendInOrder, setSendInOrder] = useState(false);
const divRef = useRef(null);
const isMobile = window.innerWidth < 767;
const rowLevel =
@@@ -295,160 -330,295 +342,361 @@@
});
};
+ const checkSendInOrder = () => {
+ if (sendInOrder) {
+ const index = pdfDetails?.[0].Signers.findIndex(
+ (x) => x.Email === jsonSender.email
+ );
+ const newIndex = index - 1;
+ if (newIndex !== -1) {
+ const user = pdfDetails?.[0].Signers[newIndex];
+ const isPrevUserSigned =
+ pdfDetails?.[0].AuditTrail &&
+ pdfDetails?.[0].AuditTrail.some(
+ (x) =>
+ x.UserPtr.objectId === user.objectId && x.Activity === "Signed"
+ );
+ if (isPrevUserSigned) {
+ return true;
+ } else {
+ return false;
+ }
+ } else {
+ return true;
+ }
+ } else {
+ return true;
+ }
+ };
//function for embed signature or image url in pdf
async function embedImages() {
+ const validateSigning = checkSendInOrder();
+ if (validateSigning) {
- const checkUser = signerPos.filter(
- (data) => data.signerObjId === signerObjectId
- );
- if (checkUser && checkUser.length > 0) {
- let checkSignUrl = [];
- const checkSign = checkUser[0].placeHolder.filter(
- (data, ind) => data.pos
+ const checkUser = signerPos.filter(
+ (data) => data.signerObjId === signerObjectId
+ );
+ if (checkUser && checkUser.length > 0) {
+ let unSignUrlData,
+ checkboxExist,
+ isReadOnly,
+ minCountAlert = false,
+ checkboxKey;
+
+ for (let i = 0; i < checkUser[0].placeHolder.length; i++) {
+ checkboxExist = checkUser[0].placeHolder[i].pos.some(
+ (data) => data.type === "checkbox"
);
- for (let i = 0; i < checkSign.length; i++) {
- const posData = checkSign[i].pos.filter((pos) => !pos.SignUrl);
- if (posData && posData.length > 0) {
- checkSignUrl.push(posData);
- }
- }
- if (checkSignUrl && checkSignUrl.length > 0) {
- setIsAlert({
- isShow: true,
- alertMessage: "Please complete your signature!"
- });
+ if (checkboxExist) {
+ isReadOnly = checkUser[0].placeHolder[i].pos.filter(
+ (position) => !position.options?.isReadOnly
+ );
+
+ if (isReadOnly && isReadOnly.length > 0) {
+ for (let i = 0; i < isReadOnly.length; i++) {
+ const minCount =
+ isReadOnly[i].options?.validation?.minRequiredCount;
+ const parseMin = minCount && parseInt(minCount);
+ const maxCount =
+ isReadOnly[i].options?.validation?.maxRequiredCount;
+ const parseMax = maxCount && parseInt(maxCount);
+ const response = isReadOnly[i].options?.response?.length;
+ const defaultValue = isReadOnly[i].options?.defaultValue?.length;
+ if (parseMin === 0 && parseMax === 0) {
+ if (!minCountAlert) {
+ minCountAlert = false;
+ }
+ } else if (parseMin === 0 && parseMax > 0) {
+ if (!minCountAlert) {
+ minCountAlert = false;
+ }
+ } else if (!response) {
+ if (!defaultValue) {
+ if (!minCountAlert) {
+ minCountAlert = true;
+ checkboxKey = isReadOnly[i].key;
+ setminRequiredCount(parseMin);
+ }
+ }
+ } else if (parseMin > 0 && parseMin > response) {
+ if (!minCountAlert) {
+ minCountAlert = true;
+ checkboxKey = isReadOnly[i].key;
+ setminRequiredCount(parseMin);
+ }
+ }
+ }
+ }
} else {
- setIsUiLoading(true);
- const pngUrl = checkUser[0].placeHolder;
- // Load a PDFDocument from the existing PDF bytes
- const existingPdfBytes = await fetch(pdfUrl).then((res) =>
- res.arrayBuffer()
+ unSignUrlData = checkUser[0].placeHolder[i].pos.filter(
+ (pos) => !pos?.SignUrl && !pos.options.response
);
- const pdfDoc = await PDFDocument.load(existingPdfBytes, {
- ignoreEncryption: true
- });
- // let pdfBase64;
+ }
+ }
- //checking if signature is only one then send image url in jpeg formate to server
- // if (pngUrl.length === 1 && pngUrl[0].pos.length === 1) {
- // if (isDocId) {
- // try {
- // pdfBase64 = await getBase64FromUrl(pdfUrl);
- // } catch (err) {
- // console.log(err);
- // }
- // } else {
- // //embed document's object id to all pages in pdf document
- // try {
- // await embedDocId(pdfDoc, documentId, allPages);
- // } catch (err) {
- // console.log(err);
- // }
- // try {
- // pdfBase64 = await pdfDoc.saveAsBase64({
- // useObjectStreams: false
- // });
- // } catch (err) {
- // console.log(err);
- // }
- // }
- // for (let pngData of pngUrl) {
- // const imgUrlList = pngData.pos;
- // const pageNo = pngData.pageNumber;
- // imgUrlList.map(async (data) => {
- // //cheking signUrl is defau;t signature url of custom url
- // let ImgUrl = data.SignUrl;
- // const checkUrl = urlValidator(ImgUrl);
- // //if default signature url then convert it in base 64
- // if (checkUrl) {
- // ImgUrl = await getBase64FromIMG(ImgUrl + "?get");
- // }
- // //function for called convert png signatre to jpeg in base 64
- // convertPNGtoJPEG(ImgUrl)
- // .then((jpegBase64Data) => {
- // const removeBase64Fromjpeg = "data:image/jpeg;base64,";
- // const newImgUrl = jpegBase64Data.replace(
- // removeBase64Fromjpeg,
- // ""
- // );
+ if (checkboxExist && isReadOnly && minCountAlert) {
+ setUnSignedWidgetId(checkboxKey);
+ setWidgetsTour(true);
+ } else if (!checkboxExist && unSignUrlData && unSignUrlData.length > 0) {
+ setUnSignedWidgetId(unSignUrlData[0].key);
+ setWidgetsTour(true);
- } else {
++ }
++ else {
+ setIsUiLoading(true);
+ const pngUrl = checkUser[0].placeHolder;
+ // Load a PDFDocument from the existing PDF bytes
+ const existingPdfBytes = await fetch(pdfUrl).then((res) =>
+ res.arrayBuffer()
+ );
+ const pdfDoc = await PDFDocument.load(existingPdfBytes, {
+ ignoreEncryption: true
+ });
-
++ // let pdfBase64;
+
- // //function for call to embed signature in pdf and get digital signature pdf
- // signPdfFun(
- // newImgUrl,
- // documentId,
- // signerObjectId,
- // pdfOriginalWidth,
- // pngUrl,
- // containerWH,
- // setIsAlert,
- // data,
- // pdfBase64,
- // pageNo
- // )
- // .then((res) => {
- // if (res && res.status === "success") {
- // setPdfUrl(res.data);
- // setIsSigned(true);
- // setSignedSigners([]);
- // setUnSignedSigners([]);
- // getDocumentDetails();
- // } else {
- // setIsAlert({
- // isShow: true,
- // alertMessage: "something went wrong"
- // });
- // }
- // })
- // .catch((err) => {
- // setIsAlert({
- // isShow: true,
- // alertMessage: "something went wrong"
- // });
- // });
- // })
- // .catch((error) => {
- // console.error("Error:", error);
- // });
- // });
- // }
- // }
- // //else if signature is more than one then embed all sign with the use of pdf-lib
- // else if (pngUrl.length > 0 && pngUrl[0].pos.length > 0) {
- const flag = false;
- //embed document's object id to all pages in pdf document
- if (!isDocId) {
- await embedDocId(pdfDoc, documentId, allPages);
- }
- //embed multi signature in pdf
- const pdfBytes = await multiSignEmbed(
- pngUrl,
- pdfDoc,
++ //checking if signature is only one then send image url in jpeg formate to server
++ // if (pngUrl.length === 1 && pngUrl[0].pos.length === 1) {
++ // if (isDocId) {
++ // try {
++ // pdfBase64 = await getBase64FromUrl(pdfUrl);
++ // } catch (err) {
++ // console.log(err);
++ // }
++ // } else {
++ // //embed document's object id to all pages in pdf document
++ // try {
++ // await embedDocId(pdfDoc, documentId, allPages);
++ // } catch (err) {
++ // console.log(err);
++ // }
++ // try {
++ // pdfBase64 = await pdfDoc.saveAsBase64({
++ // useObjectStreams: false
++ // });
++ // } catch (err) {
++ // console.log(err);
++ // }
++ // }
++ // for (let pngData of pngUrl) {
++ // const imgUrlList = pngData.pos;
++ // const pageNo = pngData.pageNumber;
++ // imgUrlList.map(async (data) => {
++ // //cheking signUrl is defau;t signature url of custom url
++ // let ImgUrl = data.SignUrl;
++ // const checkUrl = urlValidator(ImgUrl);
++ // //if default signature url then convert it in base 64
++ // if (checkUrl) {
++ // ImgUrl = await getBase64FromIMG(ImgUrl + "?get");
++ // }
++ // //function for called convert png signatre to jpeg in base 64
++ // convertPNGtoJPEG(ImgUrl)
++ // .then((jpegBase64Data) => {
++ // const removeBase64Fromjpeg = "data:image/jpeg;base64,";
++ // const newImgUrl = jpegBase64Data.replace(
++ // removeBase64Fromjpeg,
++ // ""
++ // );
++
++ // //function for call to embed signature in pdf and get digital signature pdf
++ // signPdfFun(
++ // newImgUrl,
++ // documentId,
++ // signerObjectId,
++ // pdfOriginalWidth,
++ // pngUrl,
++ // containerWH,
++ // setIsAlert,
++ // data,
++ // pdfBase64,
++ // pageNo
++ // )
++ // .then((res) => {
++ // if (res && res.status === "success") {
++ // setPdfUrl(res.data);
++ // setIsSigned(true);
++ // setSignedSigners([]);
++ // setUnSignedSigners([]);
++ // getDocumentDetails();
++ // } else {
++ // setIsAlert({
++ // isShow: true,
++ // alertMessage: "something went wrong"
++ // });
++ // }
++ // })
++ // .catch((err) => {
++ // setIsAlert({
++ // isShow: true,
++ // alertMessage: "something went wrong"
++ // });
++ // });
++ // })
++ // .catch((error) => {
++ // console.error("Error:", error);
++ // });
++ // });
++ // }
++ // }
++ // //else if signature is more than one then embed all sign with the use of pdf-lib
++ // else if (pngUrl.length > 0 && pngUrl[0].pos.length > 0) {
+ const flag = false;
+ const extUserPtr = pdfDetails[0].ExtUserPtr;
+ const HeaderDocId = extUserPtr?.HeaderDocId;
+ //embed document's object id to all pages in pdf document
+ if (!HeaderDocId) {
- if (!isDocId) {
- await embedDocId(pdfDoc, documentId, allPages);
- }
++ if (!isDocId) {
++ await embedDocId(pdfDoc, documentId, allPages);
+ }
++ }
+ //embed multi signature in pdf
+ const pdfBytes = await multiSignEmbed(
+ pngUrl,
+ pdfDoc,
+ pdfOriginalWidth,
+ flag,
+ containerWH
+ );
-
+ //function for call to embed signature in pdf and get digital signature pdf
+ try {
+ const res = await signPdfFun(
+ pdfBytes,
+ documentId,
+ signerObjectId,
pdfOriginalWidth,
- flag,
- containerWH
+ pngUrl,
+ containerWH,
+ setIsAlert
);
- //function for call to embed signature in pdf and get digital signature pdf
- try {
- const res = await signPdfFun(
- pdfBytes,
- documentId,
- signerObjectId,
- pdfOriginalWidth,
- pngUrl,
- containerWH,
- setIsAlert
- );
- if (res && res.status === "success") {
- setPdfUrl(res.data);
- setIsSigned(true);
- setSignedSigners([]);
- setUnSignedSigners([]);
- getDocumentDetails();
- if (sendInOrder) {
- const index = pdfDetails?.[0].Signers.findIndex(
- (x) => x.Email === jsonSender.email
- );
- const newIndex = index + 1;
- const user = pdfDetails?.[0].Signers[newIndex];
- if (user) {
- let sendMail;
- // console.log("pdfDetails", pdfDetails);
- const expireDate = pdfDetails?.[0].ExpiryDate.iso;
- const newDate = new Date(expireDate);
- const localExpireDate = newDate.toLocaleDateString("en-US", {
- day: "numeric",
- month: "long",
- year: "numeric"
- });
- let sender = pdfDetails?.[0].ExtUserPtr.Email;
+ if (res && res.status === "success") {
+ setPdfUrl(res.data);
+ setIsSigned(true);
+ setSignedSigners([]);
+ setUnSignedSigners([]);
+ getDocumentDetails();
++ if (sendInOrder) {
++ const index = pdfDetails?.[0].Signers.findIndex(
++ (x) => x.Email === jsonSender.email
++ );
++ const newIndex = index + 1;
++ const user = pdfDetails?.[0].Signers[newIndex];
++ if (user) {
++ let sendMail;
++ // console.log("pdfDetails", pdfDetails);
++ const expireDate = pdfDetails?.[0].ExpiryDate.iso;
++ const newDate = new Date(expireDate);
++ const localExpireDate = newDate.toLocaleDateString("en-US", {
++ day: "numeric",
++ month: "long",
++ year: "numeric"
++ });
++ let sender = pdfDetails?.[0].ExtUserPtr.Email;
+
- try {
- const imgPng =
- "https://qikinnovation.ams3.digitaloceanspaces.com/logo.png";
- let url = `${localStorage.getItem(
- "baseUrl"
- )}functions/sendmailv3/`;
- const headers = {
- "Content-Type": "application/json",
- "X-Parse-Application-Id":
- localStorage.getItem("parseAppId"),
- sessionToken: localStorage.getItem("accesstoken")
- };
- const serverUrl = localStorage.getItem("baseUrl");
- const newServer = serverUrl.replaceAll("/", "%2F");
- const objectId = user.objectId;
- const serverParams = `${newServer}&${localStorage.getItem(
- "parseAppId"
- )}&${localStorage.getItem("_appName")}`;
++ try {
++ const imgPng =
++ "https://qikinnovation.ams3.digitaloceanspaces.com/logo.png";
++ let url = `${localStorage.getItem(
++ "baseUrl"
++ )}functions/sendmailv3/`;
++ const headers = {
++ "Content-Type": "application/json",
++ "X-Parse-Application-Id":
++ localStorage.getItem("parseAppId"),
++ sessionToken: localStorage.getItem("accesstoken")
++ };
++ const serverUrl = localStorage.getItem("baseUrl");
++ const newServer = serverUrl.replaceAll("/", "%2F");
++ const objectId = user.objectId;
++ const serverParams = `${newServer}&${localStorage.getItem(
++ "parseAppId"
++ )}&${localStorage.getItem("_appName")}`;
+
- const hostUrl =
- window.location.origin + "/loadmf/signmicroapp";
- let signPdf = `${hostUrl}/login/${pdfDetails?.[0].objectId}/${user.Email}/${objectId}/${serverParams}`;
- const openSignUrl =
- "https://www.opensignlabs.com/contact-us";
- const orgName = pdfDetails[0]?.ExtUserPtr.Company
- ? pdfDetails[0].ExtUserPtr.Company
- : "";
- const themeBGcolor = themeColor();
- let params = {
- recipient: user.Email,
- subject: `${pdfDetails?.[0].ExtUserPtr.Name} has requested you to sign ${pdfDetails?.[0].Name}`,
- from: sender,
++ const hostUrl =
++ window.location.origin + "/loadmf/signmicroapp";
++ let signPdf = `${hostUrl}/login/${pdfDetails?.[0].objectId}/${user.Email}/${objectId}/${serverParams}`;
++ const openSignUrl =
++ "https://www.opensignlabs.com/contact-us";
++ const orgName = pdfDetails[0]?.ExtUserPtr.Company
++ ? pdfDetails[0].ExtUserPtr.Company
++ : "";
++ const themeBGcolor = themeColor();
++ let params = {
++ recipient: user.Email,
++ subject: `${pdfDetails?.[0].ExtUserPtr.Name} has requested you to sign ${pdfDetails?.[0].Name}`,
++ from: sender,
+
- html:
- "<html><head><meta http-equiv='Content-Type' content='text/html; charset=UTF-8' /> </head> <body> <div style='background-color: #f5f5f5; padding: 20px'=> <div style=' box-shadow: rgba(0, 0, 0, 0.1) 0px 4px 12px;background: white;padding-bottom: 20px;'> <div style='padding:10px 10px 0 10px'><img src=" +
- imgPng +
- " height='50' style='padding: 20px,width:170px,height:40px' /></div> <div style=' padding: 2px;font-family: system-ui;background-color:" +
- themeBGcolor +
- ";'><p style='font-size: 20px;font-weight: 400;color: white;padding-left: 20px;' > Digital Signature Request</p></div><div><p style='padding: 20px;font-family: system-ui;font-size: 14px; margin-bottom: 10px;'> " +
- pdfDetails?.[0].ExtUserPtr.Name +
- " has requested you to review and sign <strong> " +
- pdfDetails?.[0].Name +
- "</strong>.</p><div style='padding: 5px 0px 5px 25px;display: flex;flex-direction: row;justify-content: space-around;'><table> <tr> <td style='font-weight:bold;font-family:sans-serif;font-size:15px'>Sender</td> <td> </td> <td style='color:#626363;font-weight:bold'>" +
- sender +
- "</td></tr><tr><td style='font-weight:bold;font-family:sans-serif;font-size:15px'>Organization</td> <td> </td><td style='color:#626363;font-weight:bold'> " +
- orgName +
- "</td></tr> <tr> <td style='font-weight:bold;font-family:sans-serif;font-size:15px'>Expires on</td><td> </td> <td style='color:#626363;font-weight:bold'>" +
- localExpireDate +
- "</td></tr><tr> <td></td> <td> </td></tr></table> </div> <div style='margin-left:70px'><a href=" +
- signPdf +
- "> <button style='padding: 12px 12px 12px 12px;background-color: #d46b0f;color: white; border: 0px;box-shadow: rgba(0, 0, 0, 0.05) 0px 6px 24px 0px,rgba(0, 0, 0, 0.08) 0px 0px 0px 1px;font-weight:bold;margin-top:30px'>Sign here</button></a> </div> <div style='display: flex; justify-content: center;margin-top: 10px;'> </div></div></div><div><p> This is an automated email from OpenSignâ„¢. For any queries regarding this email, please contact the sender " +
- sender +
- " directly.If you think this email is inappropriate or spam, you may file a complaint with OpenSignâ„¢ <a href= " +
- openSignUrl +
- " target=_blank>here</a>.</p> </div></div></body> </html>"
- };
- sendMail = await axios.post(url, params, {
- headers: headers
- });
- } catch (error) {
- console.log("error", error);
- }
++ html:
++ "<html><head><meta http-equiv='Content-Type' content='text/html; charset=UTF-8' /> </head> <body> <div style='background-color: #f5f5f5; padding: 20px'=> <div style=' box-shadow: rgba(0, 0, 0, 0.1) 0px 4px 12px;background: white;padding-bottom: 20px;'> <div style='padding:10px 10px 0 10px'><img src=" +
++ imgPng +
++ " height='50' style='padding: 20px,width:170px,height:40px' /></div> <div style=' padding: 2px;font-family: system-ui;background-color:" +
++ themeBGcolor +
++ ";'><p style='font-size: 20px;font-weight: 400;color: white;padding-left: 20px;' > Digital Signature Request</p></div><div><p style='padding: 20px;font-family: system-ui;font-size: 14px; margin-bottom: 10px;'> " +
++ pdfDetails?.[0].ExtUserPtr.Name +
++ " has requested you to review and sign <strong> " +
++ pdfDetails?.[0].Name +
++ "</strong>.</p><div style='padding: 5px 0px 5px 25px;display: flex;flex-direction: row;justify-content: space-around;'><table> <tr> <td style='font-weight:bold;font-family:sans-serif;font-size:15px'>Sender</td> <td> </td> <td style='color:#626363;font-weight:bold'>" +
++ sender +
++ "</td></tr><tr><td style='font-weight:bold;font-family:sans-serif;font-size:15px'>Organization</td> <td> </td><td style='color:#626363;font-weight:bold'> " +
++ orgName +
++ "</td></tr> <tr> <td style='font-weight:bold;font-family:sans-serif;font-size:15px'>Expires on</td><td> </td> <td style='color:#626363;font-weight:bold'>" +
++ localExpireDate +
++ "</td></tr><tr> <td></td> <td> </td></tr></table> </div> <div style='margin-left:70px'><a href=" +
++ signPdf +
++ "> <button style='padding: 12px 12px 12px 12px;background-color: #d46b0f;color: white; border: 0px;box-shadow: rgba(0, 0, 0, 0.05) 0px 6px 24px 0px,rgba(0, 0, 0, 0.08) 0px 0px 0px 1px;font-weight:bold;margin-top:30px'>Sign here</button></a> </div> <div style='display: flex; justify-content: center;margin-top: 10px;'> </div></div></div><div><p> This is an automated email from OpenSignâ„¢. For any queries regarding this email, please contact the sender " +
++ sender +
++ " directly.If you think this email is inappropriate or spam, you may file a complaint with OpenSignâ„¢ <a href= " +
++ openSignUrl +
++ " target=_blank>here</a>.</p> </div></div></body> </html>"
++ };
++ sendMail = await axios.post(url, params, {
++ headers: headers
++ });
++ } catch (error) {
++ console.log("error", error);
+ }
+ }
- } else {
- setIsAlert({
- isShow: true,
- alertMessage: "something went wrong"
- });
+ }
- } catch (err) {
+ } else {
setIsAlert({
isShow: true,
alertMessage: "something went wrong"
});
}
+ } catch (err) {
+ setIsAlert({
+ isShow: true,
+ alertMessage: "something went wrong"
+ });
}
-
- setIsSignPad(false);
- // }
- } else {
- setIsAlert({
- isShow: true,
- alertMessage: "something went wrong"
- });
}
-
+ setIsSignPad(false);
} else {
setIsAlert({
isShow: true,
- alertMessage:
- "Please wait for your turn to sign this document, as it has been set up by the creator to be signed in a specific order; you'll be notified when it's your turn."
+ alertMessage: "something went wrong"
});
}
++ } else {
++ setIsAlert({
++ isShow: true,
++ alertMessage:
++ "Please wait for your turn to sign this document, as it has been set up by the creator to be signed in a specific order; you'll be notified when it's your turn."
++ });
}
-
++}
+ //function for update TourStatus
+ const closeTour = async () => {
+ setWidgetsTour(false);
+ };
+
+ const tourConfig = [
+ {
+ selector: '[data-tut="IsSigned"]',
+ content: minRequiredCount
+ ? `Please confirm that you have selected at least ${minRequiredCount} checkboxes.`
+ : "Ensure this field is accurately filled and meets all requirements.",
+ position: "top",
+ style: { fontSize: "13px" }
+ }
+ ];
//function for get pdf page details
const pageDetails = async (pdf) => {
diff --cc microfrontends/SignDocuments/src/Component/placeHolderSign.js
index 30770e9af,474fc40fd..4e9c86b57
--- a/microfrontends/SignDocuments/src/Component/placeHolderSign.js
+++ b/microfrontends/SignDocuments/src/Component/placeHolderSign.js
@@@ -90,15 -84,7 +90,16 @@@ function PlaceHolderSign()
const [signerExistModal, setSignerExistModal] = useState(false);
const [isDontShow, setIsDontShow] = useState(false);
const [isDragging, setIsDragging] = useState(false);
+ const [showDropdown, setShowDropdown] = useState(false);
+ const [widgetType, setWidgetType] = useState("");
+ const [isUiLoading, setIsUiLoading] = useState(false);
+ const [isRadio, setIsRadio] = useState(false);
+ const [currWidgetsDetails, setCurrWidgetsDetails] = useState([]);
+ const [selectWidgetId, setSelectWidgetId] = useState("");
+ const [isCheckbox, setIsCheckbox] = useState(false);
+ const [isNameModal, setIsNameModal] = useState(false);
+ const [widgetName, setWidgetName] = useState(false);
+ const [mailStatus, setMailStatus] = useState("");
const color = [
"#93a3db",
"#e6c3db",