- {/* {pdfUrl ? (
- <>
-
-
- >
- ) : (
- <>
-
{
- dragSignature(element);
- if (element) {
- signRef.current = element;
- }
- }}
- className={signStyle}
- onMouseMove={handleDivClick}
- onMouseDown={handleMouseLeave}
- style={{
- opacity: isDragSign ? 0.5 : 1,
- boxShadow:
- "0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.18)"
- }}
- >
-
- Signature
-
-

-
-
-
{
- dragStamp(element);
- dragRef.current = element;
- if (isDragStamp) {
-
- }
- }}
- className={!pdfUrl ? signStyle : "disableSign"}
- disabled={pdfUrl && true}
- onMouseMove={handleDivClick}
- onMouseDown={handleMouseLeave}
- style={{
- opacity: isDragStamp ? 0.5 : 1,
- boxShadow:
- "0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.18)"
- }}
- >
-
- Stamp
-
-
-

-
- >
- )} */}
- {/* {updateWidgets.map((item, ind) => {
- return (
-
{
- item.ref(element);
- if (element) {
- signRef.current = element;
- }
- }}
- className={signStyle}
- onMouseMove={handleDivClick}
- onMouseDown={handleMouseLeave}
- style={{
- opacity: isDragSign ? 0.5 : 1,
- boxShadow:
- "0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.18)"
- }}
- >
-
-
-
- {item.type}
-
-
-
-
-
-
- );
- })} */}
)
@@ -441,7 +443,12 @@ function RenderPdf({
}}
loading={"Loading Document.."}
onLoadSuccess={pageDetails}
- // ref={pdfRef}
+ // ref={pdfRef}'
+ onClick={() => {
+ if (setSelectWidgetId) {
+ setSelectWidgetId("");
+ }
+ }}
file={
pdfUrl
? pdfUrl
@@ -617,8 +624,9 @@ function RenderPdf({
loading={"Loading Document.."}
onLoadSuccess={pageDetails}
onClick={() => {
- console.log("click on pdf");
- setSelectWidgetId("");
+ if (setSelectWidgetId) {
+ setSelectWidgetId("");
+ }
}}
// ref={pdfRef}
file={
diff --git a/microfrontends/SignDocuments/src/Component/placeHolderSign.js b/microfrontends/SignDocuments/src/Component/placeHolderSign.js
index 7f77b71d1..d71a7da90 100644
--- a/microfrontends/SignDocuments/src/Component/placeHolderSign.js
+++ b/microfrontends/SignDocuments/src/Component/placeHolderSign.js
@@ -427,8 +427,8 @@ function PlaceHolderSign() {
};
}
+ setSelectWidgetId(key);
if (signer && dragTypeValue !== "label") {
- setSelectWidgetId(key);
let filterSignerPos = signerPos.filter((data) => data.Id === uniqueId);
const { blockColor, Role } = signer;
@@ -454,6 +454,7 @@ function PlaceHolderSign() {
const updatesignerPos = signerPos.map((x) =>
x.Id === uniqueId ? { ...x, placeHolder: updatePlace } : x
);
+
setSignerPos(updatesignerPos);
} else {
const updatesignerPos = signerPos.map((x) =>
@@ -465,6 +466,7 @@ function PlaceHolderSign() {
}
} else {
//adding new placeholder for selected signer in pos array (placeholder)
+ const signerData = signerPos;
let placeHolderPos;
if (contractName) {
placeHolderPos = {
@@ -489,7 +491,10 @@ function PlaceHolderSign() {
Id: uniqueId
};
}
- setSignerPos((prev) => [...prev, placeHolderPos]);
+
+ signerData.push(placeHolderPos);
+
+ setSignerPos(signerData);
}
if (dragTypeValue === "dropdown") {
setShowDropdown(true);
@@ -500,8 +505,7 @@ function PlaceHolderSign() {
}
setWidgetType(dragTypeValue);
setSignKey(key);
- } else {
- setSelectWidgetId(key);
+ } else if (dragTypeValue === "label") {
let filterSignerPos = signerPos.filter(
(data) => data.Role === "prefill"
);
@@ -548,6 +552,7 @@ function PlaceHolderSign() {
};
setSignerPos((prev) => [...prev, placeHolderPos]);
}
+ setSignKey(key);
}
}
};
@@ -1235,7 +1240,6 @@ function PlaceHolderSign() {
setIsValidate(false);
};
- console.log("currentdetails", currWidgetsDetails);
return (
<>
diff --git a/microfrontends/SignDocuments/src/utils/Utils.js b/microfrontends/SignDocuments/src/utils/Utils.js
index b756ab445..f458b888d 100644
--- a/microfrontends/SignDocuments/src/utils/Utils.js
+++ b/microfrontends/SignDocuments/src/utils/Utils.js
@@ -939,7 +939,6 @@ export const multiSignEmbed = async (
imgData.type === "initials" ||
imgData.type === "image"
) {
- console.log(images[id]);
if (
(imgData.ImageType && imgData.ImageType === "image/png") ||
imgData.ImageType === "image/jpeg"