From 3910486b17080b290f3fdc26adbd2b0fcebef305 Mon Sep 17 00:00:00 2001 From: RaktimaNXG Date: Mon, 12 Feb 2024 19:02:33 +0530 Subject: [PATCH] fix: signyourself pdf render issue --- .../SignDocuments/src/Component/TemplatePlaceholder.js | 2 ++ .../src/Component/WidgetComponent/dropdownWidgetOption.js | 2 +- .../src/Component/WidgetComponent/placeholder.js | 4 ++-- .../SignDocuments/src/Component/component/header.js | 3 ++- .../SignDocuments/src/Component/placeHolderSign.js | 8 ++++++-- 5 files changed, 13 insertions(+), 6 deletions(-) diff --git a/microfrontends/SignDocuments/src/Component/TemplatePlaceholder.js b/microfrontends/SignDocuments/src/Component/TemplatePlaceholder.js index 0d9651ee9..7f7db0941 100644 --- a/microfrontends/SignDocuments/src/Component/TemplatePlaceholder.js +++ b/microfrontends/SignDocuments/src/Component/TemplatePlaceholder.js @@ -1388,6 +1388,7 @@ const TemplatePlaceholder = () => { { currWidgetsDetails={currWidgetsDetails} /> { if ( diff --git a/microfrontends/SignDocuments/src/Component/WidgetComponent/placeholder.js b/microfrontends/SignDocuments/src/Component/WidgetComponent/placeholder.js index 6874b4526..ba28a59d7 100644 --- a/microfrontends/SignDocuments/src/Component/WidgetComponent/placeholder.js +++ b/microfrontends/SignDocuments/src/Component/WidgetComponent/placeholder.js @@ -376,7 +376,7 @@ function Placeholder(props) { onTouchEnd={(e) => { e.stopPropagation(); if (props.data) { - props.handleDeleteSign(props.pos.key, props.data.Id); + props.handleDeleteSign(props.pos.key, props.data?.Id); } else { props.handleDeleteSign(props.pos.key); props.setIsStamp(false); @@ -473,7 +473,7 @@ function Placeholder(props) { } onDragStop={(event, dragElement) => props.handleStop && - props.handleStop(event, dragElement, props.data.Id, props.pos.key) + props.handleStop(event, dragElement, props.data?.Id, props.pos?.key) } default={{ x: props.xPos(props.pos, props.isSignYourself), diff --git a/microfrontends/SignDocuments/src/Component/component/header.js b/microfrontends/SignDocuments/src/Component/component/header.js index a74fb7d60..1e282dc6b 100644 --- a/microfrontends/SignDocuments/src/Component/component/header.js +++ b/microfrontends/SignDocuments/src/Component/component/header.js @@ -38,7 +38,8 @@ function Header({ completeBtnTitle, setIsEditTemplate }) { - const filterPrefill = signerPos.filter((data) => data.Role !== "prefill"); + const filterPrefill = + signerPos && signerPos.filter((data) => data.Role !== "prefill"); const isMobile = window.innerWidth < 767; const navigate = useNavigate(); const isGuestSigner = localStorage.getItem("isGuestSigner"); diff --git a/microfrontends/SignDocuments/src/Component/placeHolderSign.js b/microfrontends/SignDocuments/src/Component/placeHolderSign.js index 48c292766..284902836 100644 --- a/microfrontends/SignDocuments/src/Component/placeHolderSign.js +++ b/microfrontends/SignDocuments/src/Component/placeHolderSign.js @@ -351,8 +351,8 @@ function PlaceHolderSign() { }; const getSignerPos = (item, monitor) => { - setSignerObjId(""); - setContractName(""); + // setSignerObjId(""); + // setContractName(""); if (uniqueId) { const posZIndex = zIndex + 1; setZIndex(posZIndex); @@ -427,6 +427,7 @@ function PlaceHolderSign() { pos: dropData }; } + if (signer && dragTypeValue !== "label") { let filterSignerPos = signerPos.filter((data) => data.Id === uniqueId); @@ -1247,6 +1248,7 @@ function PlaceHolderSign() { }, 1500); } }; + return ( <> @@ -1590,6 +1592,7 @@ function PlaceHolderSign() { Id={uniqueId} /> <DropdownWidgetOption + type="radio" title="RadioGroup" showDropdown={isRadio} setShowDropdown={setIsRadio} @@ -1597,6 +1600,7 @@ function PlaceHolderSign() { currWidgetsDetails={currWidgetsDetails} /> <DropdownWidgetOption + type="dropdown" title="Dropdown options" showDropdown={showDropdown} setShowDropdown={setShowDropdown}