diff --git a/microfrontends/SignDocuments/src/Component/PdfRequestFiles.js b/microfrontends/SignDocuments/src/Component/PdfRequestFiles.js
index 6d2d33061..d741162d5 100644
--- a/microfrontends/SignDocuments/src/Component/PdfRequestFiles.js
+++ b/microfrontends/SignDocuments/src/Component/PdfRequestFiles.js
@@ -192,7 +192,6 @@ function PdfRequestFiles() {
//check document is signed or not
if (checkDocIdExist && checkDocIdExist.length > 0) {
- setAlreadySign(true);
setIsDocId(true);
const signerRes = res[0].Signers;
//comparison auditTrail user details with signers user details
diff --git a/microfrontends/SignDocuments/src/Component/component/header.js b/microfrontends/SignDocuments/src/Component/component/header.js
index c68ad4ada..4d971cfb4 100644
--- a/microfrontends/SignDocuments/src/Component/component/header.js
+++ b/microfrontends/SignDocuments/src/Component/component/header.js
@@ -27,13 +27,13 @@ function Header({
signersdata,
isMailSend,
alertSendEmail,
- isSigned,
isCompleted,
isShowHeader,
decline,
currentSigner,
dataTut4,
- alreadySign
+ alreadySign,
+ isSignYourself
}) {
const isMobile = window.innerWidth < 767;
const navigate = useNavigate();
@@ -61,12 +61,19 @@ function Header({
const pdf = await getBase64FromUrl(pdfUrl);
const isAndroidDevice = navigator.userAgent.match(/Android/i);
- const isAppleDevice = (/iPad|iPhone|iPod/.test(navigator.platform) || (navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1)) && !window.MSStream
+ const isAppleDevice =
+ (/iPad|iPhone|iPod/.test(navigator.platform) ||
+ (navigator.platform === "MacIntel" && navigator.maxTouchPoints > 1)) &&
+ !window.MSStream;
if (isAndroidDevice || isAppleDevice) {
- const byteArray = Uint8Array.from(atob(pdf).split('').map(char => char.charCodeAt(0)));
- const blob = new Blob([byteArray], { type: 'application/pdf' });
+ const byteArray = Uint8Array.from(
+ atob(pdf)
+ .split("")
+ .map((char) => char.charCodeAt(0))
+ );
+ const blob = new Blob([byteArray], { type: "application/pdf" });
const blobUrl = URL.createObjectURL(blob);
- window.open(blobUrl, '_blank');
+ window.open(blobUrl, "_blank");
} else {
printModule({ printable: pdf, type: "pdf", base64: true });
}
@@ -75,19 +82,76 @@ function Header({
//handle download signed pdf
const handleDownloadPdf = () => {
const pdfName = pdfDetails[0] && pdfDetails[0].Name;
-
- saveAs(pdfUrl, `${sanitizeFileName(pdfName)}_signed_by_OpenSign™.pdf`);
+ saveAs(pdfUrl, `${sanitizeFileName(pdfName)}_signed_by_OpenSign™.pdf`);
};
-
+
const sanitizeFileName = (pdfName) => {
// Replace spaces with underscore
return pdfName.replace(/ /g, '_');
}
-
-
+ //certificate generate and download component in mobile view
+ const CertificateDropDown = () => {
+ //after generate download certifcate pdf
+ const handleDownload = (pdfBlob, fileName) => {
+ if (pdfBlob) {
+ const url = window.URL.createObjectURL(pdfBlob);
+ // Create a temporary anchor element
+ const link = document.createElement("a");
+ link.href = url;
+ link.download = fileName;
+ // Append the anchor to the body
+ document.body.appendChild(link);
+ // Programmatically click the anchor to trigger the download
+ link.click();
+ // Remove the anchor from the body
+ document.body.removeChild(link);
+ // Release the object URL to free up resources
+ window.URL.revokeObjectURL(url);
+ }
+ };
+ return (
+