fix: placeholder display issue of all signers after save placeholder and login flow

This commit is contained in:
RaktimaNXG
2024-01-05 17:00:41 +05:30
parent b701d2863f
commit f9e6f49ede
13 changed files with 1039 additions and 1095 deletions
@@ -4,27 +4,32 @@ function DefaultSignature({
themeColor,
defaultSignImg,
xyPostion,
setIsAlert
setDefaultSignAlert
}) {
const confirmToaddDefaultSign = () => {
if (xyPostion.length > 0) {
setIsAlert({
setDefaultSignAlert({
isShow: true,
alertMessage: "Are you sure you want to sign at requested locations?"
alertMessage:
"Are you sure you want to auto sign at requested all locations?"
});
} else {
alert("please select position!");
setDefaultSignAlert({
isShow: true,
alertMessage: "please select position!"
});
}
};
return (
<div className="signerComponent">
<div>
<div
style={{
background: themeColor(),
color: "white",
padding: "5px",
fontFamily: "sans-serif"
fontFamily: "sans-serif",
marginTop: "5px"
}}
>
Signature
@@ -38,41 +43,34 @@ function DefaultSignature({
fontWeight: "600"
}}
>
{defaultSignImg ? (
<>
<p>Your Signature</p>
<div className="defaultSignBox">
<img
alt="default img"
style={{
width: "100%",
height: "100%",
objectFit: "contain"
}}
src={defaultSignImg}
/>
</div>
<button
<>
<p>Your Signature</p>
<div className="defaultSignBox">
<img
alt="default img"
style={{
background: themeColor(),
color: "white",
marginTop: "20px",
cursor: "pointer"
width: "100%",
height: "100%",
objectFit: "contain"
}}
type="button"
className="finishBtn finishnHover"
onClick={() => confirmToaddDefaultSign()}
>
Auto Sign All
</button>
</>
) : (
<div style={{ margin: "10px" }}>
<span>
Click a signature placeholder to start signing the document!
</span>
src={defaultSignImg}
/>
</div>
)}
<button
style={{
background: themeColor(),
color: "white",
marginTop: "20px",
cursor: "pointer",
marginBottom: "10px"
}}
type="button"
className="finishBtn finishnHover"
onClick={() => confirmToaddDefaultSign()}
>
Auto Sign All
</button>
</>
</div>
</div>
);