fix: date widgets issue after place change all widgets details which are already placed

This commit is contained in:
RaktimaNXG
2024-02-21 15:22:17 +05:30
parent d4fabf0fe9
commit 8308376f53
7 changed files with 73 additions and 149 deletions
@@ -94,8 +94,6 @@ export const onChangeInput = (
if (isSigners) {
if (userId) {
filterSignerPos = xyPostion.filter((data) => data.Id === userId);
} else {
filterSignerPos = xyPostion.filter((data) => data.Role === "prefill");
}
const getPlaceHolder = filterSignerPos[0]?.placeHolder;
@@ -129,17 +127,15 @@ export const onChangeInput = (
return url;
});
const newUpdateSignPos = getPlaceHolder.map((obj, ind) => {
const newUpdateSignPos = getPlaceHolder.map((obj) => {
if (obj.pageNumber === index) {
return { ...obj, pos: addSignPos };
}
return obj;
});
const newUpdateSigner = xyPostion.map((obj, ind) => {
if (obj.Role === "prefill") {
return { ...obj, placeHolder: newUpdateSignPos };
} else if (obj.Id === userId) {
const newUpdateSigner = xyPostion.map((obj) => {
if (obj.Id === userId) {
return { ...obj, placeHolder: newUpdateSignPos };
}
return obj;