diff --git a/microfrontends/SignDocuments/package-lock.json b/microfrontends/SignDocuments/package-lock.json
index aeedb863c..98359a78d 100644
--- a/microfrontends/SignDocuments/package-lock.json
+++ b/microfrontends/SignDocuments/package-lock.json
@@ -38,7 +38,6 @@
"react-select": "^5.8.0",
"react-signature-canvas": "^1.0.6",
"reactour": "^1.19.1",
- "select-dom": "^9.0.0",
"web-vitals": "^2.1.4"
}
},
@@ -18883,20 +18882,6 @@
"resolved": "https://registry.npmjs.org/scrollparent/-/scrollparent-2.0.1.tgz",
"integrity": "sha512-HSdN78VMvFCSGCkh0oYX/tY4R3P1DW61f8+TeZZ4j2VLgfwvw0bpRSOv4PCVKisktIwbzHCfZsx+rLbbDBqIBA=="
},
- "node_modules/select-dom": {
- "version": "9.0.0",
- "resolved": "https://registry.npmjs.org/select-dom/-/select-dom-9.0.0.tgz",
- "integrity": "sha512-AD1NfASSwJQc1Sy713R1vT9CMmUSUo2tg0j1FtkRGIxllTphDrkuH2pYYvhRlGaoq3pS6tcKkKS/diEZLy+7BQ==",
- "dependencies": {
- "typed-query-selector": "^2.11.0"
- },
- "engines": {
- "node": ">=16"
- },
- "funding": {
- "url": "https://github.com/sponsors/fregante"
- }
- },
"node_modules/select-hose": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/select-hose/-/select-hose-2.0.0.tgz",
@@ -20403,11 +20388,6 @@
"url": "https://github.com/sponsors/ljharb"
}
},
- "node_modules/typed-query-selector": {
- "version": "2.11.0",
- "resolved": "https://registry.npmjs.org/typed-query-selector/-/typed-query-selector-2.11.0.tgz",
- "integrity": "sha512-qBs4sfmnLlPOyo2oSdvHbIFHe2CPgU54/1UGfSNceb7LARpIEVxUaeRX0Doje6oKpuySS2stqy90R3YrynR8Kg=="
- },
"node_modules/typedarray-to-buffer": {
"version": "3.1.5",
"resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz",
diff --git a/microfrontends/SignDocuments/package.json b/microfrontends/SignDocuments/package.json
index c0e70c06d..1eae68515 100644
--- a/microfrontends/SignDocuments/package.json
+++ b/microfrontends/SignDocuments/package.json
@@ -34,7 +34,6 @@
"react-select": "^5.8.0",
"react-signature-canvas": "^1.0.6",
"reactour": "^1.19.1",
- "select-dom": "^9.0.0",
"web-vitals": "^2.1.4"
},
"scripts": {
diff --git a/microfrontends/SignDocuments/src/Component/LegaDrive/FolderDrive/legaDriveComponent.js b/microfrontends/SignDocuments/src/Component/LegaDrive/FolderDrive/legaDriveComponent.js
index 760ce39af..5edf387e7 100644
--- a/microfrontends/SignDocuments/src/Component/LegaDrive/FolderDrive/legaDriveComponent.js
+++ b/microfrontends/SignDocuments/src/Component/LegaDrive/FolderDrive/legaDriveComponent.js
@@ -20,7 +20,8 @@ function PdfFileComponent({
setDocId,
setIsLoading,
setPdfData,
- isList
+ isList,
+ setIsAlert
}) {
const [rename, setRename] = useState("");
const [renameValue, setRenameValue] = useState("");
@@ -103,7 +104,10 @@ function PdfFileComponent({
// console.log("res", res);
})
.catch((err) => {
- console.log("error updating field is decline ", err);
+ setIsAlert({
+ isShow: true,
+ alertMessage: "something went wrong"
+ });
});
}
};
@@ -187,11 +191,16 @@ function PdfFileComponent({
)
.then((result) => {
const res = result.data;
- const updatedData = pdfData.filter((x) => x.objectId !== docId);
- setPdfData(updatedData);
+ if (res) {
+ const updatedData = pdfData.filter((x) => x.objectId !== docId);
+ setPdfData(updatedData);
+ }
})
.catch((err) => {
- console.log("err", err);
+ setIsAlert({
+ isShow: true,
+ alertMessage: "something went wrong"
+ });
});
};
const handleMoveDocument = async (docData) => {
@@ -243,10 +252,13 @@ function PdfFileComponent({
.then((Listdata) => {
// console.log("Listdata ", Listdata);
- const json = Listdata.data;
-
- const updatedData = pdfData.filter((x) => x.objectId !== updateDocId);
- setPdfData(updatedData);
+ const res = Listdata.data;
+ if (res) {
+ const updatedData = pdfData.filter(
+ (x) => x.objectId !== updateDocId
+ );
+ setPdfData(updatedData);
+ }
})
.catch((err) => {
console.log("err", err);
@@ -276,13 +288,7 @@ function PdfFileComponent({
//component to handle type of document and render according to type
const handleFolderData = (data, ind, listType) => {
- let createddate,
- status,
- isDecline,
- signerExist,
- isComplete,
- signUrl,
- isPlaceholder;
+ let createddate, status, isDecline, signerExist, isComplete, isPlaceholder;
if (data.Type !== "Folder") {
const expireDate = data.ExpiryDate && data.ExpiryDate.iso;
const createdDate = data.createdAt && data.createdAt;
@@ -291,7 +297,7 @@ function PdfFileComponent({
isDecline = data.IsDeclined && data.IsDeclined;
isPlaceholder = data.Placeholders && data.Placeholders;
signerExist = data.Signers && data.Signers;
- signUrl = data.SignedUrl && data.SignedUrl;
+
const expireUpdateDate = new Date(expireDate).getTime();
const currDate = new Date().getTime();
let isExpire = false;
@@ -732,11 +738,8 @@ function PdfFileComponent({
onClick={() => {
setIsDeleteDoc(false);
}}
- style={{
- color: "black"
- }}
type="button"
- className="finishBtn"
+ className="finishBtn cancelBtn"
>
No
diff --git a/microfrontends/SignDocuments/src/Component/LegaDrive/LegaDrive.css b/microfrontends/SignDocuments/src/Component/LegaDrive/LegaDrive.css
index 2997553ce..a74ca1553 100644
--- a/microfrontends/SignDocuments/src/Component/LegaDrive/LegaDrive.css
+++ b/microfrontends/SignDocuments/src/Component/LegaDrive/LegaDrive.css
@@ -116,7 +116,9 @@
margin: 30px;
height: 100%;
}
-
+.inputStyle{
+ border: 1.6px solid #ccc !important;
+}
.folderComponent::-webkit-scrollbar {
display: none;
/* for Chrome, Safari, and Opera */
diff --git a/microfrontends/SignDocuments/src/Component/LegaDrive/LegaDrive.js b/microfrontends/SignDocuments/src/Component/LegaDrive/LegaDrive.js
index fef248eb6..15b3a425b 100644
--- a/microfrontends/SignDocuments/src/Component/LegaDrive/LegaDrive.js
+++ b/microfrontends/SignDocuments/src/Component/LegaDrive/LegaDrive.js
@@ -1,13 +1,9 @@
import React, { useEffect, useState, useRef } from "react";
-import axios from "axios";
import "./LegaDrive.css";
import loader from "../../assests/loader2.gif";
import PdfFileComponent from "./FolderDrive/legaDriveComponent";
-import Modal from "react-bootstrap/Modal";
-import ModalHeader from "react-bootstrap/esm/ModalHeader";
import { themeColor, iconColor } from "../../utils/ThemeColor/backColor";
import { getDrive } from "../../utils/Utils";
-import AlertComponent from "../component/alertComponent";
import { useNavigate } from "react-router-dom";
import Title from "../component/Title";
import Parse from "parse";
@@ -57,32 +53,38 @@ function PdfFile() {
isLoad: true,
message: "This might take some time"
};
-
+ let driveDetails;
setIsLoading(load);
-
- const driveDetails = await getDrive();
- if (driveDetails) {
- if (driveDetails.length > 0) {
- setPdfData(driveDetails);
- sortApps(null, null, driveDetails);
- }
- const data = [
- {
- name: "OpenSign™ Drive",
- objectId: ""
+ try {
+ driveDetails = await getDrive();
+ if (driveDetails) {
+ if (driveDetails.length > 0) {
+ setPdfData(driveDetails);
+ sortApps(null, null, driveDetails);
}
- ];
- setFolderName(data);
- const loadObj = {
- isLoad: false
- };
- setIsLoading(loadObj);
- } else if (driveDetails === "Error: Something went wrong!") {
- const loadObj = {
- isLoad: false
- };
- setHandleError("Error: Something went wrong!");
- setIsLoading(loadObj);
+ const data = [
+ {
+ name: "OpenSign™ Drive",
+ objectId: ""
+ }
+ ];
+ setFolderName(data);
+ const loadObj = {
+ isLoad: false
+ };
+ setIsLoading(loadObj);
+ } else if (driveDetails === "Error: Something went wrong!") {
+ const loadObj = {
+ isLoad: false
+ };
+ setHandleError("Error: Something went wrong!");
+ setIsLoading(loadObj);
+ }
+ } catch (e) {
+ setIsAlert({
+ isShow: true,
+ alertMessage: "something went wrong"
+ });
}
};
//function for get parent folder document list
@@ -92,24 +94,33 @@ function PdfFile() {
message: "This might take some time"
};
setIsLoading(load);
- const driveDetails = await getDrive(docId);
- if (driveDetails) {
- if (driveDetails.length > 0) {
- setPdfData(driveDetails);
- sortApps(null, null, driveDetails);
- } else {
- setPdfData([]);
+ let driveDetails;
+ try {
+ driveDetails = await getDrive(docId);
+
+ if (driveDetails) {
+ if (driveDetails.length > 0) {
+ setPdfData(driveDetails);
+ sortApps(null, null, driveDetails);
+ } else {
+ setPdfData([]);
+ }
+ const loadObj = {
+ isLoad: false
+ };
+ setIsLoading(loadObj);
+ } else if (driveDetails === "Error: Something went wrong!") {
+ const loadObj = {
+ isLoad: false
+ };
+ setHandleError("Error: Something went wrong!");
+ setIsLoading(loadObj);
}
- const loadObj = {
- isLoad: false
- };
- setIsLoading(loadObj);
- } else if (driveDetails === "Error: Something went wrong!") {
- const loadObj = {
- isLoad: false
- };
- setHandleError("Error: Something went wrong!");
- setIsLoading(loadObj);
+ } catch (e) {
+ setIsAlert({
+ isShow: true,
+ alertMessage: "something went wrong!"
+ });
}
};
@@ -187,7 +198,7 @@ function PdfFile() {
} catch (e) {
setIsAlert({
isShow: true,
- alertMessage: "something went wrong"
+ alertMessage: "something went wrong!"
});
}
} else {
@@ -328,11 +339,43 @@ function PdfFile() {
-
+
{
+ setIsAlert({
+ isShow: false,
+ alertMessage: ""
+ });
+ }}
+ >
+
+
{isAlert.alertMessage}
+
+
+
+
+
- Name*
+ Name
+ *
handleFolderName(e)}
@@ -409,11 +453,8 @@ function PdfFile() {
Add
@@ -806,11 +796,8 @@ function PdfRequestFiles() {
alertMessage: ""
});
}}
- style={{
- color: "black"
- }}
type="button"
- className="finishBtn"
+ className="finishBtn cancelBtn"
>
Close
@@ -823,11 +810,8 @@ function PdfRequestFiles() {
alertMessage: ""
});
}}
- style={{
- color: "black"
- }}
type="button"
- className="finishBtn"
+ className="finishBtn cancelBtn"
>
Ok
@@ -851,33 +835,37 @@ function PdfRequestFiles() {
}}
>
{/* this modal is used show this document is already sign */}
+ {
+ setIsCompleted({ isModal: false, isCertificate: true });
+ }}
+ >
+
+
This document has been signed by all Signers.
-
-
- Sign Documents
-
-
-
-
- This document has been signed by all Signers.
-
-
-
-
-
+
-
-
+
+
+
{/* this component is used for signature pad modal */}
{
- // let ImgUrl = data.SignUrl;
- // //cheking signUrl is defau;t signature url of custom url
- // const checkUrl = urlValidator(ImgUrl);
- // //if default signature url then convert it in base 64
- // if (checkUrl) {
- // ImgUrl = await getBase64FromIMG(ImgUrl + "?get");
- // }
- // //function for convert signature png base64 url to jpeg base64
- // 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, data, pdfBase64, pageNo);
- // })
- // .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 (xyPostion.length > 0 && xyPostion[0].pos.length > 0) {
const flag = true;
//embed document's object id to all pages in pdf document
await embedDocId(pdfDoc, documentId, allPages);
@@ -498,7 +453,6 @@ function SignYourSelf() {
//function for call to embed signature in pdf and get digital signature pdf
signPdfFun(pdfBytes, documentId);
- // }
setIsSignPad(false);
setIsEmail(true);
setXyPostion([]);
@@ -507,51 +461,10 @@ function SignYourSelf() {
}
//function for get digital signature
- const signPdfFun = async (
- base64Url,
- documentId,
- xyPosData,
- pdfBase64Url,
- pageNo
- ) => {
- let singleSign;
- const newWidth = containerWH.width;
- const scale = isMobile ? pdfOriginalWidth / newWidth : 1;
-
- // if (xyPostion.length === 1 && xyPostion[0].pos.length === 1) {
- // const xPos = () => {
- // const resizePos = xyPosData.xPosition;
- // if (isMobile) {
- // return resizePos * scale;
- // } else {
- // return resizePos;
- // }
- // };
- // const height = xyPosData.Height ? xyPosData.Height : 60;
- // const resizePos = xyPosData.yBottom;
- // const bottomY = xyPosData.isDrag
- // ? resizePos * scale - height * scale
- // : xyPosData.firstYPos
- // ? resizePos * scale - height * scale + xyPosData.firstYPos
- // : resizePos * scale - height * scale;
-
- // singleSign = {
- // pdfFile: pdfBase64Url,
- // docId: documentId,
- // sign: {
- // Base64: base64Url,
- // Left: xPos(),
- // Bottom: bottomY,
- // Width: placeholderWidth(xyPosData, scale),
- // Height: placeholderHeight(xyPosData, scale),
- // Page: pageNo
- // }
- // };
- // } else if (xyPostion.length > 0 && xyPostion[0].pos.length > 0) {
- singleSign = {
+ const signPdfFun = async (base64Url, documentId) => {
+ const singleSign = {
pdfFile: base64Url,
docId: documentId
- // };
};
await axios
@@ -865,52 +778,73 @@ function SignYourSelf() {
marginRight: !isMobile && pdfOriginalWidth > 500 && "20px"
}}
>
-
- {/* this modal is used show this document is already sign */}
- modalAlign()}
- backdropClassName="signature-backdrop"
+ {
+ setIsAlert({
+ isShow: false,
+ alertMessage: ""
+ });
+ }}
>
-
- Sign Documents
-
+
+
{isAlert.alertMessage}
-
- {showAlreadySignDoc.mssg}
-
-
-
-
+
+
+
+
+ {/* this modal is used show this document is already sign */}
+ {
+ setShowAlreadySignDoc({ status: false });
+ }}
+ >
+
+
{showAlreadySignDoc.mssg}
+
+
+
- {showAlreadySignDoc.sure && (
-
- )}
-
-
+
+
+
{
const [signKey, setSignKey] = useState();
const [IsReceipent, setIsReceipent] = useState(true);
const [isDontShow, setIsDontShow] = useState(false);
+ const [isDragging, setIsDragging] = useState(false);
const senderUser =
localStorage.getItem(
`Parse/${localStorage.getItem("parseAppId")}/currentUser`
@@ -473,11 +474,12 @@ const TemplatePlaceholder = () => {
//function for save x and y position and show signature tab on that position
const handleTabDrag = (key) => {
setDragKey(key);
+ setIsDragging(true);
};
//function for set and update x and y postion after drag and drop signature tab
const handleStop = (event, dragElement, signerId, key) => {
- if (!isResize) {
+ if (!isResize && isDragging) {
const dataNewPlace = addZIndex(signerPos, key, setZIndex);
let updateSignPos = [...signerPos];
updateSignPos.splice(0, updateSignPos.length, ...dataNewPlace);
@@ -537,6 +539,9 @@ const TemplatePlaceholder = () => {
}
}
setIsMailSend(false);
+ setTimeout(() => {
+ setIsDragging(false);
+ }, 200);
};
//function for delete signature block
@@ -1061,11 +1066,8 @@ const TemplatePlaceholder = () => {
onClick={() => {
setIsCreateDocModal(false);
}}
- style={{
- color: "black"
- }}
type="button"
- className="finishBtn"
+ className="finishBtn cancelBtn"
>
No
@@ -1135,6 +1137,7 @@ const TemplatePlaceholder = () => {
setIsPageCopy={setIsPageCopy}
setSignKey={setSignKey}
setSignerObjId={setSignerObjId}
+ isDragging={isDragging}
/>
)}
@@ -1179,6 +1182,7 @@ const TemplatePlaceholder = () => {
handleDeleteUser={handleDeleteUser}
handleRoleChange={handleRoleChange}
handleOnBlur={handleOnBlur}
+ title={"Role"}
/>
) : (
@@ -1197,6 +1201,7 @@ const TemplatePlaceholder = () => {
handleDeleteUser={handleDeleteUser}
handleRoleChange={handleRoleChange}
handleOnBlur={handleOnBlur}
+ title={"Role"}
/>
{
isDragStamp={isDragStamp}
isSignYourself={false}
addPositionOfSignature={addPositionOfSignature}
+ title={"Role"}
/>
diff --git a/microfrontends/SignDocuments/src/Component/component/AddRoleModal.js b/microfrontends/SignDocuments/src/Component/component/AddRoleModal.js
index ede404e54..8e6491376 100644
--- a/microfrontends/SignDocuments/src/Component/component/AddRoleModal.js
+++ b/microfrontends/SignDocuments/src/Component/component/AddRoleModal.js
@@ -8,9 +8,7 @@ const AddRoleModal = (props) => {
isOpen={props.isModalRole}
handleClose={props.handleCloseRoleModal}
>
-
+
+
);
}
diff --git a/microfrontends/SignDocuments/src/Component/component/emailComponent.js b/microfrontends/SignDocuments/src/Component/component/emailComponent.js
index 0c9e3ffb7..1b5aaa36d 100644
--- a/microfrontends/SignDocuments/src/Component/component/emailComponent.js
+++ b/microfrontends/SignDocuments/src/Component/component/emailComponent.js
@@ -1,8 +1,6 @@
import React, { useState } from "react";
import { saveAs } from "file-saver";
import celebration from "../../assests/newCeleb.gif";
-import Modal from "react-bootstrap/Modal";
-import ModalHeader from "react-bootstrap/esm/ModalHeader";
import axios from "axios";
import { getBase64FromUrl } from "../../utils/Utils";
import { themeColor } from "../../utils/ThemeColor/backColor";
@@ -88,6 +86,8 @@ function EmailComponent({
isShow: true,
alertMessage: "something went wrong"
});
+ setEmailValue("");
+ setEmailList([]);
} else {
setIsLoading(false);
setIsEmail(false);
@@ -95,6 +95,8 @@ function EmailComponent({
isShow: true,
alertMessage: "something went wrong"
});
+ setEmailValue("");
+ setEmailList([]);
}
};
@@ -159,251 +161,268 @@ function EmailComponent({
return (
{/* isEmail */}
-
- {isLoading && (
-
-

-
- This might take some time
-
-
- )}
-
-
- Successfully signed!
-
-
-
- {!isAndroid && (
-