mirror of
https://github.com/OpenSignLabs/OpenSign.git
synced 2026-09-29 04:54:56 +02:00
add comment
This commit is contained in:
@@ -568,6 +568,7 @@ function PlaceHolderSign() {
|
||||
setSignerPos(updatesignerPos);
|
||||
} else {
|
||||
let updatesignerPos;
|
||||
//if condition when widget type is prefill label text widget
|
||||
if (dragTypeValue === textWidget) {
|
||||
const prefileTextWidget = {
|
||||
signerPtr: {},
|
||||
@@ -580,6 +581,7 @@ function PlaceHolderSign() {
|
||||
signerPos.push(prefileTextWidget);
|
||||
setSignerPos(signerPos);
|
||||
} else {
|
||||
//else condition to add placeholder widgets on multiple page first time
|
||||
updatesignerPos = signerPos.map((x) =>
|
||||
x.Id === uniqueId && x?.placeHolder
|
||||
? { ...x, placeHolder: [...x.placeHolder, placeHolder] }
|
||||
@@ -846,6 +848,7 @@ function PlaceHolderSign() {
|
||||
const filterPrefill = signerPos?.filter((data) => data.Role !== "prefill");
|
||||
const getPrefill = signerPos?.filter((data) => data.Role === "prefill");
|
||||
let isLabel = false;
|
||||
//checking all signers placeholder exist or not
|
||||
const isPlaceholderExist = filterPrefill.every((data) => data.placeHolder);
|
||||
const prefillPlaceholder = getPrefill[0]?.placeHolder;
|
||||
//condition is used to check text widget data is empty or have response
|
||||
|
||||
@@ -450,7 +450,6 @@ const TemplatePlaceholder = () => {
|
||||
(data) => data.pageNumber === pageNumber
|
||||
);
|
||||
}
|
||||
|
||||
//checking current page has already some placeholders then update that placeholder and add upcoming placehoder position
|
||||
if (getPlaceHolder && currentPagePosition) {
|
||||
const updatePlace = getPlaceHolder.filter(
|
||||
@@ -468,6 +467,7 @@ const TemplatePlaceholder = () => {
|
||||
);
|
||||
setSignerPos(updatesignerPos);
|
||||
} else {
|
||||
//else condition to add placeholder widgets on multiple page first time
|
||||
const updatesignerPos = signerPos.map((x) =>
|
||||
x.Id === uniqueId && x?.placeHolder
|
||||
? { ...x, placeHolder: [...x.placeHolder, placeHolder] }
|
||||
|
||||
Reference in New Issue
Block a user