fix: signyourself pdf render issue

This commit is contained in:
RaktimaNXG
2024-02-12 19:02:33 +05:30
parent 60ba77a06f
commit 3910486b17
5 changed files with 13 additions and 6 deletions
@@ -1388,6 +1388,7 @@ const TemplatePlaceholder = () => {
</div>
</ModalUi>
<DropdownWidgetOption
type="radio"
title="RadioGroup"
showDropdown={isRadio}
setShowDropdown={setIsRadio}
@@ -1395,6 +1396,7 @@ const TemplatePlaceholder = () => {
currWidgetsDetails={currWidgetsDetails}
/>
<DropdownWidgetOption
type="dropdown"
title="Dropdown options"
showDropdown={showDropdown}
setShowDropdown={setShowDropdown}
@@ -7,7 +7,7 @@ function DropdownWidgetOption(props) {
"option-2"
]);
const [dropdownName, setDropdownName] = useState("Field-1");
const [dropdownName, setDropdownName] = useState(props.type);
useEffect(() => {
if (
@@ -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),
@@ -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");
@@ -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 (
<>
<Title title={state?.title ? state.title : "New Document"} />
@@ -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}