diff --git a/apps/OpenSign/src/assets/images/enterprise.png b/apps/OpenSign/src/assets/images/enterprise.png new file mode 100644 index 000000000..37d639f38 Binary files /dev/null and b/apps/OpenSign/src/assets/images/enterprise.png differ diff --git a/apps/OpenSign/src/assets/images/free.png b/apps/OpenSign/src/assets/images/free.png new file mode 100644 index 000000000..16abf972a Binary files /dev/null and b/apps/OpenSign/src/assets/images/free.png differ diff --git a/apps/OpenSign/src/assets/images/professional.png b/apps/OpenSign/src/assets/images/professional.png new file mode 100644 index 000000000..149e721ea Binary files /dev/null and b/apps/OpenSign/src/assets/images/professional.png differ diff --git a/apps/OpenSign/src/assets/images/teams.png b/apps/OpenSign/src/assets/images/teams.png new file mode 100644 index 000000000..c13971fc3 Binary files /dev/null and b/apps/OpenSign/src/assets/images/teams.png differ diff --git a/apps/OpenSign/src/constant/Utils.js b/apps/OpenSign/src/constant/Utils.js index dfc9ffdea..923209b88 100644 --- a/apps/OpenSign/src/constant/Utils.js +++ b/apps/OpenSign/src/constant/Utils.js @@ -91,7 +91,13 @@ export async function checkIsSubscribedTeam() { if (res.plan === "freeplan") { return false; } else if (res.billingDate) { - const plan = res.plan === "team-weekly" || res.plan === "team-yearly"; + const plan = + res.plan === "team-weekly" || + res.plan === "team-yearly" || + res.plan === "teams-monthly" || + res.plan === "teams-yearly" || + res.plan === "enterprise-monthly" || + res.plan === "enterprise-yearly"; if (plan && new Date(res.billingDate) > new Date()) { return true; } else { diff --git a/apps/OpenSign/src/json/plansArr.js b/apps/OpenSign/src/json/plansArr.js index 2b4c215ed..0fec40e92 100644 --- a/apps/OpenSign/src/json/plansArr.js +++ b/apps/OpenSign/src/json/plansArr.js @@ -1,11 +1,12 @@ const plans = [ { planName: "OPENSIGN™ FREE", + img: "free.png", currency: "", monthlyPrice: "Free", yearlyPrice: "Free", subtitle: "Free Unlimited E-signatures, Forever.", - btnText: "Subscribe", + btn: { text: "Subscribe", color: "op-btn-primary" }, url: "", target: "_blank", benefits: [ @@ -28,11 +29,12 @@ const plans = [ }, { planName: "OPENSIGN™ PROFESSIONAL", + img: "professional.png", currency: "$", monthlyPrice: "29.99", - yearlyPrice: "10 /month/user", + yearlyPrice: `10 /month/user`, subtitle: "Exclusive Access to advanced features.", - btnText: "Subscribe", + btn: { text: "Subscribe", color: "op-btn-primary" }, url: window.location.origin === "https://staging-app.opensignlabs.com" ? "https://billing.zoho.in/subscribe/9627f62a09df1c8ce500f2f4dc8328dd84ecda20eeae13878ce581d60240f206/pro-weekly" @@ -56,43 +58,14 @@ const plans = [ "Auto reminders" ] }, - { - planName: "OPENSIGN™ TEAMS", - currency: "$", - monthlyPrice: "40", - yearlyPrice: "20 /month/user", - subtitle: "Exclusive Access to advanced features.", - btnText: "Subscribe", - url: - window.location.origin === "https://staging-app.opensignlabs.com" - ? "https://billing.zoho.in/subscribe/ed8097273a82b6bf39892c11a3bb3c381eb2705736014cfbdbde1ccf1c7a189d/team-weekly" - : "https://billing.opensignlabs.com/subscribe/ef798486e6a0a11ea65f2bae8f2af901d1a09dfa8085585cdd4ec4d7f32137f3/professional-monthly", - yearlyUrl: - window.location.origin === "https://staging-app.opensignlabs.com" - ? "https://billing.zoho.in/subscribe/ed8097273a82b6bf39892c11a3bb3c381eb2705736014cfbdbde1ccf1c7a189d/team-weekly" - : "https://billing.opensignlabs.com/subscribe/ef798486e6a0a11ea65f2bae8f2af901d8ad1135190dff951330360e47585a71/professional-yearly", - target: "_self", - benefits: [ - "Everything in OpenSign™ free, professional", - "Field validations", - "Regular expression validations", - "Organize docs in OpenSign™ Drive", - "Webhooks", - "Zapier integration", - "API Access", - "100 API signatures included", - "DocumentId removal from signed docs", - "Custom email templates", - "Auto reminders" - ] - }, { planName: "OPENSIGN™ ENTERPRISE", + img: "enterprise.png", currency: "", - monthlyPrice: "Request Price", - yearlyPrice: "Request Price", + monthlyPrice: `

Request Price

`, + yearlyPrice: `

Request Price

`, subtitle: "Scalable Features with priority support.", - btnText: "Contact us", + btn: { text: "Contact us", color: "op-btn-primary" }, url: "https://www.opensignlabs.com/contact-us", target: "_blank", benefits: [ @@ -105,5 +78,35 @@ const plans = [ ] } ]; - +export const stagingPlan = { + planName: "OPENSIGN™ TEAMS", + img: "teams.png", + currency: "$", + monthlyPrice: "40", + yearlyPrice: `20 /month/user`, + subtitle: "Exclusive Access to advanced features.", + btn: { text: "Subscribe", color: "op-btn-accent" }, + url: + window.location.origin === "https://staging-app.opensignlabs.com" + ? "https://billing.zoho.in/subscribe/ed8097273a82b6bf39892c11a3bb3c381eb2705736014cfbdbde1ccf1c7a189d/team-weekly" + : "https://billing.opensignlabs.com/subscribe/ef798486e6a0a11ea65f2bae8f2af901d1a09dfa8085585cdd4ec4d7f32137f3/professional-monthly", + yearlyUrl: + window.location.origin === "https://staging-app.opensignlabs.com" + ? "https://billing.zoho.in/subscribe/ed8097273a82b6bf39892c11a3bb3c381eb2705736014cfbdbde1ccf1c7a189d/team-weekly" + : "https://billing.opensignlabs.com/subscribe/ef798486e6a0a11ea65f2bae8f2af901d8ad1135190dff951330360e47585a71/professional-yearly", + target: "_self", + benefits: [ + "Everything in OpenSign™ free, professional", + "Field validations", + "Regular expression validations", + "Organize docs in OpenSign™ Drive", + "Webhooks", + "Zapier integration", + "API Access", + "100 API signatures included", + "DocumentId removal from signed docs", + "Custom email templates", + "Auto reminders" + ] +}; export default plans; diff --git a/apps/OpenSign/src/pages/PlanSubscriptions.js b/apps/OpenSign/src/pages/PlanSubscriptions.js index fd39f5efb..37dec87f7 100644 --- a/apps/OpenSign/src/pages/PlanSubscriptions.js +++ b/apps/OpenSign/src/pages/PlanSubscriptions.js @@ -1,7 +1,7 @@ import React, { useState, useEffect } from "react"; import { useNavigate } from "react-router-dom"; import checkmark from "../assets/images/checkmark.png"; -import plansArr from "../json/plansArr"; +import plansArr, { stagingPlan } from "../json/plansArr"; import Title from "../components/Title"; import Parse from "parse"; import { openInNewTab } from "../constant/Utils"; @@ -16,6 +16,7 @@ const listItemStyle = { const PlanSubscriptions = () => { const navigate = useNavigate(); + const isStagingPlan = plansArr.some((x) => x.planName === "OPENSIGN™ TEAMS"); const [yearlyVisible, setYearlyVisible] = useState(true); const [isLoader, setIsLoader] = useState(true); const extUser = @@ -53,11 +54,13 @@ const PlanSubscriptions = () => { company + phone; useEffect(() => { - // if (localStorage.getItem("accesstoken")) { setIsLoader(false); - // } else { - // navigate("/", { replace: true }); - // } + if ( + !isStagingPlan && + window.location.origin === "https://staging-app.opensignlabs.com" + ) { + plansArr.splice(2, 0, stagingPlan); + } // eslint-disable-next-line }, []); @@ -130,11 +133,11 @@ const PlanSubscriptions = () => {

{item.planName}

-
+
freeimg
@@ -154,7 +157,18 @@ const PlanSubscriptions = () => { )} ) : ( - item.monthlyPrice + <> + {item?.monthlyPrice.includes("<") ? ( +
+ ) : ( + {item?.monthlyPrice} + )} + )}

@@ -182,10 +196,12 @@ const PlanSubscriptions = () => {


diff --git a/apps/OpenSignServer/databases/migrations/20240708200454-create_multiuser_classes.cjs b/apps/OpenSignServer/databases/migrations/20240708200454-create_multiuser_classes.cjs new file mode 100644 index 000000000..258d1d6e6 --- /dev/null +++ b/apps/OpenSignServer/databases/migrations/20240708200454-create_multiuser_classes.cjs @@ -0,0 +1,53 @@ +/** + * + * @param {Parse} Parse + */ +exports.up = async Parse => { + const teamschema = new Parse.Schema('contracts_Teams'); + teamschema.addString('Name'); + teamschema.addBoolean('IsActive', { defaultValue: true }); + teamschema.addPointer('ParentId', 'contracts_Teams'); + teamschema.addPointer('OrganizationId', 'contracts_Organizations'); + teamschema.addArray('Ancestors'); + await teamschema.save(); + + const orgSchema = new Parse.Schema('contracts_Organizations'); + orgSchema.addString('Name'); + orgSchema.addBoolean('IsActive', { defaultValue: true }); + orgSchema.addPointer('TenantId', 'partners_Tenant'); + orgSchema.addPointer('CreatedBy', '_User'); + orgSchema.addPointer('ExtUserId', 'contracts_Users'); + await orgSchema.save(); + + const schema = new Parse.Schema('contracts_Users'); + schema.addBoolean('IsDisabled', { defaultValue: false }); + schema.addPointer('OrganizationId', 'contracts_Organizations'); + schema.addArray('TeamIds'); + await schema.update(); + + const templateschema = new Parse.Schema('contracts_Template'); + templateschema.addArray('SharedWith'); + return templateschema.update(); +}; + +/** + * + * @param {Parse} Parse + */ +exports.down = async Parse => { + const teamschema = new Parse.Schema('contracts_Teams'); + await teamschema.purge().then(() => teamschema.delete()); + + const orgSchema = new Parse.Schema('contracts_Organizations'); + await orgSchema.purge().then(() => orgSchema.delete()); + + const schema = new Parse.Schema('contracts_Users'); + schema.deleteField('IsDisabled'); + schema.deleteField('OrganizationId'); + schema.deleteField('TeamIds'); + await schema.update(); + + const templateschema = new Parse.Schema('contracts_Template'); + templateschema.deleteField('SharedWith'); + return templateschema.update(); +};