Skip to content

🔥 The free & Open Source DocuSign alternative

Merge branch 'staging' of https://github.com/OpenSignLabs/OpenSign into validation

prafull-opensignlabsf06b70236082
diff --cc apps/OpenSign/public/locales/en/translation.json
index 4a4b1588a,11417711a..363ddd589
--- a/apps/OpenSign/public/locales/en/translation.json
+++ b/apps/OpenSign/public/locales/en/translation.json
@@@ -580,15 -585,22 +585,29 @@@
"Recent signature requests": "This is a list of documents that are waiting for your signature.",
"Recently sent for signatures":"This is a list of documents you've sent to other parties for signature.",
"Drafts":"This are documents you have started but have not finalized for sending."
- },
- "enter-email-plaholder":"Add an email address and hit enter",
- "success-email-alert":"Email sent successfully!",
- "expired-doc-title":"Expired Document",
- "expired-on-mssg" :"This document expired on {{expiredDate}} and is no longer available to sign.",
- "signature-validate-alert":"Please confirm that you have selected at least {{minRequiredCount}} checkboxes.",
- "signature-validate-alert-2" :"Ensure this field is accurately filled and meets all requirements."
-
-
+ },
++ "enter-email-plaholder":"Add an email address and hit enter",
++ "success-email-alert":"Email sent successfully!",
++ "expired-doc-title":"Expired Document",
++ "expired-on-mssg" :"This document expired on {{expiredDate}} and is no longer available to sign.",
++ "signature-validate-alert":"Please confirm that you have selected at least {{minRequiredCount}} checkboxes.",
++ "signature-validate-alert-2" :"Ensure this field is accurately filled and meets all requirements.",
+ "remaing-users":"Remaining users",
+ "Role":"Role",
+ "additional-users":"Please purchase add-on users.",
+ "Quantity-of-users":"Quantity of users",
+ "Price":"Price",
+ "Total-price-for-next-time":"Total price for next time",
+ "Proceed":"Proceed",
+ "Select":"Select",
+ "Add-seats":"Add Seats"
+
+
+
+
+
+
+
+
}
diff --cc apps/OpenSign/public/locales/fr/translation.json
index 465ad5392,c79e0f9bc..83d930626
--- a/apps/OpenSign/public/locales/fr/translation.json
+++ b/apps/OpenSign/public/locales/fr/translation.json
@@@ -579,16 -584,18 +584,28 @@@
"Recent signature requests": "Voici une liste de documents qui attendent votre signature.",
"Recently sent for signatures":"Il s'agit d'une liste de documents que vous avez envoyés à d'autres parties pour signature.",
"Drafts":"Il s'agit de documents que vous avez commencés mais que vous n'avez pas finalisés pour envoi."
- },
- "enter-email-plaholder":"Ajoutez une adresse email et appuyez sur Entrée",
- "success-email-alert" :"E-mail envoyé avec succès!",
- "expired-doc-title" :"Document expiré",
- "expired-on-mssg" :"Ce document a expiré le {{expiredDate}} et n'est plus disponible pour signature.",
- "signature-validate-alert":"Veuillez confirmer que vous avez coché au moins {{minRequiredCount}} cases.",
- "signature-validate-alert-2" :"Assurez-vous que ce champ est rempli avec précision et répond à toutes les exigences."
+
+ },
++ "enter-email-plaholder":"Ajoutez une adresse email et appuyez sur Entrée",
++ "success-email-alert" :"E-mail envoyé avec succès!",
++ "expired-doc-title" :"Document expiré",
++ "expired-on-mssg" :"Ce document a expiré le {{expiredDate}} et n'est plus disponible pour signature.",
++ "signature-validate-alert":"Veuillez confirmer que vous avez coché au moins {{minRequiredCount}} cases.",
++ "signature-validate-alert-2" :"Assurez-vous que ce champ est rempli avec précision et répond à toutes les exigences.",
+ "remaing-users":"Utilisateurs restants",
+ "Role":"RĂ´le",
+ "additional-users":"Veuillez acheter des utilisateurs supplémentaires.",
+ "Quantity-of-users":"Quantité d'utilisateurs",
+ "Price":"Prix",
+ "Total-price-for-next-time":"Prix ​​total pour la prochaine fois",
+ "Proceed":"Procéder",
+ "Select":"sélectionner",
+ "Add-seats":"Ajouter des sièges"
+
+
+
+
+
+
}
diff --cc apps/OpenSign/src/json/plansArr.js
index 0fb08c2d6,77a573e8a..293be04ef
--- a/apps/OpenSign/src/json/plansArr.js
+++ b/apps/OpenSign/src/json/plansArr.js
@@@ -105,10 -105,10 +105,10 @@@ const plans =
subtitle: "Exclusive Access to advanced features.",
btn: { text: "Subscribe", color: "op-btn-accent" },
url: isStaging
-- ? "https://billing.zoho.in/subscribe/ed8097273a82b6bf39892c11a3bb3c381eb2705736014cfbdbde1ccf1c7a189d/team-weekly"
++ ? "https://billing.zoho.in/subscribe/ed8097273a82b6bf39892c11a3bb3c381eb2705736014cfbdbde1ccf1c7a189d/teams-monthly"
: "https://billing.opensignlabs.com/subscribe/ef798486e6a0a11ea65f2bae8f2af901237d0702bfaa959406306635d80f138c/teams-monthly",
yearlyUrl: isStaging
-- ? "https://billing.zoho.in/subscribe/ed8097273a82b6bf39892c11a3bb3c381eb2705736014cfbdbde1ccf1c7a189d/team-weekly"
++ ? "https://billing.zoho.in/subscribe/ed8097273a82b6bf39892c11a3bb3c381eb2705736014cfbdbde1ccf1c7a189d/teams-yearly"
: "https://billing.opensignlabs.com/subscribe/ef798486e6a0a11ea65f2bae8f2af9011a864994bbeeec71fcf106188630199d/teams-yearly",
target: "_self",
benefits: [
@@@ -171,72 -171,4 +171,70 @@@ export const validplan =
"enterprise-monthly": true,
"enterprise-yearly": true
};
+export const paidUrl = (plan) => {
+ const teamperiod = {
+ "team-weekly": "monthly",
+ "team-yearly": "yearly",
+ "teams-monthly": "monthly",
+ "teams-yearly": "yearly"
+ };
+ const period = teamperiod[plan] || "";
+ if (period) {
+ const extUser =
+ localStorage.getItem("Extand_Class") &&
+ JSON.parse(localStorage.getItem("Extand_Class"))?.[0];
+ const user = {
+ name: extUser?.Name,
+ email: extUser?.Email,
+ company: extUser?.Company,
+ phone: extUser?.Phone
+ };
+ // console.log("userDetails ", userDetails);
+ const fullname = user && user.name ? user.name.split(" ") : "";
+ const firstname = fullname?.[0]
+ ? "first_name=" + encodeURIComponent(fullname?.[0])
+ : "";
+ const lastname = fullname?.[1]
+ ? "&last_name=" + encodeURIComponent(fullname?.[1])
+ : "";
+ const name = firstname ? firstname + lastname : "";
+ const email =
+ user && user.email ? "&email=" + encodeURIComponent(user.email) : "";
+ const company =
+ user && user.company
+ ? "&company_name=" + encodeURIComponent(user.company)
+ : "";
+ const phone =
+ user && user.phone ? "&mobile=" + encodeURIComponent(user.phone) : "";
+ const allowedUsers = localStorage.getItem("allowedUsers");
+ const quantity = allowedUsers
- ? isStaging
- ? `addon_code%5B0%5D=extra-users&addon_quantity%5B0%5D=${allowedUsers}`
- : `addon_code%5B0%5D=extra-teams-users-${period}&addon_quantity%5B0%5D=${allowedUsers}`
++ ? `addon_code%5B0%5D=extra-teams-users-${period}&addon_quantity%5B0%5D=${allowedUsers}&`
+ : "";
+
+ const details =
+ "?shipping_country_code=US&billing_country_code=US&billing_state_code=CA&" +
+ quantity +
+ name +
+ email +
+ company +
+ phone;
+
+ if (user) {
+ localStorage.setItem("userDetails", JSON.stringify(user));
+ }
+ const url = {
+ monthly: isStaging
- ? "https://billing.zoho.in/subscribe/ed8097273a82b6bf39892c11a3bb3c381eb2705736014cfbdbde1ccf1c7a189d/team-weekly"
++ ? "https://billing.zoho.in/subscribe/ed8097273a82b6bf39892c11a3bb3c381eb2705736014cfbdbde1ccf1c7a189d/teams-monthly"
+ : "https://billing.opensignlabs.com/subscribe/ef798486e6a0a11ea65f2bae8f2af901237d0702bfaa959406306635d80f138c/teams-monthly",
+ yearly: isStaging
- ? "https://billing.zoho.in/subscribe/ed8097273a82b6bf39892c11a3bb3c381eb2705736014cfbdbde1ccf1c7a189d/team-weekly"
++ ? "https://billing.zoho.in/subscribe/ed8097273a82b6bf39892c11a3bb3c381eb2705736014cfbdbde1ccf1c7a189d/teams-yearly"
+ : "https://billing.opensignlabs.com/subscribe/ef798486e6a0a11ea65f2bae8f2af9011a864994bbeeec71fcf106188630199d/teams-yearly"
+ };
+
+ const planurl = url[period] + details;
+ return planurl;
+ } else {
+ return "/subscription";
+ }
+};
export default plans;
diff --cc apps/OpenSign/src/pages/Login.js
index cfb8382a6,04a0887d5..3454d57e8
--- a/apps/OpenSign/src/pages/Login.js
+++ b/apps/OpenSign/src/pages/Login.js
@@@ -75,17 -74,13 +75,20 @@@ function Login()
dispatch(fetchAppInfo());
};
const handleChange = (event) => {
- const { name, value } = event.target;
+ let { name, value } = event.target;
+ if (name === "email") {
+ value = value?.toLowerCase()?.replace(/\s/g, "");
+ }
setState({ ...state, [name]: value });
};
-
+ const handlePaidRoute = (plan) => {
+ const route = paidUrl(plan);
+ if (route === "/subscription") {
+ navigate(route);
+ } else {
+ openInNewTab(route, "_self");
+ }
+ };
const handleSubmit = async (event) => {
localStorage.removeItem("accesstoken");
event.preventDefault();
diff --cc apps/OpenSign/src/pages/PdfRequestFiles.js
index 89c5b79ee,f72b098f5..e8a422fad
--- a/apps/OpenSign/src/pages/PdfRequestFiles.js
+++ b/apps/OpenSign/src/pages/PdfRequestFiles.js
@@@ -31,7 -31,7 +31,8 @@@ import
handleDownloadPdf,
handleToPrint,
handleDownloadCertificate,
- openInNewTab
++ openInNewTab,
+ getDefaultSignature
} from "../constant/Utils";
import LoaderWithMsg from "../primitives/LoaderWithMsg";
import HandleError from "../primitives/HandleError";
diff --cc apps/OpenSign/src/pages/UserProfile.js
index fa7937183,df42f0e0b..df9c7a5bb
--- a/apps/OpenSign/src/pages/UserProfile.js
+++ b/apps/OpenSign/src/pages/UserProfile.js
@@@ -7,11 -7,11 +7,11 @@@ import Title from "../components/Title"
import sanitizeFileName from "../primitives/sanitizeFileName";
import axios from "axios";
import Tooltip from "../primitives/Tooltip";
- import { isEnableSubscription } from "../constant/const";
+ import { isEnableSubscription, isStaging } from "../constant/const";
import {
checkIsSubscribed,
- checkIsSubscribedTeam,
- handleSendOTP
+ handleSendOTP,
+ openInNewTab
} from "../constant/Utils";
import Upgrade from "../primitives/Upgrade";
import ModalUi from "../primitives/ModalUi";