)}
diff --git a/microfrontends/SignDocuments/src/Component/component/renderAllPdfPage.js b/microfrontends/SignDocuments/src/Component/component/renderAllPdfPage.js
index ffac41108..1872c0a4b 100644
--- a/microfrontends/SignDocuments/src/Component/component/renderAllPdfPage.js
+++ b/microfrontends/SignDocuments/src/Component/component/renderAllPdfPage.js
@@ -9,7 +9,7 @@ function RenderAllPdfPage({
allPages,
setAllPages,
setPageNumber,
- setSignBtnPosition,
+ setSignBtnPosition
}) {
pdfjs.GlobalWorkerOptions.workerSrc = `//cdnjs.cloudflare.com/ajax/libs/pdf.js/${pdfjs.version}/pdf.worker.js`;
@@ -20,75 +20,77 @@ function RenderAllPdfPage({
return (
-
-
-
- Pages
-
+
+
+
+ Pages
+
-
-
-
-
+
- {Array.from(new Array(allPages), (el, index) => (
-
+ {Array.from(new Array(allPages), (el, index) => (
+
{
- setPageNumber(index + 1);
- if (setSignBtnPosition) {
- setSignBtnPosition([]);
- }
- }}
- >
-
-
- ))}
-
-
+ display: "flex",
+ justifyContent: "center",
+ alignItems: "center",
+ contain: "content"
+ }}
+ onClick={() => {
+ setPageNumber(index + 1);
+ if (setSignBtnPosition) {
+ setSignBtnPosition([]);
+ }
+ }}
+ >
+
+
+ ))}
+
+
+
+
-
-
-
-
);
}
diff --git a/microfrontends/SignDocuments/src/Component/component/renderPdf.js b/microfrontends/SignDocuments/src/Component/component/renderPdf.js
index 7469e6630..7a68b0362 100644
--- a/microfrontends/SignDocuments/src/Component/component/renderPdf.js
+++ b/microfrontends/SignDocuments/src/Component/component/renderPdf.js
@@ -1,3 +1,4 @@
+
import React from "react";
import RSC from "react-scrollbars-custom";
import { Rnd } from "react-rnd";
@@ -459,9 +460,13 @@ function RenderPdf({
className="placeholderBlock"
onDrag={() => handleTabDrag(pos.key)}
size={{
- width: pos.Width ? pos.Width : 150,
- height: pos.Height ? pos.Height : 60
+ width: posWidth(pos),
+ height: posHeight(pos)
}}
+ // size={{
+ // width: pos.Width ? pos.Width : 150,
+ // height: pos.Height ? pos.Height : 60
+ // }}
lockAspectRatio={
pos.Width
? pos.Width / pos.Height
@@ -471,14 +476,21 @@ function RenderPdf({
handleStop(
event,
dragElement,
- data.signerObjId,
+ data.Id,
pos.key
)
+ // data.signerObjId,
}
default={{
- x: pos.xPosition,
- y: pos.yPosition
+ x: xPos(pos),
+ y: !pos.isMobile
+ ? pos.yPosition / scale
+ : pos.yPosition * (pos.scale / scale)
}}
+ // default={{
+ // x: pos.xPosition,
+ // y: pos.yPosition
+ // }}
onResizeStart={() => {
setIsResize(true);
}}
@@ -492,6 +504,7 @@ function RenderPdf({
delta,
position
) => {
+ e.stopPropagation();
handleImageResize(
ref,
pos.key,
@@ -541,8 +554,9 @@ function RenderPdf({
e.stopPropagation();
handleDeleteSign(
pos.key,
- data.signerObjId
+ data.Id
);
+ // data.signerObjId
}}
style={{
background: themeColor()
@@ -920,7 +934,7 @@ function RenderPdf({
cursor: "all-scroll",
background: data.blockColor,
borderColor: themeColor(),
- zIndex: pos.zIndex
+ zIndex: pos.zIndex ? pos.zIndex : "1"
}}
className="placeholderBlock"
onDrag={() => handleTabDrag(pos.key)}
@@ -937,9 +951,10 @@ function RenderPdf({
handleStop(
event,
dragElement,
- data.signerObjId,
+ data.Id,
pos.key
)
+ // data.signerObjId,
}
default={{
x: pos.xPosition,
@@ -978,8 +993,9 @@ function RenderPdf({
e.stopPropagation();
handleDeleteSign(
pos.key,
- data.signerObjId
+ data.Id
);
+ // data.signerObjId
}}
style={{
background: themeColor()
diff --git a/microfrontends/SignDocuments/src/Component/component/signerListPlace.js b/microfrontends/SignDocuments/src/Component/component/signerListPlace.js
index 28a5231d7..4905da542 100644
--- a/microfrontends/SignDocuments/src/Component/component/signerListPlace.js
+++ b/microfrontends/SignDocuments/src/Component/component/signerListPlace.js
@@ -1,6 +1,7 @@
import React, { useState } from "react";
import check from "../../assests/checkBox.png";
import { themeColor } from "../../utils/ThemeColor/backColor";
+import "../../css/signerListPlace.css";
function SignerListPlace({
signerPos,
@@ -8,7 +9,10 @@ function SignerListPlace({
isSelectListId,
setSignerObjId,
setIsSelectId,
- setContractName
+ setContractName,
+ handleAddSigner,
+ setUniqueId,
+ setRoleName
}) {
const color = [
"#93a3db",
@@ -22,7 +26,7 @@ function SignerListPlace({
"#cc99ff",
"#ffcc99",
"#66ccff",
- "#ffffcc",
+ "#ffffcc"
];
const nameColor = [
@@ -37,10 +41,11 @@ function SignerListPlace({
"#cc00ff",
"#ff9900",
"#336699",
- "#cc9900",
+ "#cc9900"
];
const [isHover, setIsHover] = useState();
+ console.log("signerPos", signerPos);
//function for onhover signer name change background color
const onHoverStyle = (ind) => {
const style = {
@@ -49,7 +54,7 @@ function SignerListPlace({
marginTop: "2px",
display: "flex",
flexDirection: "row",
- borderBottom: "1px solid #e3e1e1",
+ borderBottom: "1px solid #e3e1e1"
};
return style;
};
@@ -61,101 +66,128 @@ function SignerListPlace({
marginTop: "2px",
display: "flex",
flexDirection: "row",
-
- justifyContent: "space-between",
+ borderBottom: "1px solid #e3e1e1",
+ justifyContent: "space-between"
};
return style;
};
const getFirstLetter = (name) => {
- const firstLetter = name.charAt(0);
+ const firstLetter = name?.charAt(0);
return firstLetter;
};
return (
-
+
Reicipents
-
+
- {signersdata.Signers &&
- signersdata.Signers.map((obj, ind) => {
- return (
-
setIsHover(ind)}
- onMouseLeave={() => setIsHover(null)}
- key={ind}
- style={
- isHover === ind || isSelectListId === ind
- ? onHoverStyle(ind)
- : nonHoverStyle(ind)
- }
- onClick={() => {
- setSignerObjId(obj.objectId);
- setIsSelectId(ind);
- setContractName(obj.className)
- }}
- >
+ <>
+ {signersdata.length > 0 &&
+ signersdata.map((obj, ind) => {
+ return (
setIsHover(ind)}
+ onMouseLeave={() => setIsHover(null)}
+ key={ind}
+ style={
+ isHover === ind || isSelectListId === ind
+ ? onHoverStyle(ind)
+ : nonHoverStyle(ind)
+ }
+ onClick={() => {
+ setSignerObjId(obj?.objectId);
+ setIsSelectId(ind);
+ setContractName(obj?.className);
+ setUniqueId(obj.Id);
+ setRoleName(obj.Role)
}}
>
-
- {" "}
- {getFirstLetter(obj.Name)}
-
-
-
- {obj.Name}
- {obj.Email}
+
+ {obj.Name
+ ? getFirstLetter(obj.Name)
+ : getFirstLetter(obj.Role)}
+
+
+
+ {obj.Name ? (
+ {obj.Name}
+ ) : (
+ {obj.Role}
+ )}
+ {obj.Email && (
+ {obj.Email}
+ )}
+
+ {signerPos.map((data, key) => {
+ return (
+ data.Id === obj.Id && (
+
+

+
+ )
+ );
+ })}
+
- {signerPos.map((data, key) => {
- return (
- data.signerObjId === obj.objectId && (
-
-

-
- )
- );
- })}
-
-
-
- );
- })}
+ );
+ })}
+ >
-
+ {handleAddSigner && (
+
handleAddSigner()}>
+
+ Add
+
+ )}
);
}
diff --git a/microfrontends/SignDocuments/src/Routes.js b/microfrontends/SignDocuments/src/Routes.js
index 605212871..e9dd50915 100644
--- a/microfrontends/SignDocuments/src/Routes.js
+++ b/microfrontends/SignDocuments/src/Routes.js
@@ -9,6 +9,7 @@ import DraftDocument from "./Component/DraftDocument";
import PdfRequestFiles from "./Component/PdfRequestFiles";
import LegaDrive from "./Component/LegaDrive/LegaDrive";
import PageNotFound from "./Component/PageNotFound";
+import TemplatePlaceHolder from "./Component/TemplatePlaceholder";
// `AppRoutes` is used to define route path of app and
// it expose to host app, check moduleFederation.config.js for more
@@ -47,6 +48,7 @@ function AppRoutes() {
{/* lega drive route */}
} />
{/* Page Not Found */}
+
} />
} />
diff --git a/microfrontends/SignDocuments/src/css/signerListPlace.css b/microfrontends/SignDocuments/src/css/signerListPlace.css
new file mode 100644
index 000000000..1df701b70
--- /dev/null
+++ b/microfrontends/SignDocuments/src/css/signerListPlace.css
@@ -0,0 +1,16 @@
+.addSignerBtn{
+ padding: 10px;
+ margin-top: 2px;
+ display: flex;
+ flex-direction: row;
+ justify-content: center;
+ align-items: center;
+ border: 1px solid #47a3ad;
+ margin: 1px;
+ color: #47a3ad;
+ cursor: pointer
+}
+.addSignerBtn:hover{
+ background: #47a3ad;
+ color: #ffffff;
+}
diff --git a/microfrontends/SignDocuments/src/utils/Utils.js b/microfrontends/SignDocuments/src/utils/Utils.js
index 292a9c2f4..e5cd69857 100644
--- a/microfrontends/SignDocuments/src/utils/Utils.js
+++ b/microfrontends/SignDocuments/src/utils/Utils.js
@@ -1001,3 +1001,5 @@ export const signPdfFun = async (
return response;
};
+
+export const randomId = () => Math.floor(1000 + Math.random() * 9000);
\ No newline at end of file