From a0cc8e2f3ff0f57358ae6d23bd143083092569ab Mon Sep 17 00:00:00 2001 From: iamsivin Date: Fri, 31 Oct 2025 18:03:45 +0530 Subject: [PATCH] chore: Update the Pricing plan section --- .../components-next/notice/Notice.vue | 58 ++ .../dashboard/i18n/locale/en/settings.json | 25 +- .../components/CancelSubscriptionDialog.vue | 24 +- .../billing-v2/components/CreditGrants.vue | 7 +- .../billing-v2/components/PlanSummary.vue | 223 +++++++ .../billing-v2/components/PlansGrid.vue | 134 ++++ .../billing-v2/components/PricingPlans.vue | 574 +++++------------- .../billing-v2/components/SubscribeDialog.vue | 184 ++++++ .../billing-v2/components/SubscribeModal.vue | 174 ------ .../billing/components/BillingHeader.vue | 4 +- 10 files changed, 785 insertions(+), 622 deletions(-) create mode 100644 app/javascript/dashboard/components-next/notice/Notice.vue create mode 100644 app/javascript/dashboard/routes/dashboard/settings/billing-v2/components/PlanSummary.vue create mode 100644 app/javascript/dashboard/routes/dashboard/settings/billing-v2/components/PlansGrid.vue create mode 100644 app/javascript/dashboard/routes/dashboard/settings/billing-v2/components/SubscribeDialog.vue delete mode 100644 app/javascript/dashboard/routes/dashboard/settings/billing-v2/components/SubscribeModal.vue diff --git a/app/javascript/dashboard/components-next/notice/Notice.vue b/app/javascript/dashboard/components-next/notice/Notice.vue new file mode 100644 index 000000000..d052be9e9 --- /dev/null +++ b/app/javascript/dashboard/components-next/notice/Notice.vue @@ -0,0 +1,58 @@ + + + diff --git a/app/javascript/dashboard/i18n/locale/en/settings.json b/app/javascript/dashboard/i18n/locale/en/settings.json index 8cdf43b7c..4752a6fb4 100644 --- a/app/javascript/dashboard/i18n/locale/en/settings.json +++ b/app/javascript/dashboard/i18n/locale/en/settings.json @@ -417,6 +417,16 @@ "LEDGER_TITLE": "Recent Transactions", "NO_TRANSACTIONS": "No transactions yet. Start by topping up or subscribing to a plan." }, + "PLAN_SUMMARY": { + "TITLE": "Plan Summary", + "PRICE_PER_MONTH": "Price/month", + "RENEWAL_DATE": "Renewal Date", + "CREDITS_INCLUDED": "Credits included/month", + "NUMBER_OF_SEATS": "Number of Seats", + "ADJUST_SEATS_HINT": "Adjust seats to scale your plan", + "VIEW_ALL_PLANS": "View All Plans", + "CANCEL_PLAN": "Cancel Plan" + }, "PRICING_PLANS": { "TITLE": "Pricing Plans", "DESCRIPTION": "Choose a plan that fits your team. All plans include credits that reset monthly.", @@ -426,14 +436,15 @@ "MONTH": "month", "SEATS": "seats", "CREDITS_PER_SEAT": "credits/month", - "CREDITS_INCLUDED": "credits included/month", - "PER_CREDIT_OVERAGE": "per additional credit", "MIN_SEATS": "Minimum seats", "SUBSCRIBE": "Subscribe", "SWITCH_PLAN": "Switch Plan", - "CURRENT_PLAN": "Current Plan", - "CANCEL_SUBSCRIPTION": "Cancel Subscription", "BLOCKED": "Blocked", + "PENDING_TITLE": "Pending Changes Scheduled", + "PENDING_MESSAGE": "Your subscription changes will take effect on your next billing date.", + "NEXT_PLAN": "Next Plan", + "NEXT_QUANTITY": "Next Quantity", + "EFFECTIVE_DATE": "Effective Date", "CANCELLING_TITLE": "Subscription Ending", "CANCELLING_MESSAGE": "Your subscription will be cancelled at the end of the current billing period. You can continue using your current plan until then.", "CANCELLING_BLOCKED_INFO": "You cannot change plans or subscribe to new plans while your subscription is ending.", @@ -441,8 +452,6 @@ "NO_PLANS": "No pricing plans available.", "SUBSCRIBE_SUCCESS": "Successfully subscribed to the plan! Your credits have been updated.", "CANCEL_SUCCESS": "Subscription cancelled successfully.", - "MANAGE_SEATS": "Adjust Seats", - "UPDATE": "Update", "UPDATE_QUANTITY_SUCCESS": "Subscription quantity updated successfully!", "CHANGE_PLAN_SUCCESS": "Successfully changed to the new plan! Your credits have been updated." }, @@ -460,7 +469,7 @@ "CREDIT_GRANTS": { "TITLE": "Credit History", "DESCRIPTION": "View all your credit grants including topups and monthly credits.", - "CREDITS": "{credits} credits", + "CREDITS": "credits", "EXPIRES": "Expires", "NO_EXPIRY": "Never expires", "ADDED": "Added on {date}", @@ -474,6 +483,8 @@ "NUMBER_OF_SEATS": "Number of seats", "MIN": "Min", "MAX": "Max", + "PER_SEAT": "per seat", + "TOTAL": "total", "BASE_PRICE": "Base price per seat", "INCLUDED_CREDITS": "Included credits", "CREDITS": "credits", diff --git a/app/javascript/dashboard/routes/dashboard/settings/billing-v2/components/CancelSubscriptionDialog.vue b/app/javascript/dashboard/routes/dashboard/settings/billing-v2/components/CancelSubscriptionDialog.vue index c713924fe..b712f0979 100644 --- a/app/javascript/dashboard/routes/dashboard/settings/billing-v2/components/CancelSubscriptionDialog.vue +++ b/app/javascript/dashboard/routes/dashboard/settings/billing-v2/components/CancelSubscriptionDialog.vue @@ -1,9 +1,10 @@ + + diff --git a/app/javascript/dashboard/routes/dashboard/settings/billing-v2/components/PlansGrid.vue b/app/javascript/dashboard/routes/dashboard/settings/billing-v2/components/PlansGrid.vue new file mode 100644 index 000000000..9de9c8c51 --- /dev/null +++ b/app/javascript/dashboard/routes/dashboard/settings/billing-v2/components/PlansGrid.vue @@ -0,0 +1,134 @@ + + + diff --git a/app/javascript/dashboard/routes/dashboard/settings/billing-v2/components/PricingPlans.vue b/app/javascript/dashboard/routes/dashboard/settings/billing-v2/components/PricingPlans.vue index eab172dcb..d9f335298 100644 --- a/app/javascript/dashboard/routes/dashboard/settings/billing-v2/components/PricingPlans.vue +++ b/app/javascript/dashboard/routes/dashboard/settings/billing-v2/components/PricingPlans.vue @@ -1,11 +1,15 @@