Skip to content

The open alternative to Salesforce, designed for AI.

New onboarding plan (#17776)

BOHEUS171efe2a1943
diff --git a/packages/twenty-front/src/pages/onboarding/internal/ChooseYourPlanContent.tsx b/packages/twenty-front/src/pages/onboarding/internal/ChooseYourPlanContent.tsx
index eaa32a6eb21..89e20d8959e 100644
--- a/packages/twenty-front/src/pages/onboarding/internal/ChooseYourPlanContent.tsx
+++ b/packages/twenty-front/src/pages/onboarding/internal/ChooseYourPlanContent.tsx
@@ -17,11 +17,7 @@ import { AppPath } from 'twenty-shared/types';
import { isDefined } from 'twenty-shared/utils';
import { Loader } from 'twenty-ui/feedback';
import { CardPicker, MainButton } from 'twenty-ui/input';
-import {
- CAL_LINK,
- ClickToActionLink,
- TWENTY_PRICING_LINK,
-} from 'twenty-ui/navigation';
+import { CAL_LINK, ClickToActionLink } from 'twenty-ui/navigation';
import { BillingPlanKey, type Billing } from '~/generated-metadata/graphql';
const StyledSubscriptionContainer = styled.div<{
@@ -184,6 +180,14 @@ export const ChooseYourPlanContent = ({ billing }: { billing: Billing }) => {
};
};
+ const planChangeLink = (plan: BillingPlanKey) => {
+ const interval = billingCheckoutSession.interval;
+ const requirePaymentMethod = billingCheckoutSession.requirePaymentMethod;
+ return AppPath.PlanRequired.concat(
+ `?billingCheckoutSession={%22plan%22:%22${plan}%22,%22interval%22:%22${interval}%22,%22requirePaymentMethod%22:${requirePaymentMethod}}`,
+ );
+ };
+
const { signOut } = useAuth();
const withCreditCardTrialPeriodDuration = withCreditCardTrialPeriod?.duration;
@@ -259,10 +263,6 @@ export const ChooseYourPlanContent = ({ billing }: { billing: Billing }) => {
<Trans>Log out</Trans>
</ClickToActionLink>
<span />
- <ClickToActionLink href={TWENTY_PRICING_LINK}>
- <Trans>Change Plan</Trans>
- </ClickToActionLink>
- <span />
<ClickToActionLink
href={calendarBookingPageId ? AppPath.BookCall : CAL_LINK}
target={calendarBookingPageId ? '_self' : '_blank'}
@@ -270,6 +270,16 @@ export const ChooseYourPlanContent = ({ billing }: { billing: Billing }) => {
>
<Trans>Book a Call</Trans>
</ClickToActionLink>
+ <span />
+ {currentPlanKey === BillingPlanKey.PRO ? (
+ <ClickToActionLink href={planChangeLink(BillingPlanKey.ENTERPRISE)}>
+ <Trans>Organization plan</Trans>
+ </ClickToActionLink>
+ ) : (
+ <ClickToActionLink href={planChangeLink(BillingPlanKey.PRO)}>
+ <Trans>Pro plan</Trans>
+ </ClickToActionLink>
+ )}
</StyledLinkGroup>
</>
);