🔥 The free & Open Source DocuSign alternative
JavaScript digital-signaturedocument-signingdocusign-alternativedocusign-freee-signatureelectronic-signatureelectronic-signaturesesignesignaturehacktoberfestjavascriptlegaltechmongodbnodejsopen-sourcepdf-signpdf-signaturereactjsself-hostedsign-pdf-files
fix: drive details sorting, signature and intial widgets signature url isuue
RaktimaNXG3656175f115c
diff --git a/apps/OpenSign/src/components/pdf/PlaceholderType.js b/apps/OpenSign/src/components/pdf/PlaceholderType.jsindex 00e927429..58bdd0f14 100644--- a/apps/OpenSign/src/components/pdf/PlaceholderType.js+++ b/apps/OpenSign/src/components/pdf/PlaceholderType.js@@ -307,6 +307,7 @@ function PlaceholderType(props) {return props.pos.SignUrl ? (<imgalt="signimg"+ draggable="false"src={props.pos.SignUrl}style={{width: "99%",@@ -328,6 +329,7 @@ function PlaceholderType(props) {return props.pos.SignUrl ? (<imgalt="signimg"+ draggable="false"src={props.pos.SignUrl}style={{width: "99%",@@ -483,6 +485,7 @@ function PlaceholderType(props) {return props.pos.SignUrl ? (<imgalt="signimg"+ draggable="false"src={props.pos.SignUrl}style={{width: "99%",@@ -668,6 +671,7 @@ function PlaceholderType(props) {return props.pos.SignUrl ? (<imgalt="signimg"+ draggable="false"src={props.pos.SignUrl}style={{width: "99%",@@ -787,6 +791,7 @@ function PlaceholderType(props) {<div style={{ pointerEvents: "none" }}><imgalt="signimg"+ draggable="false"src={props.pos.SignUrl}style={{width: "99%",diff --git a/apps/OpenSign/src/components/pdf/SignPad.js b/apps/OpenSign/src/components/pdf/SignPad.jsindex 0e59b965f..9103a3d8f 100644--- a/apps/OpenSign/src/components/pdf/SignPad.js+++ b/apps/OpenSign/src/components/pdf/SignPad.js@@ -67,7 +67,7 @@ function SignPad({} else if (isTab === "uploadImage") {setImage("");}- setIsInitial(false);+ // setIsInitial(false);};//function for set signature urlconst handleSignatureChange = () => {@@ -154,8 +154,10 @@ function SignPad({const url = currWidgetsDetails?.SignUrl;//checking widget type and draw type signature url- if (isWidgetType === "initials" && signatureType === "draw" && url) {- canvasRef.current.fromDataURL(url);+ if (isInitial) {+ if (isWidgetType === "initials" && signatureType === "draw" && url) {+ canvasRef.current.fromDataURL(url);+ }} else if (isWidgetType === "signature" &&signatureType === "draw" &&diff --git a/apps/OpenSign/src/pages/Opensigndrive.js b/apps/OpenSign/src/pages/Opensigndrive.jsindex 93079a69d..82773faa9 100644--- a/apps/OpenSign/src/pages/Opensigndrive.js+++ b/apps/OpenSign/src/pages/Opensigndrive.js@@ -88,7 +88,7 @@ function Opensigndrive() {setHandleError("Error: Something went wrong!");} else if (driveDetails && driveDetails.length > 0) {setSkip((prevSkip) => prevSkip + limit);- sortApps(orderName.Date, orderName.Descending, driveDetails, true);+ sortingData(null, null, driveDetails, true);}if (!docId) {setFolderName([{ name: "OpenSignâ„¢ Drive", objectId: "" }]);@@ -218,7 +218,8 @@ function Opensigndrive() {}};- const sortingApp = (appInfo, type, order) => {+ //function to use sorting document list according to type and order+ const sortedBy = (appInfo, type, order) => {if (type === orderName.Name) {if (order === orderName.Ascending) {return appInfo.sort((a, b) => (a.Name > b.Name ? 1 : -1));@@ -234,7 +235,8 @@ function Opensigndrive() {}};- const sortApps = (type, order, driveDetails, isInitial) => {+ //function to use get sorting type, order and document list to sort+ const sortingData = (type, order, driveDetails, isInitial) => {const selectedSortType = type? type: selectedSort@@ -245,11 +247,14 @@ function Opensigndrive() {: sortingOrder? sortingOrder: orderName.Descending;++ //check isInitial true it means sort previous 20 and get on scrolling 20 = 40 document listconst allPdfData = isInitial ? [...pdfData, ...driveDetails] : driveDetails;+ //call sortedBy function according to selected Type and orderif (selectedSortType === orderName.Name) {- sortingApp(driveDetails, orderName.Name, sortOrder);+ sortedBy(driveDetails, orderName.Name, sortOrder);} else if (selectedSortType === orderName.Date) {- sortingApp(allPdfData, orderName.Date, sortOrder);+ sortedBy(allPdfData, orderName.Date, sortOrder);}setPdfData(allPdfData);@@ -631,7 +636,7 @@ function Opensigndrive() {key={ind}onClick={() => {setSelectedSort(value);- sortApps(value, null, pdfData);+ sortingData(value, null, pdfData);}}className="dropdown-item itemColor"style={{@@ -657,7 +662,7 @@ function Opensigndrive() {key={ind}onClick={() => {setSortingOrder(order);- sortApps(null, order, pdfData);+ sortingData(null, order, pdfData);}}className="dropdown-item itemColor"style={{diff --git a/apps/OpenSign/src/pages/SignyourselfPdf.js b/apps/OpenSign/src/pages/SignyourselfPdf.jsindex 4a28e7313..4538732f8 100644--- a/apps/OpenSign/src/pages/SignyourselfPdf.js+++ b/apps/OpenSign/src/pages/SignyourselfPdf.js@@ -768,6 +768,7 @@ function SignYourSelf() {//function for delete signature blockconst handleDeleteSign = (key) => {+ setCurrWidgetsDetails({});const updateResizeData = [];let filterData = xyPostion[index].pos.filter((data) => data.key !== key);