Merge pull request #519 from OpenSignLabs/signyourself-textinput

fix: change text-input widget to text in signyour-self flow
This commit is contained in:
prafull-opensignlabs
2024-03-22 12:46:52 +05:30
committed by GitHub
2 changed files with 7 additions and 8 deletions
@@ -233,14 +233,14 @@ function WidgetComponent({
(data) =>
data.type !== "dropdown" &&
data.type !== radioButtonWidget &&
data.type !== textWidget
data.type !== textInputWidget
);
const textWidgetData = widget.filter((data) => data.type !== textWidget);
const updateWidgets = isSignYourself
? filterWidgets
: isTemplateFlow
? textWidgetData
: widget;
? textWidgetData
: widget;
return (
<>
+4 -5
View File
@@ -26,7 +26,7 @@ import {
contactBook,
randomId,
getDate,
textInputWidget
textWidget
} from "../constant/Utils";
import { useParams } from "react-router-dom";
import Tour from "reactour";
@@ -342,8 +342,7 @@ function SignYourSelf() {
return {
name: "checkbox"
};
case textInputWidget:
case textWidget:
return {
name: "text"
};
@@ -528,7 +527,6 @@ function SignYourSelf() {
checkSigned = requiredWidgets[i]?.options?.response;
if (!checkSigned) {
const checkSignUrl = requiredWidgets[i]?.pos?.SignUrl;
let checkDefaultSigned = requiredWidgets[i]?.options?.defaultValue;
if (!checkSignUrl) {
if (!checkDefaultSigned) {
@@ -587,11 +585,12 @@ function SignYourSelf() {
flag,
containerWH
);
// console.log('pdf',pdfBytes)
// console.log("pdf", pdfBytes);
//function for call to embed signature in pdf and get digital signature pdf
await signPdfFun(pdfBytes, documentId);
}
}
// console.log("signyourself", xyPostion);
//function for get digital signature
const signPdfFun = async (base64Url, documentId) => {
let singleSign = {