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) {
@@ -80,9 +80,9 @@ const RecipientList = (props) => {
: nonHoverStyle(ind)
}
onClick={() => {
props.setSignerObjId(obj?.objectId);
props.setSignerObjId(obj?.objectId || "");
props.setIsSelectId(ind);
props.setContractName(obj?.className);
props.setContractName(obj?.className || "");
props.setUniqueId(obj.Id);
props.setRoleName(obj.Role);
if(props.handleModal){
@@ -12,14 +12,14 @@ export default function TourContentWithBtn({ message, isChecked }) {
return (
<div>
<p>{message}</p>
<label style={{ textAlign: "center", display: "flex" }}>
<label style={{ textAlign: "center", display: "flex", "justifyContent":'center' }}>
<input
type="checkbox"
style={{ marginRight: 3 }}
checked={isCheck}
onChange={handleCheck}
/>{" "}
<span>Don't show</span>
<span style={{color:"#787878", fontSize: 12}}>Don't show this again</span>
</label>
</div>
);
@@ -765,13 +765,9 @@ export const handleImageResize = (
export const handleSignYourselfImageResize = (
ref,
key,
direction,
position,
xyPostion,
index,
setXyPostion,
pdfOriginalWidth,
containerWH
) => {
const updateFilter = xyPostion[index].pos.filter(
(data) => data.key === key && data.Width && data.Height