Skip to content

Commit

Permalink
fix: unsigned widget's reactour message
Browse files Browse the repository at this point in the history
  • Loading branch information
raktima-opensignlabs committed Feb 21, 2024
1 parent 439ac7e commit d4fabf0
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 127 deletions.
9 changes: 2 additions & 7 deletions microfrontends/SignDocuments/src/Component/PdfRequestFiles.js
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -653,7 +653,6 @@ function PlaceholderType(props) {
);
}}
className="labelTextArea"
name="story"
cols="50"
style={{
zIndex: "99",
Expand Down
12 changes: 8 additions & 4 deletions microfrontends/SignDocuments/src/Component/placeHolderSign.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand All @@ -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);
Expand All @@ -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"
);
Expand Down Expand Up @@ -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];
Expand Down
22 changes: 15 additions & 7 deletions microfrontends/SignDocuments/src/css/signature.css
Original file line number Diff line number Diff line change
Expand Up @@ -863,26 +863,34 @@ 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) {

.validateInputText {
width: 93%;
}
.regxSelect{

.regxSelect {
width: 100%;
}

Expand Down
108 changes: 0 additions & 108 deletions microfrontends/SignDocuments/src/utils/Utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit d4fabf0

Please sign in to comment.