mirror of
https://github.com/OpenSignLabs/OpenSign.git
synced 2026-08-26 01:22:31 +02:00
fix: unsigned widget's reactour message
This commit is contained in:
@@ -403,13 +403,8 @@ function PdfRequestFiles() {
|
||||
const tourConfig = [
|
||||
{
|
||||
selector: '[data-tut="IsSigned"]',
|
||||
content: "Please fill out this placeholder.",
|
||||
// content: () => (
|
||||
// <TourContentWithBtn
|
||||
// message={`Please fill out this placeholder.`}
|
||||
// isChecked={handleDontShow}
|
||||
// />
|
||||
// ),
|
||||
content:
|
||||
"Ensure this field is accurately filled and meets all requirements.",
|
||||
position: "top",
|
||||
style: { fontSize: "13px" }
|
||||
}
|
||||
|
||||
@@ -653,7 +653,6 @@ function PlaceholderType(props) {
|
||||
);
|
||||
}}
|
||||
className="labelTextArea"
|
||||
name="story"
|
||||
cols="50"
|
||||
style={{
|
||||
zIndex: "99",
|
||||
|
||||
@@ -466,7 +466,7 @@ function PlaceHolderSign() {
|
||||
}
|
||||
} else {
|
||||
//adding new placeholder for selected signer in pos array (placeholder)
|
||||
const signerData = signerPos;
|
||||
// const signerData = signerPos;
|
||||
let placeHolderPos;
|
||||
if (contractName) {
|
||||
placeHolderPos = {
|
||||
@@ -492,9 +492,10 @@ function PlaceHolderSign() {
|
||||
};
|
||||
}
|
||||
|
||||
signerData.push(placeHolderPos);
|
||||
|
||||
setSignerPos(signerData);
|
||||
// signerData.push(placeHolderPos);
|
||||
console.log("signersddata", placeHolderPos);
|
||||
// setSignerPos(signerData);
|
||||
setSignerPos((prev) => [...prev, placeHolderPos]);
|
||||
}
|
||||
if (dragTypeValue === "dropdown") {
|
||||
setShowDropdown(true);
|
||||
@@ -506,6 +507,7 @@ function PlaceHolderSign() {
|
||||
setWidgetType(dragTypeValue);
|
||||
setSignKey(key);
|
||||
} else if (dragTypeValue === "label") {
|
||||
console.log("go here");
|
||||
let filterSignerPos = signerPos.filter(
|
||||
(data) => data.Role === "prefill"
|
||||
);
|
||||
@@ -576,8 +578,10 @@ function PlaceHolderSign() {
|
||||
setIsDragging(true);
|
||||
};
|
||||
|
||||
console.log("signerpos", signerPos);
|
||||
//function for set and update x and y postion after drag and drop signature tab
|
||||
const handleStop = (event, dragElement, signerId, key) => {
|
||||
console.log("handle stop");
|
||||
if (!isResize && isDragging) {
|
||||
const dataNewPlace = addZIndex(signerPos, key, setZIndex);
|
||||
let updateSignPos = [...signerPos];
|
||||
|
||||
@@ -863,18 +863,25 @@ option {
|
||||
justify-content: flex-start;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.labelTextArea {
|
||||
font-size: 0.8rem;
|
||||
letter-spacing: 1px;
|
||||
}
|
||||
|
||||
.labelTextArea {
|
||||
padding: 10px;
|
||||
max-width: 100%;
|
||||
line-height: 1.5;
|
||||
border-radius: 5px;
|
||||
border: 1px solid #ccc;
|
||||
box-shadow: 1px 1px 1px #999;
|
||||
|
||||
/* border: 1px solid #ccc;
|
||||
box-shadow: 1px 1px 1px #999; */
|
||||
border: 1px solid #007bff;
|
||||
border-radius: 2px;
|
||||
font-family: inherit;
|
||||
}
|
||||
|
||||
.labelTextArea:focus {
|
||||
outline: none;
|
||||
border: 1px solid #188ae2;
|
||||
}
|
||||
|
||||
@media screen and (max-width:766px) {
|
||||
@@ -882,7 +889,8 @@ option {
|
||||
.validateInputText {
|
||||
width: 93%;
|
||||
}
|
||||
.regxSelect{
|
||||
|
||||
.regxSelect {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
|
||||
@@ -1294,114 +1294,6 @@ export const signPdfFun = async (
|
||||
) => {
|
||||
let singleSign;
|
||||
|
||||
// const newWidth = containerWH.width;
|
||||
// const scale = isMobile ? pdfOriginalWidth / newWidth : 1;
|
||||
// if (signerData && signerData.length === 1 && signerData[0].pos.length === 1) {
|
||||
// const height = xyPosData.Height ? xyPosData.Height : 60;
|
||||
|
||||
// const xPos = (pos) => {
|
||||
// const resizePos = pos.xPosition;
|
||||
// //checking both condition mobile and desktop view
|
||||
// if (isMobile) {
|
||||
// //if pos.isMobile false -- placeholder saved from desktop view then handle position in mobile view divided by scale
|
||||
// if (pos.isMobile) {
|
||||
// const x = resizePos * (pos.scale / scale);
|
||||
// return x * scale;
|
||||
// } else {
|
||||
// const x = resizePos / scale;
|
||||
// return x * scale;
|
||||
// }
|
||||
// } else {
|
||||
// //else if pos.isMobile true -- placeholder saved from mobile or tablet view then handle position in desktop view divide by scale
|
||||
// if (pos.isMobile) {
|
||||
// const x = resizePos * pos.scale;
|
||||
// return x;
|
||||
// } else {
|
||||
// return resizePos;
|
||||
// }
|
||||
// }
|
||||
// };
|
||||
// const yBottom = (pos) => {
|
||||
// const resizePos = pos.yBottom;
|
||||
// let yPosition;
|
||||
// //checking both condition mobile and desktop view
|
||||
|
||||
// if (isMobile) {
|
||||
// //if pos.isMobile false -- placeholder saved from desktop view then handle position in mobile view divided by scale
|
||||
// if (pos.isMobile) {
|
||||
// const y = resizePos * (pos.scale / scale);
|
||||
// yPosition = pos.isDrag
|
||||
// ? y * scale - height * scale
|
||||
// : pos.firstYPos
|
||||
// ? y * scale - height * scale + pos.firstYPos
|
||||
// : y * scale - height * scale;
|
||||
// return yPosition;
|
||||
// } else {
|
||||
// const y = resizePos / scale;
|
||||
// if (pos.IsResize) {
|
||||
// yPosition = pos.isDrag
|
||||
// ? y * scale - height * scale
|
||||
// : pos.firstYPos
|
||||
// ? y * scale - height * scale + pos.firstYPos
|
||||
// : y * scale - height * scale;
|
||||
// return yPosition;
|
||||
// } else {
|
||||
// yPosition = pos.isDrag
|
||||
// ? y * scale - height
|
||||
// : pos.firstYPos
|
||||
// ? y * scale - height + pos.firstYPos
|
||||
// : y * scale - height;
|
||||
// return yPosition;
|
||||
// }
|
||||
// }
|
||||
// } else {
|
||||
// //else if pos.isMobile true -- placeholder saved from mobile or tablet view then handle position in desktop view divide by scale
|
||||
// if (pos.isMobile) {
|
||||
// const y = resizePos * pos.scale;
|
||||
// if (pos.IsResize) {
|
||||
// yPosition = pos.isDrag
|
||||
// ? y - height
|
||||
// : pos.firstYPos
|
||||
// ? y - height + pos.firstYPos
|
||||
// : y - height;
|
||||
// return yPosition;
|
||||
// } else {
|
||||
// yPosition = pos.isDrag
|
||||
// ? y - height * pos.scale
|
||||
// : pos.firstYPos
|
||||
// ? y - height * pos.scale + pos.firstYPos
|
||||
// : y - height * pos.scale;
|
||||
// return yPosition;
|
||||
// }
|
||||
// } else {
|
||||
// yPosition = pos.isDrag
|
||||
// ? resizePos - height
|
||||
// : pos.firstYPos
|
||||
// ? resizePos - height + pos.firstYPos
|
||||
// : resizePos - height;
|
||||
// return yPosition;
|
||||
// }
|
||||
// }
|
||||
// };
|
||||
|
||||
// singleSign = {
|
||||
// pdfFile: pdfBase64Url,
|
||||
// docId: documentId,
|
||||
// userId: signerObjectId,
|
||||
// sign: {
|
||||
// Base64: base64Url,
|
||||
// Left: xPos(xyPosData),
|
||||
// Bottom: yBottom(xyPosData),
|
||||
// Width: placeholderWidth(xyPosData, scale),
|
||||
// Height: placeholderHeight(xyPosData, scale),
|
||||
// Page: pageNo
|
||||
// }
|
||||
// };
|
||||
// } else if (
|
||||
// signerData &&
|
||||
// signerData.length > 0 &&
|
||||
// signerData[0].pos.length > 0
|
||||
// ) {
|
||||
singleSign = {
|
||||
pdfFile: base64Url,
|
||||
docId: documentId,
|
||||
|
||||
Reference in New Issue
Block a user