🔥 The free & Open Source DocuSign alternative
JavaScript digital-signaturedocument-signingdocusign-alternativedocusign-freee-signatureelectronic-signatureelectronic-signaturesesignesignaturehacktoberfestjavascriptlegaltechmongodbnodejsopen-sourcepdf-signpdf-signaturereactjsself-hostedsign-pdf-files
fix: handle freeplan users are forcefully navigate to subscription
prafull-opensignlabscf6759ce799f
diff --git a/apps/OpenSign/src/constant/Utils.js b/apps/OpenSign/src/constant/Utils.jsindex 3ec7bad23..67b399d03 100644--- a/apps/OpenSign/src/constant/Utils.js+++ b/apps/OpenSign/src/constant/Utils.js@@ -13,10 +13,13 @@ export const openInNewTab = (url) => {window.open(url, "_blank", "noopener,noreferrer");};-export async function fetchSubscription(extUserId, contactObjId) {+export async function fetchSubscription(+ extUserId,+ contactObjId,+ isGuestSign = false+) {try {const extClass = localStorage.getItem("Extand_Class");- const isGuestSign = localStorage.getItem("isGuestSigner");let extUser;if (extClass) {const jsonSender = JSON.parse(extClass);@@ -1264,8 +1267,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) {diff --git a/apps/OpenSign/src/pages/PdfRequestFiles.js b/apps/OpenSign/src/pages/PdfRequestFiles.jsindex 9b83567da..4f173f34c 100644--- a/apps/OpenSign/src/pages/PdfRequestFiles.js+++ b/apps/OpenSign/src/pages/PdfRequestFiles.js@@ -140,8 +140,8 @@ function PdfRequestFiles() {}, [divRef.current]);async function checkIsSubscribed(extUserId, contactId) {- const isGuestSign = localStorage.getItem("isGuestSigner");- const res = await fetchSubscription(extUserId, contactId);+ const isGuestSign = location.pathname.includes("/load/") || false;+ const res = await fetchSubscription(extUserId, contactId, isGuestSign);const plan = res.plan;const billingDate = res?.billingDate;const status = res?.status;@@ -1139,9 +1139,9 @@ function PdfRequestFiles() {isDecline.currnt === "Sure"? "Are you sure want to decline this document ?": isDecline.currnt === "YouDeclined"- ? "You have declined this document!"- : isDecline.currnt === "another" &&- "You can not sign this document as it has been declined/revoked."+ ? "You have declined this document!"+ : isDecline.currnt === "another" &&+ "You can not sign this document as it has been declined/revoked."}footerMessage={isDecline.currnt === "Sure"}declineDoc={declineDoc}