diff --git a/packages/builder/src/helpers/planTitle.js b/packages/builder/src/helpers/planTitle.js index dc07e8be2f..098bfb4529 100644 --- a/packages/builder/src/helpers/planTitle.js +++ b/packages/builder/src/helpers/planTitle.js @@ -1,11 +1,27 @@ import { PlanType } from "@budibase/types" export function getFormattedPlanName(userPlanType) { - let planName = "Free" - if (userPlanType === PlanType.PREMIUM_PLUS) { - planName = "Premium" - } else if (userPlanType === PlanType.ENTERPRISE_BASIC) { - planName = "Enterprise" + let planName + switch (userPlanType) { + case PlanType.PRO: + planName = "Pro" + break + case PlanType.TEAM: + planName = "Team" + break + case PlanType.PREMIUM: + case PlanType.PREMIUM_PLUS: + planName = "Premium" + break + case PlanType.BUSINESS: + planName = "Business" + break + case PlanType.ENTERPRISE_BASIC: + case PlanType.ENTERPRISE: + planName = "Enterprise" + break + default: + planName = "Free" // Default to "Free" if the type is not explicitly handled } return `${planName} Plan` }