Merge branch 'master' into add-string-templates-tests
This commit is contained in:
commit
b483dfa651
|
@ -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`
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue