diff --git a/microfrontends/SignDocuments/src/Component/PdfRequestFiles.js b/microfrontends/SignDocuments/src/Component/PdfRequestFiles.js
index 012f4e347..a851baac3 100644
--- a/microfrontends/SignDocuments/src/Component/PdfRequestFiles.js
+++ b/microfrontends/SignDocuments/src/Component/PdfRequestFiles.js
@@ -11,15 +11,13 @@ import { HTML5Backend } from "react-dnd-html5-backend";
import { useParams } from "react-router-dom";
import SignPad from "./component/signPad";
import RenderAllPdfPage from "./component/renderAllPdfPage";
-import {
- getBase64FromIMG,
- getBase64FromUrl
-} from "../utils/Utils";
+import { getBase64FromIMG, getBase64FromUrl } from "../utils/Utils";
import Loader from "./component/loader";
import HandleError from "./component/HandleError";
import Nodata from "./component/Nodata";
import Header from "./component/header";
import RenderPdf from "./component/renderPdf";
+import CustomModal from "./component/CustomModal";
function PdfRequestFiles() {
const { docId } = useParams();
@@ -191,7 +189,7 @@ function PdfRequestFiles() {
//comparison auditTrail user details with signers user details
for (let i = 0; i < signerRes.length; i++) {
const signerId = signerRes[i].objectId;
-
+
let isSigned = false;
for (let j = 0; j < checkDocIdExist.length; j++) {
const signedExist =
@@ -912,6 +910,7 @@ function PdfRequestFiles() {
//function for set decline true on press decline button
const declineDoc = async () => {
+ setIsDecline({ isDeclined: false });
const data = {
IsDeclined: true
};
@@ -984,6 +983,36 @@ function PdfRequestFiles() {
)}
+ {/* this modal is used to show decline alert */}
+
+ Are you sure want to decline this document ?
+
+ ) : isDecline.currnt === "YouDeclined" ? (
+
You have declined this document!
+ ) : (
+ isDecline.currnt === "another" && (
+
+ You cannot sign this document as it has been declined by
+ one or more person(s).
+
+ )
+ )
+ }
+ footerMessage={isDecline.currnt === "Sure"}
+ declineDoc={declineDoc}
+ setIsDecline={setIsDecline}
+ />
+ {/* this modal is used for show expired alert */}
+
{/* this component used to render all pdf pages in left side */}
500 && "20px"
}}
>
-
-
- Document Expired!
-
-
-
-
- This Document is no longer available.
-
-
-
- {/* this modal is used for show decline alert */}
-
-
- Document Declined Alert!
-
-
-
- {isDecline.currnt === "Sure" ? (
-
- Are you sure want to decline this document ?
-
- ) : isDecline.currnt === "YouDeclined" ? (
-
You have declined this document!
- ) : (
- isDecline.currnt === "another" && (
-
- You cannot sign this document as it has been declined by
- one or more person(s).
-
- )
- )}
-
-
- {isDecline.currnt === "Sure" && (
- <>
-
-
- >
- )}
-
-
{/* this modal is used show this document is already sign */}
diff --git a/microfrontends/SignDocuments/src/Component/component/CustomModal.js b/microfrontends/SignDocuments/src/Component/component/CustomModal.js
new file mode 100644
index 000000000..dad3790b6
--- /dev/null
+++ b/microfrontends/SignDocuments/src/Component/component/CustomModal.js
@@ -0,0 +1,51 @@
+import React from "react";
+import "../../css/customModal.css";
+import "../../css/signature.css";
+
+function CustomModal({
+ show,
+ headMsg,
+ bodyMssg,
+ footerMessage,
+ declineDoc,
+ setIsDecline
+}) {
+ return (
+ show && (
+
+
+
{headMsg && headMsg}
+
+
{bodyMssg && bodyMssg}
+
+ {footerMessage && (
+
+
+
+
+ )}
+
+
+ )
+ );
+}
+
+export default CustomModal;
diff --git a/microfrontends/SignDocuments/src/Component/component/defaultSignature.js b/microfrontends/SignDocuments/src/Component/component/defaultSignature.js
index 782133bea..5bc7fedd9 100644
--- a/microfrontends/SignDocuments/src/Component/component/defaultSignature.js
+++ b/microfrontends/SignDocuments/src/Component/component/defaultSignature.js
@@ -1,5 +1,5 @@
-import React, { useEffect } from "react";
-import axios from "axios";
+import React from "react";
+
function DefaultSignature({
themeColor,
diff --git a/microfrontends/SignDocuments/src/Component/component/emailComponent.js b/microfrontends/SignDocuments/src/Component/component/emailComponent.js
index af6ecf0e4..bdbb1eb52 100644
--- a/microfrontends/SignDocuments/src/Component/component/emailComponent.js
+++ b/microfrontends/SignDocuments/src/Component/component/emailComponent.js
@@ -26,7 +26,7 @@ function EmailComponent({
//function for send email
const sendEmail = async () => {
setIsLoading(true);
- let sendMail, recipent;
+ let sendMail;
for (let i = 0; i < emailCount.length; i++) {
try {
diff --git a/microfrontends/SignDocuments/src/Component/recipientSignPdf.js b/microfrontends/SignDocuments/src/Component/recipientSignPdf.js
index a60627218..1acd56a64 100644
--- a/microfrontends/SignDocuments/src/Component/recipientSignPdf.js
+++ b/microfrontends/SignDocuments/src/Component/recipientSignPdf.js
@@ -23,8 +23,8 @@ import Loader from "./component/loader";
import HandleError from "./component/HandleError";
import Nodata from "./component/Nodata";
import Header from "./component/header";
-import ModalComponent from "./component/modalComponent";
import RenderPdf from "./component/renderPdf";
+import CustomModal from "./component/CustomModal";
function EmbedPdfImage() {
const { id, contactBookId } = useParams();
const [isSignPad, setIsSignPad] = useState(false);
@@ -953,6 +953,34 @@ function EmbedPdfImage() {
) : (
+ {/* this modal is used to show decline alert */}
+ Are you sure want to decline this document ?
+ ) : isDecline.currnt === "YouDeclined" ? (
+
You have declined this document!
+ ) : (
+ isDecline.currnt === "another" && (
+
+ You cannot sign this document as it has been declined by one
+ or more person(s).
+
+ )
+ )
+ }
+ footerMessage={isDecline.currnt === "Sure"}
+ declineDoc={declineDoc}
+ setIsDecline={setIsDecline}
+ />
+ {/* this modal is used for show expired alert */}
+
{/* this component used for UI interaction and show their functionality */}
{pdfLoadFail.status &&
!isExpired &&
@@ -975,57 +1003,6 @@ function EmbedPdfImage() {
marginRight: pdfOriginalWidth > 500 && "20px"
}}
>
- {/* this modal is used for show decline alert */}
-
-
- Document Declined Alert!
-
-
-
- {isDecline.currnt === "Sure" ? (
-
Are you sure want to decline this document ?
- ) : isDecline.currnt === "YouDeclined" ? (
-
You have declined this document!
- ) : (
- isDecline.currnt === "another" && (
-
- You cannot sign this document as it has been declined by
- one or more person(s).
-