From 9a16780d9fa7111fdfb64848e8bb6b90b3b5b8c9 Mon Sep 17 00:00:00 2001 From: Philipinho <16838612+Philipinho@users.noreply.github.com> Date: Tue, 24 Jun 2025 04:42:09 -0700 Subject: [PATCH] custom tier --- .../ee/billing/components/billing-plans.tsx | 18 ++++++++++-------- .../src/ee/billing/types/billing.types.ts | 5 +++-- apps/server/src/ee | 2 +- 3 files changed, 14 insertions(+), 11 deletions(-) diff --git a/apps/client/src/ee/billing/components/billing-plans.tsx b/apps/client/src/ee/billing/components/billing-plans.tsx index 37cda36c..5a287bba 100644 --- a/apps/client/src/ee/billing/components/billing-plans.tsx +++ b/apps/client/src/ee/billing/components/billing-plans.tsx @@ -52,14 +52,16 @@ export default function BillingPlans() { return null; } - const selectData = firstPlan.pricingTiers.map((tier, index) => { - const prevMaxUsers = - index > 0 ? firstPlan.pricingTiers[index - 1].upTo : 0; - return { - value: tier.upTo.toString(), - label: `${prevMaxUsers + 1}-${tier.upTo} users`, - }; - }); + const selectData = firstPlan.pricingTiers + .filter((tier) => !tier.custom) + .map((tier, index) => { + const prevMaxUsers = + index > 0 ? firstPlan.pricingTiers[index - 1].upTo : 0; + return { + value: tier.upTo.toString(), + label: `${prevMaxUsers + 1}-${tier.upTo} users`, + }; + }); return ( diff --git a/apps/client/src/ee/billing/types/billing.types.ts b/apps/client/src/ee/billing/types/billing.types.ts index d0796e0f..dfa1a60b 100644 --- a/apps/client/src/ee/billing/types/billing.types.ts +++ b/apps/client/src/ee/billing/types/billing.types.ts @@ -58,6 +58,7 @@ export interface IBillingPlan { interface PricingTier { upTo: number; - monthly: number; - yearly: number; + monthly?: number; + yearly?: number; + custom?: boolean; } \ No newline at end of file diff --git a/apps/server/src/ee b/apps/server/src/ee index f32a3ed3..ad7a4bcf 160000 --- a/apps/server/src/ee +++ b/apps/server/src/ee @@ -1 +1 @@ -Subproject commit f32a3ed37285a02edd8a24fc5e078d5e6518bf6e +Subproject commit ad7a4bcf5703a91e25357a435a7dcfa42486798a