diff --git a/src/lib/components/billing/planSelection.svelte b/src/lib/components/billing/planSelection.svelte index 6c2103187..2dea57521 100644 --- a/src/lib/components/billing/planSelection.svelte +++ b/src/lib/components/billing/planSelection.svelte @@ -22,12 +22,9 @@ + title={tierFree.name}> {#if $organization?.billingPlan === BillingPlan.FREE && !isNewOrg} diff --git a/src/routes/(console)/organization-[organization]/change-plan/+page.svelte b/src/routes/(console)/organization-[organization]/change-plan/+page.svelte index e0bc8eb0c..fe97896b1 100644 --- a/src/routes/(console)/organization-[organization]/change-plan/+page.svelte +++ b/src/routes/(console)/organization-[organization]/change-plan/+page.svelte @@ -264,7 +264,9 @@ $: isUpgrade = $plansInfo.get(selectedPlan).order > $currentPlan?.order; $: isDowngrade = $plansInfo.get(selectedPlan).order < $currentPlan?.order; - $: isButtonDisabled = $organization?.billingPlan === selectedPlan; + $: isButtonDisabled = + $organization?.billingPlan === selectedPlan || + (isDowngrade && selectedPlan === BillingPlan.FREE && data.hasFreeOrgs); @@ -297,8 +299,21 @@ selfService={data.selfService} anyOrgFree={data.hasFreeOrgs} /> + {#if isDowngrade && selectedPlan === BillingPlan.FREE && data.hasFreeOrgs} + + To downgrade this organization, first migrate or delete one of your + existing paid organizations. + + + {/if} + {#if isDowngrade} - {#if selectedPlan === BillingPlan.FREE} + {#if selectedPlan === BillingPlan.FREE && !data.hasFreeOrgs} {:else if selectedPlan === BillingPlan.PRO && data.organization.billingPlan === BillingPlan.SCALE && collaborators?.length > 0} {@const extraMembers = collaborators?.length ?? 0} @@ -364,7 +379,7 @@ id="members" /> {/if} - {#if isDowngrade && selectedPlan === BillingPlan.FREE} + {#if isDowngrade && selectedPlan === BillingPlan.FREE && !data.hasFreeOrgs}
{:else if data.organization.billingPlan !== BillingPlan.CUSTOM} - + {/if}