|
|
@@ -8,6 +8,18 @@ type GroupPlanProps = Pick<
|
|
|
'subscription' | 'plan' | 'remainingTrialDays' | 'featuresPageURL'
|
|
|
>
|
|
|
|
|
|
+function getFriendlyPlanName(planName: string): string {
|
|
|
+ if (planName.toLowerCase().includes('professional')) {
|
|
|
+ return 'Professional'
|
|
|
+ } else if (planName.toLowerCase().includes('collaborator')) {
|
|
|
+ return 'Standard'
|
|
|
+ }
|
|
|
+ // fallback on plan name
|
|
|
+ else {
|
|
|
+ return planName
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
function GroupPlan({
|
|
|
featuresPageURL,
|
|
|
subscription,
|
|
|
@@ -16,6 +28,7 @@ function GroupPlan({
|
|
|
}: GroupPlanProps) {
|
|
|
const { t } = useTranslation()
|
|
|
const planNameComponent = <strong translate="no" />
|
|
|
+ const friendlyPlanName = getFriendlyPlanName(plan.name)
|
|
|
const currentPlanLabel =
|
|
|
remainingTrialDays >= 0 ? (
|
|
|
remainingTrialDays === 1 ? (
|
|
|
@@ -43,10 +56,10 @@ function GroupPlan({
|
|
|
description={
|
|
|
subscription.teamName != null
|
|
|
? t('group_plan_with_name_tooltip', {
|
|
|
- plan: plan.name,
|
|
|
+ plan: friendlyPlanName,
|
|
|
groupName: subscription.teamName,
|
|
|
})
|
|
|
- : t('group_plan_tooltip', { plan: plan.name })
|
|
|
+ : t('group_plan_tooltip', { plan: friendlyPlanName })
|
|
|
}
|
|
|
id="group-plan"
|
|
|
overlayProps={{ placement: 'bottom' }}
|