Modified planTitle function to accommodate old plans (#12854)
* Modified planTitle function to accommodate old plans * Fixed liniting issues.
This commit is contained in:
parent
f6b229e7eb
commit
3ea8bfda91
|
@ -1,11 +1,27 @@
|
||||||
import { PlanType } from "@budibase/types"
|
import { PlanType } from "@budibase/types"
|
||||||
|
|
||||||
export function getFormattedPlanName(userPlanType) {
|
export function getFormattedPlanName(userPlanType) {
|
||||||
let planName = "Free"
|
let planName
|
||||||
if (userPlanType === PlanType.PREMIUM_PLUS) {
|
switch (userPlanType) {
|
||||||
planName = "Premium"
|
case PlanType.PRO:
|
||||||
} else if (userPlanType === PlanType.ENTERPRISE_BASIC) {
|
planName = "Pro"
|
||||||
planName = "Enterprise"
|
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`
|
return `${planName} Plan`
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue