Merge pull request #13 from prafullnavkar-nxg/main

change plans and handle mailgun error
This commit is contained in:
Amol
2023-10-25 23:37:45 +05:30
committed by GitHub
8 changed files with 200 additions and 1743 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 805 B

@@ -103,7 +103,10 @@ const Sidebar = ({ isOpen, closeSidebar }) => {
<i className="fa-brands fa-linkedin"></i>
</NavLink>
<NavLink to="https://www.twitter.com/opensignlabs" target="_blank">
<i className="fa-brands fa-square-x-twitter"></i>{" "}
<i className="fa-brands fa-square-x-twitter"></i>
</NavLink>
<NavLink to="https://discord.com/invite/xe9TDuyAyj" target="_blank">
<i className="fa-brands fa-discord"></i>
</NavLink>
</div>
</div>
+62
View File
@@ -0,0 +1,62 @@
[
{
"planName": "SELF HOSTED",
"currency": "",
"price": "Free",
"subtitle": "Free for life One click install.",
"btnText": "Visit github",
"url": "https://github.com/opensignlabs/opensign",
"benefits": [
"Sign Unlimited Documents",
"S3 Doc Storage",
"Unlimited Guest Signers",
"Unlimited completion certificates",
"Unique Code(OTP) verification for guest signers",
"Expiring docs & reject signature support",
"PDF Template Creation(coming soon)",
"Audit Trails",
"API support",
"Add-ons support(coming soon)",
"Self hosted cloud infrastructure",
"Free for lifetime",
"Community support"
]
},
{
"planName": "THANKS PLAN",
"currency": "$",
"price": "29.99",
"subtitle": "Get this for free if you have promo code in next step",
"btnText": "Subscribe",
"url": "https://subscriptions.zoho.in/subscribe/ef798486e6a0a11ea65f2bae8f2af901dbadf3175d495584fd25b9af5d2f2b9e/thanks",
"benefits": [
"Sign Unlimited Documents",
"Unlimited Secure Doc Storage with OpenSignDrive",
"Unlimited Guest Signers",
"Unlimited completion certificates",
"Unique Code(OTP) verification for guest signers",
"Expiring docs & reject signature support",
"PDF Template Creation(coming soon)",
"Audit Trails",
"API support",
"Add-ons support(coming soon)",
"Self hosted cloud infrastructure"
]
},
{
"planName": "ENTERPRISE",
"currency": "",
"price": "Request Price",
"subtitle": "Customization available Priority support.",
"btnText": "Contact us",
"url": "https://www.opensignlabs.com/contact-us",
"benefits": [
"All features",
"Custom domain",
"Whitelabeling",
"Uptime SLA",
"SSO support",
"24/7 support"
]
}
]
+1 -1
View File
@@ -175,7 +175,7 @@ const HomeLayout = ({ children }) => {
<div className="relative h-screen flex flex-col justify-between w-full overflow-y-auto">
<div className="bg-[#eef1f5] p-3">{children}</div>
<div>
<Footer footer="xap" />
<Footer />
</div>
</div>
</div>
+94 -632
View File
@@ -1,6 +1,16 @@
import React, { useState, useEffect } from "react";
import "../styles/plansubscription.css";
import { useNavigate } from "react-router";
import { NavLink } from "react-router-dom";
import checkmark from "../assets/images/checkmark.png";
import plansArr from '../json/plansArr.json'
const listItemStyle = {
paddingLeft: '20px', // Add padding to create space for the image
backgroundImage: `url(${checkmark})`, // Set your image as the list style image
backgroundPosition: 'left',
backgroundRepeat: 'no-repeat',
backgroundSize: '16px 16px', // Adjust the size of the image
};
const PlanSubscriptions = () => {
const navigate = useNavigate();
const [yearlyVisible, setYearlyVisible] = useState(false);
@@ -28,9 +38,9 @@ const PlanSubscriptions = () => {
// eslint-disable-next-line
}, []);
const toggleFrequency = () => {
setYearlyVisible(!yearlyVisible);
};
// const toggleFrequency = () => {
// setYearlyVisible(!yearlyVisible);
// };
return (
<>
@@ -54,6 +64,7 @@ const PlanSubscriptions = () => {
) : (
<div
style={{
backgroundColor: "white",
overflowY: "auto",
maxHeight: "600px",
"--theme-color": "#7952b3",
@@ -62,638 +73,89 @@ const PlanSubscriptions = () => {
>
<div
id="monthlyPlans"
style={{ display: yearlyVisible ? "none" : "block" }}
className={`${yearlyVisible ? "none" : "block my-2"}`}
>
<div id="app">
<div className="pricing-table-main">
<div className="">
<div className="pricing-table-frequency clearfix">
<ul
className="navs"
style={{
listStyle: "none",
display: "flex",
alignItems: "baseline"
}}
>
<li className="nav-item">
<button
className="nav-link frequency active"
name="1_months"
{/* <div className=" my-2 w-full flex justify-center">
<ul
className="navs"
style={{
listStyle: "none",
display: "flex",
alignItems: "baseline"
}}
>
<li className="nav-item">
<button className="nav-link frequency active" name="1_months">
Monthly
</button>
</li>
<li className="nav-item">
<button
className="nav-link frequency "
onClick={toggleFrequency}
name="1_years"
>
Yearly
</button>
</li>
</ul>
</div> */}
<div className="flex justify-center w-full my-2">
<ul className=" flex flex-col md:flex-row h-full bg-white justify-center border-collapse border-[1px] border-gray-300">
{plansArr.map((item) => (
<li
className="flex flex-col md:my-0 text-center border-[1px] border-gray-300 w-[260px]"
key={item.planName}
>
<div className="p-2 flex flex-col justify-center items-center">
<h3 className="text-[#002862] uppercase">
{item.planName}
</h3>
<div className="w-[150px] h-[150px]">
<img
className="icon-basic mx-auto"
src="https://js.zohostatic.com/books/zfwidgets/assets/images/plan.png"
alt="freeimg"
/>
</div>
<div className="">
<span className="text-3xl">
{item.currency && <small>{item.currency}</small>}
{item.price}
</span>
<div
className={`${
item.subtitle.length <= 32
? "w-[150px] text-center"
: ""
} text-sm text-center my-2`}
>
Monthly
</button>
</li>
<li className="nav-item">
<button
className="nav-link frequency "
onClick={toggleFrequency}
name="1_years"
<p>{item.subtitle}</p>
</div>
</div>
<div className="bg-[#002862] w-full text-white py-2 rounded">
<NavLink
to={item.url + details}
className="rounded uppercase hover:no-underline hover:text-white"
target="_self"
>
Yearly
</button>
</li>
{item.btnText}
</NavLink>
</div>
</div>
<hr className="w-full bg-gray-300 p-[.5px]" />
<ul className="mx-1 p-3 text-left break-words text-sm list-none">
{item.benefits.map((subitem, index) => (
<li style={listItemStyle} key={index} className="m-1">
<span style={{ position: "relative" }}>
{subitem}
</span>
</li>
))}
</ul>
</div>
</div>
<div className="pricing-table-body">
<div className="pricing-table popular">
<ul
// className="clearfix Elegant Pro"
className="plans-custom"
>
<li className="plan-item">
<div className="plan-block ">
<h3 id="plan-name">Free</h3>
<div className="pricing-img">
<img
className="icon-basic"
src="https://js.zohostatic.com/books/zfwidgets/assets/images/plan.png"
alt="freeimg"
/>
</div>
<div className="main-price">
<span className="price-figure">
<small></small>
<span className="basic-plan price-value">
<span
className="otherCurrency"
id="plan-amount"
>
{" "}
0{" "}
</span>
</span>
</span>
<span className="price-term">
<span>Billed Monthly </span>
</span>
<span className="goal">
<a
href={
"https://subscriptions.zoho.in/subscribe/3caf22e54c684d69f22ba6640f3961501c018beadbc1c771dbde1ccf1c7a189d/008" +
details
}
className="rounded"
target="_self"
>
Subscribe
</a>
</span>
</div>
<ul
id="price-features"
className="price-features"
style={{
borderTop: "1px solid rgb(237, 237, 237)",
paddingBottom: 7
}}
>
<li>
<p style={{ position: "relative" }}>
Sign upto 5 documents per month
</p>
</li>
<li>
<p style={{ position: "relative" }}>
5GB secure storage on OpenSignDrive
</p>
</li>
<li>
<p style={{ position: "relative" }}>
Import from Google Drive & Dropbox
</p>
</li>
</ul>
</div>
</li>
<li className="plan-item">
<div className="plan-block">
<h3 id="plan-name">PROFESSIONAL</h3>
<div className="pricing-img">
<img
className="icon-basic"
src="https://js.zohostatic.com/books/zfwidgets/assets/images/plan.png"
alt="professionalimg"
/>
</div>
<div className="main-price">
<span className="price-figure">
<small></small>
<span className="basic-plan price-value">
<span
className="otherCurrency"
id="plan-amount"
>
{" "}
999{" "}
</span>
</span>
</span>
<span className="price-term">
<span>Billed Monthly </span>
</span>
<span className="goal">
<a
href={
"https://subscriptions.zoho.in/subscribe/3caf22e54c684d69f22ba6640f3961501c018beadbc1c771dbde1ccf1c7a189d/004" +
details
}
className="rounded"
target="_self"
>
Subscribe
</a>
</span>
</div>
<ul
id="price-features"
className="price-features"
style={{
borderTop: "1px solid rgb(237, 237, 237)",
paddingBottom: 7
}}
>
<li>
<p style={{ position: "relative" }}>
Sign upto 50 documents per month
</p>
</li>
<li>
<p style={{ position: "relative" }}>
50GB secure storage on OpenSignDrive
</p>
</li>
<li>
<p style={{ position: "relative" }}>
Import from Google Drive & Dropbox
</p>
</li>
</ul>
</div>
</li>
<li className="plan-item">
<div className="plan-block ">
<h3 id="plan-name">PREMIUM</h3>
<div className="pricing-img">
<img
className="icon-basic"
src="https://js.zohostatic.com/books/zfwidgets/assets/images/plan.png"
alt="premiumimg"
/>
</div>
<div className="main-price">
<span className="price-figure">
<small></small>
<span className="basic-plan price-value">
<span
className="otherCurrency"
id="plan-amount"
>
{" "}
1999{" "}
</span>
</span>
</span>
<span className="price-term">
<span>Billed Monthly </span>
</span>
<span className="goal">
<a
href={
"https://subscriptions.zoho.in/subscribe/3caf22e54c684d69f22ba6640f3961501c018beadbc1c771dbde1ccf1c7a189d/003" +
details
}
className="rounded"
target="_self"
>
Subscribe
</a>
</span>
</div>
<ul
id="price-features"
className="price-features"
style={{
borderTop: "1px solid rgb(237, 237, 237)",
paddingBottom: 7
}}
>
<li>
<p style={{ position: "relative" }}>
Sign unlimited documents
</p>
</li>
<li>
<p style={{ position: "relative" }}>
Unlimited secure storage on OpenSignDrive
</p>
</li>
<li>
<p style={{ position: "relative" }}>
Import from Google Drive & Dropbox
</p>
</li>
</ul>
</div>
</li>
<li className="plan-item">
<div className="plan-block ">
<h3 id="plan-name">ELITE</h3>
<div className="pricing-img">
<img
className="icon-basic"
src="https://js.zohostatic.com/books/zfwidgets/assets/images/plan.png"
alt="eliteimg"
/>
</div>
<div className="main-price">
<span className="price-figure">
<small></small>
<span className="basic-plan price-value">
<span
className="otherCurrency"
id="plan-amount"
>
{" "}
3999{" "}
</span>
</span>
</span>
<span className="price-term">
<span>Billed Monthly </span>
</span>
<span className="goal">
<a
href={
"https://subscriptions.zoho.in/subscribe/3caf22e54c684d69f22ba6640f3961501c018beadbc1c771dbde1ccf1c7a189d/006" +
details
}
className="rounded"
target="_self"
>
Subscribe
</a>
</span>
</div>
<ul
id="price-features"
className="price-features"
style={{
borderTop: "1px solid rgb(237, 237, 237)",
paddingBottom: 7
}}
>
<li>
<p style={{ position: "relative" }}>
Sign upto 50 documents per month
</p>
</li>
<li>
<p style={{ position: "relative" }}>
Unlimited secure storage on OpenSignDrive
</p>
</li>
<li>
<p style={{ position: "relative" }}>
Import from Google Drive & Dropbox
</p>
</li>
<li>
<p style={{ position: "relative" }}>
Premium support included{" "}
</p>
</li>
<li>
<p style={{ position: "relative" }}>
SSO supported
</p>
</li>
</ul>
</div>
</li>
</ul>
</div>
</div>
</div>
</div>
</div>
<div
id="yearlyPlans"
style={{ display: yearlyVisible ? "block" : "none" }}
>
<div id="app">
<div className="pricing-table-main">
<div className="">
<div className="pricing-table-frequency clearfix">
<ul
className="navs"
style={{
listStyle: "none",
display: "flex",
alignItems: "baseline"
}}
>
<li className="nav-item">
<a
className="nav-link frequency "
onClick={toggleFrequency}
name="1_months"
>
Monthly
</a>
</li>
<li className="nav-item">
<a className="nav-link frequency active" name="1_years">
Yearly
</a>
</li>
</ul>
</div>
</div>
<div className="pricing-table-body">
<div className="pricing-table popular">
<ul
// className="clearfix Elegant Pro"
className="plans-custom"
>
<li className="plan-item">
<div className="plan-block ">
<h3 id="plan-name">Free</h3>
<div className="pricing-img">
<img
className="icon-basic"
src="https://js.zohostatic.com/books/zfwidgets/assets/images/plan.png"
alt="freeyimg"
/>
</div>
<div className="main-price">
<span className="price-figure">
<small></small>
<span className="basic-plan price-value">
<span
className="otherCurrency"
id="plan-amount"
>
{" "}
0{" "}
</span>
</span>
</span>
<span className="price-term">
<span>Billed Yearly </span>
</span>
<span className="goal">
<a
href={
"https://subscriptions.zoho.in/subscribe/ef798486e6a0a11ea65f2bae8f2af9019cd1d0c8dd2e4a1818972435fd62a5da/009" +
details
}
className="rounded"
target="_self"
>
Subscribe
</a>
</span>
</div>
<ul
id="price-features"
className="price-features"
style={{
borderTop: "1px solid rgb(237, 237, 237)",
paddingBottom: 7
}}
>
<li>
<p style={{ position: "relative" }}>
Sign upto 5 documents per month
</p>
</li>
<li>
<p style={{ position: "relative" }}>
5GB secure storage on OpenSignDrive
</p>
</li>
<li>
<p style={{ position: "relative" }}>
Import from Google Drive & Dropbox
</p>
</li>
</ul>
</div>
</li>
<li className="plan-item">
<div className="plan-block ">
<h3 id="plan-name">PROFESSIONAL</h3>
<div className="pricing-img">
<img
className="icon-basic"
src="https://js.zohostatic.com/books/zfwidgets/assets/images/plan.png"
alt="professionalyimg"
/>
</div>
<div className="main-price">
<span className="price-figure">
<small></small>
<span className="basic-plan price-value">
<span
className="otherCurrency"
id="plan-amount"
>
{" "}
5999{" "}
</span>
</span>
</span>
<span className="price-term">
<span>Billed Yearly </span>
</span>
<span className="goal">
<a
href={
"https://subscriptions.zoho.in/subscribe/3caf22e54c684d69f22ba6640f3961501c018beadbc1c771dbde1ccf1c7a189d/005" +
details
}
className="rounded"
target="_self"
>
Subscribe
</a>
</span>
</div>
<ul
id="price-features"
className="price-features"
style={{
borderTop: "1px solid rgb(237, 237, 237)",
paddingBottom: 7
}}
>
<li>
<p style={{ position: "relative" }}>
Sign upto 50 documents per month
</p>
</li>
<li>
<p style={{ position: "relative" }}>
50GB secure storage on OpenSignDrive
</p>
</li>
<li>
<p style={{ position: "relative" }}>
Import from Google Drive & Dropbox
</p>
</li>
</ul>
</div>
</li>
<li className="plan-item">
<div className="plan-block ">
<h3 id="plan-name">PREMIUM</h3>
<div className="pricing-img">
<img
className="icon-basic"
src="https://js.zohostatic.com/books/zfwidgets/assets/images/plan.png"
alt="premiumyimg"
/>
</div>
<div className="main-price">
<span className="price-figure">
<small></small>
<span className="basic-plan price-value">
<span
className="otherCurrency"
id="plan-amount"
>
{" "}
11999{" "}
</span>
</span>
</span>
<span className="price-term">
<span>Billed Yearly </span>
</span>
<span className="goal">
<a
href={
"https://subscriptions.zoho.in/subscribe/3caf22e54c684d69f22ba6640f3961501c018beadbc1c771dbde1ccf1c7a189d/002" +
details
}
className="rounded"
target="_self"
>
Subscribe
</a>
</span>
</div>
<ul
id="price-features"
className="price-features"
style={{
borderTop: "1px solid rgb(237, 237, 237)",
paddingBottom: 7
}}
>
<li>
<p style={{ position: "relative" }}>
Sign unlimited documents
</p>
</li>
<li>
<p style={{ position: "relative" }}>
Unlimited secure storage on OpenSignDrive
</p>
</li>
<li>
<p style={{ position: "relative" }}>
Import from Google Drive & Dropbox
</p>
</li>
</ul>
</div>
</li>
<li className="plan-item">
<div className="plan-block ">
<h3 id="plan-name">ELITE</h3>
<div className="pricing-img">
<img
className="icon-basic"
src="https://js.zohostatic.com/books/zfwidgets/assets/images/plan.png"
alt="eliteyimg"
/>
</div>
<div className="main-price">
<span className="price-figure">
<small></small>
<span className="basic-plan price-value">
<span
className="otherCurrency"
id="plan-amount"
>
{" "}
23999{" "}
</span>
</span>
</span>
<span className="price-term">
<span>Billed Yearly </span>
</span>
<span className="goal">
<a
href={
"https://subscriptions.zoho.in/subscribe/3caf22e54c684d69f22ba6640f3961501c018beadbc1c771dbde1ccf1c7a189d/007" +
details
}
className="rounded"
target="_self"
>
Subscribe
</a>
</span>
</div>
<ul
id="price-features"
className="price-features"
style={{
borderTop: "1px solid rgb(237, 237, 237)",
paddingBottom: 7
}}
>
<li>
<p style={{ position: "relative" }}>
Sign upto 50 documents per month
</p>
</li>
<li>
<p style={{ position: "relative" }}>
Unlimited secure storage on OpenSignDrive
</p>
</li>
<li>
<p style={{ position: "relative" }}>
Import from Google Drive & Dropbox
</p>
</li>
<li>
<p style={{ position: "relative" }}>
Premium support included{" "}
</p>
</li>
<li>
<p style={{ position: "relative" }}>
SSO supported
</p>
</li>
</ul>
</div>
</li>
</ul>
</div>
</div>
</div>
</li>
))}
</ul>
</div>
</div>
</div>
File diff suppressed because it is too large Load Diff
+39 -35
View File
@@ -32,14 +32,16 @@ const s3Options = {
},
};
// ApiPayloadConverter
// import { ApiPayloadConverter } from 'parse-server-api-mail-adapter';
const mailgun = new Mailgun(formData);
const mailgunClient = mailgun.client({
username: 'api',
key: process.env.MAILGUN_API_KEY,
});
const mailgunDomain = process.env.MAILGUN_DOMAIN;
let mailgunClient;
let mailgunDomain;
if (process.env.MAILGUN_API_KEY) {
const mailgun = new Mailgun(formData);
mailgunClient = mailgun.client({
username: 'api',
key: process.env.MAILGUN_API_KEY,
});
mailgunDomain = process.env.MAILGUN_DOMAIN;
}
export const config = {
databaseURI:
@@ -53,34 +55,36 @@ export const config = {
publicServerURL: process.env.SERVER_URL || 'http://localhost:8080/app',
// Your apps name. This will appear in the subject and body of the emails that are sent.
appName: 'Open Sign',
emailAdapter: {
module: 'parse-server-api-mail-adapter',
options: {
// The email address from which emails are sent.
sender: process.env.MAILGUN_SENDER,
// The email templates.
templates: {
// The template used by Parse Server to send an email for password
// reset; this is a reserved template name.
passwordResetEmail: {
subjectPath: './files/password_reset_email_subject.txt',
textPath: './files/password_reset_email.txt',
htmlPath: './files/password_reset_email.html',
emailAdapter: process.env.MAILGUN_API_KEY
? {
module: 'parse-server-api-mail-adapter',
options: {
// The email address from which emails are sent.
sender: process.env.MAILGUN_SENDER,
// The email templates.
templates: {
// The template used by Parse Server to send an email for password
// reset; this is a reserved template name.
passwordResetEmail: {
subjectPath: './files/password_reset_email_subject.txt',
textPath: './files/password_reset_email.txt',
htmlPath: './files/password_reset_email.html',
},
// The template used by Parse Server to send an email for email
// address verification; this is a reserved template name.
verificationEmail: {
subjectPath: './files/verification_email_subject.txt',
textPath: './files/verification_email.txt',
htmlPath: './files/verification_email.html',
},
},
apiCallback: async ({ payload, locale }) => {
const mailgunPayload = ApiPayloadConverter.mailgun(payload);
await mailgunClient.messages.create(mailgunDomain, mailgunPayload);
},
},
// The template used by Parse Server to send an email for email
// address verification; this is a reserved template name.
verificationEmail: {
subjectPath: './files/verification_email_subject.txt',
textPath: './files/verification_email.txt',
htmlPath: './files/verification_email.html',
},
},
apiCallback: async ({ payload, locale }) => {
const mailgunPayload = ApiPayloadConverter.mailgun(payload);
await mailgunClient.messages.create(mailgunDomain, mailgunPayload);
},
},
},
}
: null,
filesAdapter: new S3Adapter(s3Options),
auth: {
google: {