mirror of
https://github.com/OpenSignLabs/OpenSign.git
synced 2026-08-21 07:02:32 +02:00
Merge pull request #701 from OpenSignLabs/raktima-opensignlabs-patch-1
fix: modal design of signature validation in both flow signyour-self and request-sign
This commit is contained in:
@@ -845,7 +845,7 @@ function PlaceHolderSign() {
|
||||
});
|
||||
}
|
||||
}
|
||||
let notExistSignature = false; // variable is used to check a signature widget exit or not then execute other code
|
||||
let isSignatureExist = true; // variable is used to check a signature widget exit or not then execute other code
|
||||
//for loop is used to check signature widget exist or not
|
||||
for (let item of filterPrefill) {
|
||||
let signatureExist = false; // Reset for each iteration
|
||||
@@ -860,7 +860,7 @@ function PlaceHolderSign() {
|
||||
}
|
||||
}
|
||||
if (!signatureExist) {
|
||||
notExistSignature = true;
|
||||
isSignatureExist = false;
|
||||
const alert = {
|
||||
mssg: "sure",
|
||||
alert: true
|
||||
@@ -875,7 +875,7 @@ function PlaceHolderSign() {
|
||||
alert: true
|
||||
};
|
||||
setIsSendAlert(alert);
|
||||
} else if (!notExistSignature) {
|
||||
} else if (isSignatureExist) {
|
||||
if (filterPrefill.length === signersdata.length) {
|
||||
const IsSignerNotExist = filterPrefill?.filter((x) => !x.signerObjId);
|
||||
if (IsSignerNotExist && IsSignerNotExist?.length > 0) {
|
||||
@@ -1713,8 +1713,8 @@ function PlaceHolderSign() {
|
||||
>
|
||||
{isSendAlert.mssg === "sure" ? (
|
||||
<span>
|
||||
Please add at least one signature field for all
|
||||
recipients.
|
||||
Please ensure there's at least one signature widget
|
||||
added for all recipients.
|
||||
</span>
|
||||
) : isSendAlert.mssg === textWidget ? (
|
||||
<p>Please confirm that you have filled the text field.</p>
|
||||
|
||||
@@ -637,6 +637,7 @@ function SignYourSelf() {
|
||||
}
|
||||
if (xyPostion.length === 0 || !isSignatureExist) {
|
||||
setIsAlert({
|
||||
header: "Fields required",
|
||||
isShow: true,
|
||||
alertMessage:
|
||||
"Please ensure there's at least one signature widget added"
|
||||
@@ -1170,7 +1171,7 @@ function SignYourSelf() {
|
||||
<ModalUi
|
||||
headerColor={"#dc3545"}
|
||||
isOpen={isAlert.isShow}
|
||||
title={"Alert"}
|
||||
title={isAlert?.header || "Alert"}
|
||||
handleClose={() => {
|
||||
setIsAlert({
|
||||
isShow: false,
|
||||
@@ -1180,28 +1181,6 @@ function SignYourSelf() {
|
||||
>
|
||||
<div style={{ height: "100%", padding: 20 }}>
|
||||
<p>{isAlert.alertMessage}</p>
|
||||
|
||||
<div
|
||||
style={{
|
||||
height: "1px",
|
||||
backgroundColor: "#9f9f9f",
|
||||
width: "100%",
|
||||
marginTop: "15px",
|
||||
marginBottom: "15px"
|
||||
}}
|
||||
></div>
|
||||
<button
|
||||
onClick={() => {
|
||||
setIsAlert({
|
||||
isShow: false,
|
||||
alertMessage: ""
|
||||
});
|
||||
}}
|
||||
type="button"
|
||||
className="finishBtn cancelBtn"
|
||||
>
|
||||
Ok
|
||||
</button>
|
||||
</div>
|
||||
</ModalUi>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user