diff --git a/apps/OpenSign/src/constant/Utils.js b/apps/OpenSign/src/constant/Utils.js
index 11fa10f741..40b71434b5 100644
--- a/apps/OpenSign/src/constant/Utils.js
+++ b/apps/OpenSign/src/constant/Utils.js
@@ -12,6 +12,35 @@ export const openInNewTab = (url) => {
window.open(url, "_blank", "noopener,noreferrer");
};
+export const color = [
+ "#93a3db",
+ "#e6c3db",
+ "#c0e3bc",
+ "#bce3db",
+ "#b8ccdb",
+ "#ceb8db",
+ "#ffccff",
+ "#99ffcc",
+ "#cc99ff",
+ "#ffcc99",
+ "#66ccff",
+ "#ffffcc"
+];
+
+export const nameColor = [
+ "#304fbf",
+ "#7d5270",
+ "#5f825b",
+ "#578077",
+ "#576e80",
+ "#6d527d",
+ "#cc00cc",
+ "#006666",
+ "#cc00ff",
+ "#ff9900",
+ "#336699",
+ "#cc9900"
+];
export const toDataUrl = (file) => {
return new Promise((resolve) => {
const reader = new FileReader();
@@ -22,10 +51,12 @@ export const toDataUrl = (file) => {
});
};
-//function for getting document details for getDrive
-export const getDrive = async (documentId) => {
+//function for getting document details for getDrive cloud function
+export const getDrive = async (documentId, skip = 0, limit = 100) => {
const data = {
- docId: documentId && documentId
+ docId: documentId && documentId,
+ limit: limit,
+ skip: skip
};
const driveDeatils = await axios
.post(`${localStorage.getItem("baseUrl")}functions/getDrive`, data, {
@@ -729,6 +760,82 @@ export const onChangeInput = (
}
};
+//function to increase height of text area on press enter
+export const onChangeHeightOfTextArea = (
+ height,
+ widgetType,
+ signKey,
+ xyPostion,
+ index,
+ setXyPostion,
+ userId
+) => {
+ const isSigners = xyPostion.some((data) => data.signerPtr);
+ let filterSignerPos;
+ if (isSigners) {
+ if (userId) {
+ filterSignerPos = xyPostion.filter((data) => data.Id === userId);
+ }
+ const getPlaceHolder = filterSignerPos[0]?.placeHolder;
+
+ const getPageNumer = getPlaceHolder.filter(
+ (data) => data.pageNumber === index
+ );
+ if (getPageNumer.length > 0) {
+ const getXYdata = getPageNumer[0].pos;
+ const getPosData = getXYdata;
+ const addSignPos = getPosData.map((position) => {
+ if (position.key === signKey) {
+ return {
+ ...position,
+ Height: position.Height
+ ? position.Height + height
+ : defaultWidthHeight(widgetType).height + height
+ };
+ }
+ return position;
+ });
+ const newUpdateSignPos = getPlaceHolder.map((obj) => {
+ if (obj.pageNumber === index) {
+ return { ...obj, pos: addSignPos };
+ }
+ return obj;
+ });
+
+ const newUpdateSigner = xyPostion.map((obj) => {
+ if (obj.Id === userId) {
+ return { ...obj, placeHolder: newUpdateSignPos };
+ }
+ return obj;
+ });
+
+ setXyPostion(newUpdateSigner);
+ }
+ } else {
+ let getXYdata = xyPostion[index].pos;
+
+ const updatePosition = getXYdata.map((position) => {
+ if (position.key === signKey) {
+ return {
+ ...position,
+ Height: position.Height
+ ? position.Height + height
+ : defaultWidthHeight(widgetType).height + height
+ };
+ }
+ return position;
+ });
+
+ const updatePlaceholder = xyPostion.map((obj, ind) => {
+ if (ind === index) {
+ return { ...obj, pos: updatePosition };
+ }
+ return obj;
+ });
+ setXyPostion(updatePlaceholder);
+ }
+};
+
export const addInitialData = (signerPos, setXyPostion, value, userId) => {
function widgetDataValue(type) {
switch (type) {
@@ -1078,8 +1185,8 @@ export const multiSignEmbed = async (
position.type === radioButtonWidget
? 10
: position.type === "checkbox"
- ? 10
- : newUpdateHeight;
+ ? 10
+ : newUpdateHeight;
const newHeight = ind ? (ind > 0 ? widgetHeight : 0) : widgetHeight;
if (signyourself) {
@@ -1148,13 +1255,14 @@ export const multiSignEmbed = async (
"email"
].includes(position.type);
if (position.type === "checkbox") {
- let addYPosition, isCheck;
+ let addYPosition = 0,
+ isCheck;
if (position?.options?.values.length > 0) {
position?.options?.values.forEach((item, ind) => {
const checkboxRandomId = "checkbox" + randomId();
let yPosition;
- const height = 10;
+ const height = 13;
if (
position?.options?.response &&
position?.options?.response?.length > 0
@@ -1175,14 +1283,14 @@ export const multiSignEmbed = async (
if (!position?.options?.isHideLabel) {
// below line of code is used to embed label with radio button in pdf
page.drawText(item, {
- x: xPos(position) + 15,
+ x: xPos(position) + 17,
y: yPosition + 2,
size: height
});
}
checkbox.addToPage(page, {
x: xPos(position),
- y: yPosition,
+ y: yPosition - 3,
width: height,
height: height
});
@@ -1203,19 +1311,21 @@ export const multiSignEmbed = async (
} else if (position?.options?.defaultValue) {
textContent = position?.options?.defaultValue;
}
-
const fixedWidth = scaleWidth; // Set your fixed width
+ const isNewOnEnterLineExist = textContent.includes("\n");
+
// Function to break text into lines based on the fixed width
- const breakTextIntoLines = (textContent, width) => {
+ const NewbreakTextIntoLines = (textContent, width) => {
const lines = [];
let currentLine = "";
for (const word of textContent.split(" ")) {
+ //get text line width
const lineWidth = font.widthOfTextAtSize(
`${currentLine} ${word}`,
fontSize
);
-
+ //check text content line width is less or equal to container width
if (lineWidth <= width) {
currentLine += ` ${word}`;
} else {
@@ -1226,7 +1336,33 @@ export const multiSignEmbed = async (
lines.push(currentLine.trim());
return lines;
};
- const lines = breakTextIntoLines(textContent, fixedWidth);
+
+ // Function to break text into lines based on when user go next line on press enter button
+ const breakTextIntoLines = (textContent, width) => {
+ const lines = [];
+
+ for (const word of textContent.split("\n")) {
+ const lineWidth = font.widthOfTextAtSize(`${word}`, fontSize);
+ //checking string length to container width
+ //if string length is less then container width it means user press enter button
+ if (lineWidth <= width) {
+ lines.push(word);
+ }
+ //else adjust text content according to width and send it in new line
+ else {
+ const newLine = NewbreakTextIntoLines(word, width);
+ lines.push(...newLine);
+ }
+ }
+
+ return lines;
+ };
+
+ //check if text content have `\n` string it means user press enter to go next line and handle condition
+ //else auto adjust text content according to container width
+ const lines = isNewOnEnterLineExist
+ ? breakTextIntoLines(textContent, fixedWidth)
+ : NewbreakTextIntoLines(textContent, fixedWidth);
// Set initial y-coordinate for the first line
const labelDefaultHeight = defaultWidthHeight(position.type).height;
@@ -1327,9 +1463,7 @@ export const multiSignEmbed = async (
}
});
}
-
const pdfBytes = await pdfDoc.saveAsBase64({ useObjectStreams: false });
-
return pdfBytes;
};
@@ -1569,3 +1703,66 @@ export const getYear = (date) => {
const newYear = new Date(date).getFullYear();
return newYear;
};
+
+//function to create/copy widget next to already dropped widget
+export const handleCopyNextToWidget = (
+ position,
+ widgetType,
+ xyPostion,
+ index,
+ setXyPostion,
+ userId
+) => {
+ const isSigners = xyPostion.some((data) => data.signerPtr);
+ let filterSignerPos;
+ //get position of previous widget and create new widget next to that widget on same data except
+ // xPosition and key
+ let newpos = position;
+ const calculateXPosition =
+ parseInt(position.xPosition) +
+ defaultWidthHeight(widgetType).width +
+ resizeBorderExtraWidth();
+ const newId = randomId();
+ newpos = { ...newpos, xPosition: calculateXPosition, key: newId };
+ //if condition to create widget in request-sign flow
+ if (isSigners) {
+ if (userId) {
+ filterSignerPos = xyPostion.filter((data) => data.Id === userId);
+ }
+ const getPlaceHolder = filterSignerPos[0]?.placeHolder;
+ const getPageNumer = getPlaceHolder.filter(
+ (data) => data.pageNumber === index
+ );
+ const getXYdata = getPageNumer[0].pos;
+ getXYdata.push(newpos);
+ if (getPageNumer.length > 0) {
+ const newUpdateSignPos = getPlaceHolder.map((obj) => {
+ if (obj.pageNumber === index) {
+ return { ...obj, pos: getXYdata };
+ }
+ return obj;
+ });
+
+ const newUpdateSigner = xyPostion.map((obj) => {
+ if (obj.Id === userId) {
+ return { ...obj, placeHolder: newUpdateSignPos };
+ }
+ return obj;
+ });
+
+ setXyPostion(newUpdateSigner);
+ }
+ } else {
+ // else condition to create widget in sign-yourself flow
+ let getXYdata = xyPostion[index].pos;
+ getXYdata.push(newpos);
+ const updatePlaceholder = xyPostion.map((obj, ind) => {
+ if (ind === index) {
+ return { ...obj, pos: getXYdata };
+ }
+ return obj;
+ });
+
+ setXyPostion(updatePlaceholder);
+ }
+};
diff --git a/apps/OpenSign/src/json/ReportJson.js b/apps/OpenSign/src/json/ReportJson.js
index 0f0edc38c5..1c002c8abf 100644
--- a/apps/OpenSign/src/json/ReportJson.js
+++ b/apps/OpenSign/src/json/ReportJson.js
@@ -18,7 +18,8 @@ export default function reportJson(id) {
btnIcon: "fa fa-plus",
redirectUrl: "draftDocument"
}
- ]
+ ],
+ helpMsg: "This are documents you have started but have not finalized for sending."
};
// Need your sign report
case "4Hhwbp482K":
@@ -33,7 +34,9 @@ export default function reportJson(id) {
btnIcon: "fa fa-eye",
redirectUrl: "pdfRequestFiles"
}
- ]
+ ],
+ helpMsg:
+ "This is a list of documents that are waiting for your signature"
};
// In progess report
case "1MwEuxLEkF":
@@ -48,7 +51,9 @@ export default function reportJson(id) {
btnIcon: "fa fa-eye",
redirectUrl: "pdfRequestFiles"
}
- ]
+ ],
+ helpMsg:
+ "This is a list of documents you've sent to other parties for signature."
};
// completed documents report
case "kQUoW4hUXz":
@@ -63,7 +68,8 @@ export default function reportJson(id) {
btnIcon: "fa fa-eye",
redirectUrl: "draftDocument"
}
- ]
+ ],
+ helpMsg: "This is a list of documents that have been signed by all parties."
};
// declined documents report
case "UPr2Fm5WY3":
@@ -78,7 +84,8 @@ export default function reportJson(id) {
btnIcon: "fa fa-eye",
redirectUrl: "draftDocument"
}
- ]
+ ],
+ helpMsg: "This is a list of documents that have been declined by one of the signers."
};
// Expired Documents report
case "zNqBHXHsYH":
@@ -93,7 +100,8 @@ export default function reportJson(id) {
btnIcon: "fa fa-eye",
redirectUrl: "draftDocument"
}
- ]
+ ],
+ helpMsg: "This is a list of documents that have reached their expiration date."
};
// Recently sent for signatures report show on dashboard
case "d9k3UfYHBc":
@@ -153,7 +161,8 @@ export default function reportJson(id) {
btnIcon: "fa-solid fa-trash"
}
],
- form: "ContactBook"
+ form: "ContactBook",
+ helpMsg: "This is a list of contacts/signers added by you. These will appear as suggestions when you try to add signers to a new document."
};
// template report
case "6TeaPr321t":
@@ -175,7 +184,9 @@ export default function reportJson(id) {
btnIcon: "fa fa-plus",
redirectUrl: "template"
}
- ]
+ ],
+ helpMsg:
+ "This is a list of templates that are available to you for creating documents. You can click the 'use' button to create a new document using a template, modify the document & add signers in the next step."
};
default:
return null;
diff --git a/apps/OpenSign/src/layout/HomeLayout.js b/apps/OpenSign/src/layout/HomeLayout.js
index d3cfd81883..0cfccf1800 100644
--- a/apps/OpenSign/src/layout/HomeLayout.js
+++ b/apps/OpenSign/src/layout/HomeLayout.js
@@ -224,7 +224,10 @@ const HomeLayout = () => {
-
+
{}
diff --git a/apps/OpenSign/src/pages/Form.js b/apps/OpenSign/src/pages/Form.js
index 24fa145d5a..4ab1a09f21 100644
--- a/apps/OpenSign/src/pages/Form.js
+++ b/apps/OpenSign/src/pages/Form.js
@@ -35,7 +35,7 @@ const Forms = (props) => {
const [formData, setFormData] = useState({
Name: "",
Description: "",
- Note: "Please review and sign this document",
+ Note: "",
TimeToCompleteDays: 15,
SendinOrder: "false"
});
@@ -51,6 +51,7 @@ const Forms = (props) => {
};
useEffect(() => {
handleReset();
+ // eslint-disable-next-line react-hooks/exhaustive-deps
}, [props.title]);
const handleFileInput = (e) => {
setpercentage(0);
@@ -165,7 +166,9 @@ const Forms = (props) => {
"TimeToCompleteDays",
parseInt(formData?.TimeToCompleteDays)
);
- const isChecked = formData.SendinOrder === "true" ? true : false;
+ }
+ if (props.title !== "Sign Yourself") {
+ const isChecked = formData.SendinOrder === "false" ? false : true;
object.set("SendinOrder", isChecked);
}
object.set("URL", fileupload);
@@ -233,9 +236,12 @@ const Forms = (props) => {
setFormData({
Name: "",
Description: "",
- Note: "Please review and sign this document",
+ Note:
+ props.title === "Sign Yourself"
+ ? "Note to myself"
+ : "Please review and sign this document",
TimeToCompleteDays: 15,
- SendinOrder: "false"
+ SendinOrder: "true"
});
setFileUpload([]);
setpercentage(0);
@@ -324,7 +330,10 @@ const Forms = (props) => {
) : (
-
API Token
+
+
+ API Token{" "}
+
+
- {
const [signName, setSignName] = useState("");
const [signature, setSignature] = useState("");
const [warning, setWarning] = useState(false);
- const [nameWarning, setNameWarning] = useState(false);
const [isvalue, setIsValue] = useState(false);
const allColor = ["blue", "red", "black"];
const [isLoader, setIsLoader] = useState(true);
@@ -105,9 +104,7 @@ const ManageSign = () => {
e.preventDefault();
const isUrl = image.includes("https");
- if (!signName) {
- setNameWarning(true);
- } else if (!isvalue) {
+ if (!isvalue) {
setWarning(true);
setTimeout(() => setWarning(false), 1000);
} else {
@@ -222,26 +219,13 @@ const ManageSign = () => {
setIsValue(true);
};
return (
-
+
{isLoader && (
-
-
+
)}
{isSuccess && (
@@ -269,61 +253,9 @@ const ManageSign = () => {
paddingBottom: 8
}}
>
- Manage Signature
-
-
-
-
setNameWarning(false)}
- onChange={(e) => setSignName(e.target.value)}
- />
-
-
+ My Signature
-
+
{
key === 0 && penColor === "blue"
? "2px solid blue"
: key === 1 && penColor === "red"
- ? "2px solid red"
- : key === 2 && penColor === "black"
- ? "2px solid black"
- : "2px solid white"
+ ? "2px solid red"
+ : key === 2 && penColor === "black"
+ ? "2px solid black"
+ : "2px solid white"
}}
onClick={() => {
if (key === 0) {
@@ -537,10 +469,10 @@ const ManageSign = () => {
key === 0 && initialPen === "blue"
? "2px solid blue"
: key === 1 && initialPen === "red"
- ? "2px solid red"
- : key === 2 && initialPen === "black"
- ? "2px solid black"
- : "2px solid white"
+ ? "2px solid red"
+ : key === 2 && initialPen === "black"
+ ? "2px solid black"
+ : "2px solid white"
}}
onClick={() => {
if (key === 0) {
diff --git a/apps/OpenSign/src/pages/Opensigndrive.js b/apps/OpenSign/src/pages/Opensigndrive.js
index b682c9b39d..61bfed76d6 100644
--- a/apps/OpenSign/src/pages/Opensigndrive.js
+++ b/apps/OpenSign/src/pages/Opensigndrive.js
@@ -7,8 +7,8 @@ import { useNavigate } from "react-router-dom";
import Title from "../components/Title";
import Parse from "parse";
import ModalUi from "../primitives/ModalUi";
-const DriveBody = React.lazy(() =>
- import("../components/opensigndrive/DriveBody")
+const DriveBody = React.lazy(
+ () => import("../components/opensigndrive/DriveBody")
);
const Loader = () => {
return (
@@ -51,6 +51,9 @@ function Opensigndrive() {
const [folderName, setFolderName] = useState([]);
const [isAlert, setIsAlert] = useState({ isShow: false, alertMessage: "" });
const [isNewFol, setIsNewFol] = useState(false);
+ const [skip, setSkip] = useState(0);
+ const limit = 100;
+ const [loading, setLoading] = useState(false);
const currentUser =
localStorage.getItem(
`Parse/${localStorage.getItem("parseAppId")}/currentUser`
@@ -61,103 +64,82 @@ function Opensigndrive() {
const jsonCurrentUser = JSON.parse(currentUser);
useEffect(() => {
- if (docId) {
- getPdfFolderDocumentList();
- } else {
- getPdfDocumentList();
- }
+ getPdfDocumentList();
// eslint-disable-next-line
}, [docId]);
//function for get all pdf document list
- const getPdfDocumentList = async () => {
- const load = {
- isLoad: true,
- message: "This might take some time"
- };
- let driveDetails;
- setIsLoading(load);
+ const getPdfDocumentList = async (disbaleLoading) => {
+ setLoading(true);
+ if (!disbaleLoading) {
+ setIsLoading({ isLoad: true, message: "This might take some time" });
+ }
try {
- driveDetails = await getDrive();
- if (driveDetails) {
- if (driveDetails.length > 0) {
- setPdfData(driveDetails);
- sortApps(null, null, driveDetails);
- }
- const data = [
- {
- name: "OpenSign™ Drive",
- objectId: ""
- }
- ];
- setFolderName(data);
- const loadObj = {
- isLoad: false
- };
- setIsLoading(loadObj);
- } else if (driveDetails === "Error: Something went wrong!") {
- const loadObj = {
- isLoad: false
- };
+ const driveDetails = await getDrive(docId, skip, limit);
+ if (driveDetails && driveDetails === "Error: Something went wrong!") {
setHandleError("Error: Something went wrong!");
- setIsLoading(loadObj);
+ } else if (driveDetails && driveDetails.length > 0) {
+ setSkip((prevSkip) => prevSkip + limit);
+ sortApps("Date", "Decending", driveDetails, true);
+ }
+ if (!docId) {
+ setFolderName([{ name: "OpenSign™ Drive", objectId: "" }]);
}
} catch (e) {
setIsAlert({
isShow: true,
alertMessage: "something went wrong"
});
+ } finally {
+ setLoading(false);
+ setIsLoading({
+ isLoad: false
+ });
}
};
- //function for get parent folder document list
- const getPdfFolderDocumentList = async () => {
- const load = {
- isLoad: true,
- message: "This might take some time"
- };
- setIsLoading(load);
- let driveDetails;
- try {
- driveDetails = await getDrive(docId);
- if (driveDetails) {
- if (driveDetails.length > 0) {
- setPdfData(driveDetails);
- sortApps(null, null, driveDetails);
- } else {
- setPdfData([]);
- }
- const loadObj = {
- isLoad: false
- };
- setIsLoading(loadObj);
- } else if (driveDetails === "Error: Something went wrong!") {
- const loadObj = {
- isLoad: false
- };
- setHandleError("Error: Something went wrong!");
- setIsLoading(loadObj);
+ //function to fetch drive details list on scroll bottom
+ const handleScroll = () => {
+ //get document of render openSign-drive component using id
+ const documentList = document.getElementById("renderList");
+ //documentList.clientHeight property returns the height of an element's content area, including padding but not including borders, margins, or scrollbars.
+ //documentList.scrollHeight property returns the entire height of an element,including the parts that are not visible due to overflow..
+ // documentList.scrollTop property show height of element, how much the content has been scrolled from the top.
+ // When the sum of scrollTop and clientHeight is equal to scrollHeight, it means that the user has scrolled to the bottom of the div.
+ if (
+ documentList &&
+ documentList.scrollTop + documentList.clientHeight >=
+ documentList.scrollHeight
+ ) {
+ //disableLoading is used disable initial loader
+ const disableLoading = true;
+ // If the fetched data length is less than the limit, it means there's no more data to fetch
+ if (!loading && pdfData.length % 100 === 0) {
+ getPdfDocumentList(disableLoading);
}
- } catch (e) {
- setIsAlert({
- isShow: true,
- alertMessage: "something went wrong!"
- });
}
};
+ //useEffect is used to call handleScroll function on scrolling event
+ useEffect(() => {
+ const documentList = document.getElementById("renderList");
+ if (documentList) {
+ documentList.addEventListener("scroll", handleScroll);
+ return () => {
+ documentList.removeEventListener("scroll", handleScroll);
+ };
+ }
+ // eslint-disable-next-line
+ }, [loading]); // Add/remove scroll event listener when loading changes
- //function for get all pdf document list
- const getParentFolder = async () => {
- setIsFolder(true);
- };
//function for handle folder name path
const handleRoute = (index) => {
+ setPdfData([]);
+ setSkip(0);
const updateFolderName = folderName.filter((x, i) => {
if (i <= index) {
return x;
}
});
-
setFolderName(updateFolderName);
const getLastId = updateFolderName[updateFolderName.length - 1];
setDocId(getLastId.objectId);
@@ -244,18 +226,19 @@ function Opensigndrive() {
}
};
- const sortApps = (type, order, driveDetails) => {
+ const sortApps = (type, order, driveDetails, isInitial) => {
const selectedSortType = type ? type : selectedSort ? selectedSort : "Date";
const sortOrder = order ? order : sortingOrder ? sortingOrder : "Decending";
-
- let sortingData = driveDetails;
if (selectedSortType === "Name") {
- sortingApp(sortingData, "Name", sortOrder);
+ sortingApp(driveDetails, "Name", sortOrder);
} else if (selectedSortType === "Date") {
- sortingApp(sortingData, "Date", sortOrder);
+ sortingApp(driveDetails, "Date", sortOrder);
+ }
+ if (isInitial) {
+ setPdfData([...pdfData, ...driveDetails]);
+ } else {
+ setPdfData(driveDetails);
}
-
- setPdfData(sortingData);
};
//function for handle auto scroll on folder path
@@ -322,6 +305,7 @@ function Opensigndrive() {
// Cleanup the event listener when the component unmounts
document.removeEventListener("click", closeMenuOnOutsideClick);
};
+ // eslint-disable-next-line
}, [isShowSort, isNewFol]);
const handleFolderTab = (folderData) => {
@@ -563,7 +547,7 @@ function Opensigndrive() {
>
getParentFolder()}
+ onClick={() => setIsFolder(true)}
>
+ {loading && (
+ Loading...
+ )}
)}
>
diff --git a/apps/OpenSign/src/pages/PlaceHolderSign.js b/apps/OpenSign/src/pages/PlaceHolderSign.js
index 1d8496a80d..3228e963ba 100644
--- a/apps/OpenSign/src/pages/PlaceHolderSign.js
+++ b/apps/OpenSign/src/pages/PlaceHolderSign.js
@@ -27,7 +27,8 @@ import {
addWidgetOptions,
textInputWidget,
textWidget,
- radioButtonWidget
+ radioButtonWidget,
+ color
} from "../constant/Utils";
import RenderPdf from "../components/pdf/RenderPdf";
import { useNavigate } from "react-router-dom";
@@ -80,6 +81,7 @@ function PlaceHolderSign() {
const [zIndex, setZIndex] = useState(1);
const [signKey, setSignKey] = useState();
const [tempSignerId, setTempSignerId] = useState("");
+ const [blockColor, setBlockColor] = useState("");
const [pdfLoadFail, setPdfLoadFail] = useState({
status: false,
type: "load"
@@ -106,20 +108,6 @@ function PlaceHolderSign() {
status: false,
message: ""
});
- const color = [
- "#93a3db",
- "#e6c3db",
- "#c0e3bc",
- "#bce3db",
- "#b8ccdb",
- "#ceb8db",
- "#ffccff",
- "#99ffcc",
- "#cc99ff",
- "#ffcc99",
- "#66ccff",
- "#ffffcc"
- ];
const isMobile = window.innerWidth < 767;
const [, drop] = useDrop({
@@ -276,14 +264,17 @@ function PlaceHolderSign() {
});
setSignersData(updatedSigners);
setUniqueId(updatedSigners[0].Id);
+ setBlockColor(updatedSigners[0].blockColor);
} else {
const updatedSigners = documentData[0].Signers.map((x, index) => ({
...x,
Id: randomId(),
- Role: "User " + (index + 1)
+ Role: "User " + (index + 1),
+ blockColor: color[index % color.length]
}));
setSignersData(updatedSigners);
setUniqueId(updatedSigners[0].Id);
+ setBlockColor(updatedSigners[0].blockColor);
}
} else {
setRoleName("User 1");
@@ -303,6 +294,7 @@ function PlaceHolderSign() {
setSignersData(updatedSigners);
setIsSelectId(0);
setUniqueId(updatedSigners[0].Id);
+ setBlockColor(updatedSigners[0].blockColor);
}
}
} else if (
@@ -1034,7 +1026,7 @@ function PlaceHolderSign() {
selector: '[data-tut="reactourSecond"]',
content: () => (
),
@@ -1372,7 +1364,6 @@ function PlaceHolderSign() {
const closePopup = () => {
setIsAddUser({});
};
-
return (
<>
@@ -1717,6 +1708,10 @@ function PlaceHolderSign() {
setUniqueId={setUniqueId}
setRoleName={setRoleName}
initial={true}
+ sendInOrder={pdfDetails[0].SendinOrder}
+ setSignersData={setSignersData}
+ blockColor={blockColor}
+ setBlockColor={setBlockColor}
/>
) : (
@@ -1735,6 +1730,10 @@ function PlaceHolderSign() {
setContractName={setContractName}
setUniqueId={setUniqueId}
setRoleName={setRoleName}
+ sendInOrder={pdfDetails[0].SendinOrder}
+ setSignersData={setSignersData}
+ blockColor={blockColor}
+ setBlockColor={setBlockColor}
// handleAddSigner={handleAddSigner}
/>
diff --git a/apps/OpenSign/src/pages/Report.js b/apps/OpenSign/src/pages/Report.js
index 1868dab8ea..10765260a9 100644
--- a/apps/OpenSign/src/pages/Report.js
+++ b/apps/OpenSign/src/pages/Report.js
@@ -12,6 +12,7 @@ const Report = () => {
const [List, setList] = useState([]);
const [isLoader, setIsLoader] = useState(true);
const [reportName, setReportName] = useState("");
+ const [reporthelp, setReportHelp] = useState("");
const [actions, setActions] = useState([]);
const [heading, setHeading] = useState([]);
const [isNextRecord, setIsNextRecord] = useState(false);
@@ -53,6 +54,7 @@ const Report = () => {
setHeading(json.heading);
setReportName(json.reportName);
setForm(json.form);
+ setReportHelp(json?.helpMsg)
const currentUser = Parse.User.current().id;
const headers = {
@@ -156,6 +158,7 @@ const Report = () => {
isMoreDocs={isMoreDocs}
docPerPage={docPerPage}
form={form}
+ report_help={reporthelp}
/>
) : (
diff --git a/apps/OpenSign/src/pages/SignyourselfPdf.js b/apps/OpenSign/src/pages/SignyourselfPdf.js
index 1d4803e9fd..078aca5800 100644
--- a/apps/OpenSign/src/pages/SignyourselfPdf.js
+++ b/apps/OpenSign/src/pages/SignyourselfPdf.js
@@ -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 = {
diff --git a/apps/OpenSign/src/pages/TemplatePlaceholder.js b/apps/OpenSign/src/pages/TemplatePlaceholder.js
index c6069ac17e..82fe4d40ec 100644
--- a/apps/OpenSign/src/pages/TemplatePlaceholder.js
+++ b/apps/OpenSign/src/pages/TemplatePlaceholder.js
@@ -77,6 +77,7 @@ const TemplatePlaceholder = () => {
const [showDropdown, setShowDropdown] = useState(false);
const [widgetType, setWidgetType] = useState("");
const [isRadio, setIsRadio] = useState(false);
+ const [blockColor, setBlockColor] = useState("");
const [selectWidgetId, setSelectWidgetId] = useState("");
const [isNameModal, setIsNameModal] = useState(false);
const [pdfLoadFail, setPdfLoadFail] = useState({
@@ -223,6 +224,7 @@ const TemplatePlaceholder = () => {
});
setSignersData(updatedSigners);
setUniqueId(updatedSigners[0].Id);
+ setBlockColor(updatedSigners[0].blockColor);
} else {
const updatedSigners = documentData[0].Signers.map((x, index) => ({
...x,
@@ -231,6 +233,7 @@ const TemplatePlaceholder = () => {
}));
setSignersData(updatedSigners);
setUniqueId(updatedSigners[0].Id);
+ setBlockColor(updatedSigners[0].blockColor);
}
} else {
setRoleName("User 1");
@@ -249,6 +252,7 @@ const TemplatePlaceholder = () => {
setUniqueId(updatedSigners[0].Id);
setSignersData(updatedSigners);
setIsSelectId(0);
+ setBlockColor(updatedSigners[0].blockColor);
}
}
} else if (
@@ -446,7 +450,7 @@ const TemplatePlaceholder = () => {
setIsCheckbox(true);
} else if (dragTypeValue === radioButtonWidget) {
setIsRadio(true);
- }
+ }
setCurrWidgetsDetails({});
setWidgetType(dragTypeValue);
setSignKey(key);
@@ -854,6 +858,7 @@ const TemplatePlaceholder = () => {
setIsModalRole(false);
setRoleName("");
setUniqueId(Id);
+ setBlockColor(color[index]);
setIsSelectId(index);
setIsMailSend(false);
};
@@ -870,9 +875,11 @@ const TemplatePlaceholder = () => {
if (index === signersdata.length - 1) {
setUniqueId(updateSigner[updateSigner.length - 1]?.Id || "");
setIsSelectId(index - 1 || 0);
+ setBlockColor(color[index - 1 || 0]);
} else {
setUniqueId(updateSigner[index]?.Id || "");
setIsSelectId(index);
+ setBlockColor(color[index]);
}
setSignerPos(updatePlaceholderUser);
@@ -1443,6 +1450,10 @@ const TemplatePlaceholder = () => {
title={"Roles"}
initial={true}
isTemplateFlow={true}
+ sendInOrder={pdfDetails[0].SendinOrder}
+ setSignersData={setSignersData}
+ blockColor={blockColor}
+ setBlockColor={setBlockColor}
/>
) : (
@@ -1466,6 +1477,10 @@ const TemplatePlaceholder = () => {
handleRoleChange={handleRoleChange}
handleOnBlur={handleOnBlur}
title={"Roles"}
+ sendInOrder={pdfDetails[0]?.SendinOrder}
+ setSignersData={setSignersData}
+ blockColor={blockColor}
+ setBlockColor={setBlockColor}
/>
Email:{" "}
{UserProfile && UserProfile.email}
- -
+
-
Is Email verified:{" "}
{UserProfile && UserProfile.emailVerified
@@ -258,10 +260,17 @@ function UserProfile() {
: "Not verified"}
- -
- Disable DocumentId :{" "}
-
-