From d42e11c5c155d6e448261ba975a01f4b4e55fb4b Mon Sep 17 00:00:00 2001 From: RaktimaNXG Date: Tue, 7 Nov 2023 11:32:25 +0530 Subject: [PATCH] fix: blocking screen by warning for expired and decline document --- .../src/Component/PdfRequestFiles.js | 15 +- .../src/Component/component/CustomModal.js | 12 +- .../src/Component/recipientSignPdf.js | 15 +- .../SignDocuments/src/css/customModal.css | 12 +- .../SignDocuments/src/css/signature.css | 1546 ++++++++--------- 5 files changed, 807 insertions(+), 793 deletions(-) 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 */}