diff --git a/src/app/dashboard/(admin)/admin/(settings)/settings/payment-information/page.tsx b/src/app/dashboard/(admin)/admin/(settings)/settings/payment-information/page.tsx
index fa909b5d2..b50191203 100644
--- a/src/app/dashboard/(admin)/admin/(settings)/settings/payment-information/page.tsx
+++ b/src/app/dashboard/(admin)/admin/(settings)/settings/payment-information/page.tsx
@@ -1,6 +1,59 @@
import Link from "next/link";
import { Button } from "~/components/ui/button";
+import { cn } from "~/lib/utils";
+
+const paymentPlans = [
+ {
+ name: "Free",
+ price: 0,
+ text: "The essential to provide your best work for clients.",
+ features: ["10 Projects", "Up to 10 subscribers", "Advanced analytics"],
+ buttonText: "Current Plan",
+ link: "/dashboard/admin/settings/payment-information",
+ },
+ {
+ name: "Basic",
+ price: 20,
+ text: "Ideal for growing needs who want more features.",
+ features: [
+ "100 Projects",
+ "Up to 50 subscribers",
+ "Advanced analytics",
+ "24-hour support",
+ ],
+ buttonText: "Upgrade",
+ link: "/dashboard/admin/settings/payment-information/upgrade/basic",
+ },
+ {
+ name: "Advanced",
+ price: 50,
+ text: "Designed for power users and maximum functionalities.",
+ features: [
+ "200 Projects",
+ "Up to 100 subscribers",
+ "Advanced analytics",
+ "24-hour support",
+ "Marketing advisor",
+ ],
+ buttonText: "Upgrade",
+ link: "/dashboard/admin/settings/payment-information/upgrade/advanced",
+ },
+ {
+ name: "Premium",
+ price: 100,
+ text: "Perfect for users who want more features.",
+ features: [
+ "300 Projects",
+ "Up to 500 subscribers",
+ "Advanced analytics",
+ "24-hour support",
+ "Marketing advisor",
+ ],
+ buttonText: "Upgrade",
+ link: "/dashboard/admin/settings/payment-information/upgrade/premium",
+ },
+];
const PaymentInformation = () => {
return (
@@ -17,132 +70,53 @@ const PaymentInformation = () => {
$0/month
-
+
Subscribe to your desired plan
-
-
-
Free
-
- {" "}
- $0{" "}
- /month{" "}
-
-
- The essential to provide your best work for clients.
-
-
- -
- 10 Projects{" "}
-
- -
- Up to 10 subscribers{" "}
-
- -
- Advanced analytics{" "}
-
-
-
-
-
-
Basic
-
- {" "}
- $20{" "}
- /month{" "}
-
-
- Ideal for growing needs who want more features.
-
-
- -
- 100 Projects{" "}
-
- -
- Up to 50 subscribers{" "}
-
- -
- Advanced analytics{" "}
-
- -
- 24-hour support{" "}
-
-
-
-
-
-
-
-
Advanced
-
- {" "}
- $50{" "}
- /month{" "}
-
-
- Designed for power users and maximum functionalities.
-
-
- -
- 200 Projects{" "}
-
- -
- Up to 100 subscribers{" "}
-
- -
- Advanced analytics{" "}
-
- -
- 24-hour support{" "}
-
- -
- Marketing advisor{" "}
-
-
-
-
-
-
-
-
Premium
-
- {" "}
- $100{" "}
- /month{" "}
-
-
- Perfect for users who want more features.
-
-
- -
- 300 Projects{" "}
-
- -
- Up to 500 subscribers{" "}
-
- -
- Advanced analytics{" "}
-
- -
- 24-hour support{" "}
-
- -
- Marketing advisor{" "}
-
-
-
-
@@ -150,7 +124,7 @@ const PaymentInformation = () => {
-
+
-
10 Projects{" "}
diff --git a/src/app/dashboard/(admin)/admin/(settings)/settings/payment-information/upgrade/[plan]/page.tsx b/src/app/dashboard/(admin)/admin/(settings)/settings/payment-information/upgrade/[plan]/page.tsx
new file mode 100644
index 000000000..e10de8a5d
--- /dev/null
+++ b/src/app/dashboard/(admin)/admin/(settings)/settings/payment-information/upgrade/[plan]/page.tsx
@@ -0,0 +1,232 @@
+"use client";
+
+import { ArrowLeft, ChevronDown, ChevronUp } from "lucide-react";
+import Image from "next/image";
+import Link from "next/link";
+import { useRouter } from "next/navigation";
+import { useState } from "react";
+
+import CustomButton from "~/components/common/common-button/common-button";
+import CustomInput from "~/components/common/input/input";
+import PlanUpgradeSuccessfulModal from "~/components/common/modals/plan-upgrade-successful";
+
+const billingOption = [
+ {
+ name: "Pay monthly",
+ description: "$20/ month/member",
+ },
+ {
+ name: "Pay yearly",
+ description: "$200/ year/member",
+ },
+];
+
+const paymentMethod = [
+ {
+ name: "Credit Card",
+ icon: "/user-dashboard/svg/credit-card.svg",
+ width: 64,
+ },
+ {
+ name: "Stripe Payment",
+ icon: "/user-dashboard/svg/stripe-logo.svg",
+ width: 84,
+ },
+ {
+ name: "Paypal Payment",
+ icon: "/user-dashboard/svg/paypal-logo.svg",
+ width: 153,
+ },
+];
+
+const Checkout = ({ params }: { params: { plan: string } }) => {
+ const [open, setOpen] = useState(false);
+ const router = useRouter();
+
+ const [isDetailsVisible, setIsDetailsVisible] = useState(false);
+
+ const toggleDetails = () => {
+ setIsDetailsVisible(!isDetailsVisible);
+ };
+
+ return (
+
+
+
+
+ router.back()} title="Back">
+
+
+
+ Upgrade to {params.plan}
+
+
+
+ Do more with unlimited users and integration when you upgrade
+
+
+
+
+
+
+
+
+
+
+
+
+ {billingOption.map((item, index) => (
+ -
+
+
+ ))}
+
+
+
+
+ $20 /month
+ : }
+ isRightIconVisible={true}
+ size="sm"
+ onClick={toggleDetails}
+ >
+ Details
+
+
+
+ {isDetailsVisible && (
+
+
+ Members in your workspace
+ 1
+
+
+ x$20/month/member
+ $20
+
+
+
+ Subtotal
+ $20
+
+
+ Tax if applicable
+ $20
+
+
+ )}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
setOpen(true)}
+ >
+ Proceed to Payment
+
+
+
+ setOpen(!open)} show={open} />
+
+ );
+};
+
+export default Checkout;
diff --git a/src/app/dashboard/(admin)/admin/(settings)/settings/payment-information/upgrade/page.tsx b/src/app/dashboard/(admin)/admin/(settings)/settings/payment-information/upgrade/page.tsx
index 35ea600b4..caf3555f6 100644
--- a/src/app/dashboard/(admin)/admin/(settings)/settings/payment-information/upgrade/page.tsx
+++ b/src/app/dashboard/(admin)/admin/(settings)/settings/payment-information/upgrade/page.tsx
@@ -1,232 +1,18 @@
"use client";
-import { ArrowLeft, ChevronDown, ChevronUp } from "lucide-react";
-import Image from "next/image";
-import Link from "next/link";
import { useRouter } from "next/navigation";
-import { useState } from "react";
+import { useEffect } from "react";
-import CustomButton from "~/components/common/common-button/common-button";
-import CustomInput from "~/components/common/input/input";
-import PlanUpgradeSuccessfulModal from "~/components/common/modals/plan-upgrade-successful";
-
-const billingOption = [
- {
- name: "Pay monthly",
- description: "$20/ month/member",
- },
- {
- name: "Pay yearly",
- description: "$200/ year/member",
- },
-];
-
-const paymentMethod = [
- {
- name: "Credit Card",
- icon: "/user-dashboard/svg/credit-card.svg",
- width: 64,
- },
- {
- name: "Stripe Payment",
- icon: "/user-dashboard/svg/stripe-logo.svg",
- width: 84,
- },
- {
- name: "Paypal Payment",
- icon: "/user-dashboard/svg/paypal-logo.svg",
- width: 153,
- },
-];
-
-const Checkout = () => {
- const [open, setOpen] = useState(false);
+const UpgradePage = () => {
const router = useRouter();
- const [isDetailsVisible, setIsDetailsVisible] = useState(false);
-
- const toggleDetails = () => {
- setIsDetailsVisible(!isDetailsVisible);
- };
-
- return (
-
-
-
-
- router.back()} title="Back">
-
-
-
- Upgrade to Basic
-
-
-
- Do more with unlimited users and Integration when you upgrade
-
-
-
-
-
-
-
-
-
-
-
-
- {billingOption.map((item, index) => (
- -
-
-
- ))}
-
-
-
-
- $20 /month
- : }
- isRightIconVisible={true}
- size="sm"
- onClick={toggleDetails}
- >
- Details
-
-
-
- {isDetailsVisible && (
-
-
- Members in your workspace
- 1
-
-
- x$20/month/member
- $20
-
-
-
- Subtotal
- $20
-
-
- Tax if applicable
- $20
-
-
- )}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
setOpen(true)}
- >
- Proceed to Payment
-
-
+ useEffect(() => {
+ router.replace(
+ "/dashboard/admin/settings/payment-information/upgrade/basic",
+ );
+ }, [router]);
- setOpen(!open)} show={open} />
-
- );
+ return;
};
-export default Checkout;
+export default UpgradePage;