bug fix in template flow as well as placeholder is not working in mobile view

This commit is contained in:
prafull-opensignlabs
2024-01-03 10:03:12 +05:30
parent eef9ee7f3c
commit 2904ba3085
8 changed files with 123 additions and 110 deletions
@@ -834,6 +834,8 @@ const TemplatePlaceholder = () => {
// save Role in entry in signerList and user
const handleAddRole = (e) => {
e.preventDefault();
setSignerObjId('')
setContractName('')
const count = signersdata.length > 0 ? signersdata.length + 1 : 1;
const Id = randomId();
const index = signersdata.length;
@@ -861,7 +863,7 @@ const TemplatePlaceholder = () => {
const index = signersdata.findIndex((x) => x.Id === Id);
if (index === signersdata.length - 1) {
setUniqueId(updateSigner[updateSigner.length - 1]?.Id || "");
setIsSelectId(0);
setIsSelectId(index - 1|| 0);
} else {
setUniqueId(updateSigner[index]?.Id || "");
setIsSelectId(index);
@@ -317,18 +317,12 @@ function PlaceHolderSign() {
//function for setting position after drop signature button over pdf
const addPositionOfSignature = (item, monitor) => {
if (isMobile) {
if (selectedEmail) {
getSignerPos(item, monitor);
} else {
setIsShowEmail(true);
}
} else {
getSignerPos(item, monitor);
}
getSignerPos(item, monitor);
};
const getSignerPos = (item, monitor) => {
setSignerObjId('')
setContractName('')
if (uniqueId) {
const signer = signersdata.find((x) => x.Id === uniqueId);
if (signer) {