diff --git a/microfrontends/SignDocuments/src/Component/PdfRequestFiles.js b/microfrontends/SignDocuments/src/Component/PdfRequestFiles.js index a851baac3..6d2d33061 100644 --- a/microfrontends/SignDocuments/src/Component/PdfRequestFiles.js +++ b/microfrontends/SignDocuments/src/Component/PdfRequestFiles.js @@ -62,7 +62,8 @@ function PdfRequestFiles() { const [isSigned, setIsSigned] = useState(false); const [isExpired, setIsExpired] = useState(false); const [alreadySign, setAlreadySign] = useState(false); - + const [containerWH, setContainerWH] = useState({}); + const divRef = useRef(null); const rowLevel = localStorage.getItem("rowlevel") && JSON.parse(localStorage.getItem("rowlevel")); @@ -94,6 +95,14 @@ function PdfRequestFiles() { getDocumentDetails(); } }, []); + useEffect(() => { + if (divRef.current) { + setContainerWH({ + width: divRef.current.offsetWidth, + height: divRef.current.offsetHeight + }); + } + }, [divRef.current]); //function for get document details for perticular signer with signer'object id const getDocumentDetails = async () => { @@ -982,9 +991,10 @@ function PdfRequestFiles() { )} -
+
{/* this modal is used to show decline alert */} {/* this modal is used for show expired alert */} +
{headMsg && headMsg}
diff --git a/microfrontends/SignDocuments/src/Component/recipientSignPdf.js b/microfrontends/SignDocuments/src/Component/recipientSignPdf.js index 1acd56a64..8d35da7fc 100644 --- a/microfrontends/SignDocuments/src/Component/recipientSignPdf.js +++ b/microfrontends/SignDocuments/src/Component/recipientSignPdf.js @@ -67,12 +67,13 @@ function EmbedPdfImage() { status: false, type: "load" }); - + const [containerWH, setContainerWH] = useState({}); const docId = id && id; const isMobile = window.innerWidth < 767; const index = xyPostion.findIndex((object) => { return object.pageNumber === pageNumber; }); + const divRef = useRef(null); useEffect(() => { const clientWidth = window.innerWidth; @@ -82,6 +83,14 @@ function EmbedPdfImage() { setPdfNewWidth(pdfWidth); getDocumentDetails(); }, []); + useEffect(() => { + if (divRef.current) { + setContainerWH({ + width: divRef.current.offsetWidth, + height: divRef.current.offsetHeight + }); + } + }, [divRef.current]); //function for get document details for perticular signer with signer'object id const getDocumentDetails = async () => { @@ -952,9 +961,10 @@ function EmbedPdfImage() { ) : noData ? ( ) : ( -
+
{/* this modal is used to show decline alert */} {/* this modal is used for show expired alert */}