Merge pull request #33775 from overleaf/oa-remove-addon-section

[web] Remove Add-ons section

GitOrigin-RevId: 82009dd6aeb3588f46cabacdb7313c01f3afc27e
This commit is contained in:
Olzhas Askar
2026-05-21 11:59:06 +02:00
committed by Copybot
parent 9d79cc89ec
commit 793d5c79fb
6 changed files with 25 additions and 29 deletions
@@ -2420,7 +2420,6 @@
"you_cant_add_or_change_password_due_to_sso": "",
"you_cant_join_this_group_subscription": "",
"you_currently_have_x_linked_with_your_overleaf_account": "",
"you_dont_have_any_add_ons_on_your_account": "",
"you_dont_have_any_repositories": "",
"you_have_1_license_and_your_plan_supports_up_to_y": "",
"you_have_added_x_of_group_size_y": "",
@@ -283,7 +283,6 @@ export function ActiveSubscription({
cancelPauseReq={cancelPauseReq}
/>
)}
<hr />
<AddOns
subscription={subscription}
onStandalonePlan={onStandalonePlan}
@@ -163,32 +163,32 @@ function AddOns({
const hasAddons =
(addOnsToDisplay && addOnsToDisplay.length > 0) || hasAiAssistViaWritefull
if (!hasAddons) {
return null
}
return (
<>
<hr />
<h2 className="h3 fw-bold">{t('add_ons')}</h2>
{hasAddons ? (
<>
{addOnsToDisplay?.map(addOn => (
<AddOn
addOnCode={addOn.addOnCode}
key={addOn.addOnCode}
isAnnual={Boolean(subscription.plan.annual)}
handleCancelClick={handleCancelClick}
pendingCancellation={
subscription.pendingPlan !== undefined &&
(subscription.pendingPlan.addOns ?? []).every(
pendingAddOn => pendingAddOn.code !== addOn.addOnCode
)
}
displayPrice={addOnsDisplayPrices[addOn.addOnCode]}
nextBillingDate={subscription.payment.nextPaymentDueDate}
/>
))}
{hasAiAssistViaWritefull && <WritefullManagedBundleAddOn />}
</>
) : (
<p>{t('you_dont_have_any_add_ons_on_your_account')}</p>
)}
{addOnsToDisplay?.map(addOn => (
<AddOn
addOnCode={addOn.addOnCode}
key={addOn.addOnCode}
isAnnual={Boolean(subscription.plan.annual)}
handleCancelClick={handleCancelClick}
pendingCancellation={
subscription.pendingPlan !== undefined &&
(subscription.pendingPlan.addOns ?? []).every(
pendingAddOn => pendingAddOn.code !== addOn.addOnCode
)
}
displayPrice={addOnsDisplayPrices[addOn.addOnCode]}
nextBillingDate={subscription.payment.nextPaymentDueDate}
/>
))}
{hasAiAssistViaWritefull && <WritefullManagedBundleAddOn />}
</>
)
}
-1
View File
@@ -3083,7 +3083,6 @@
"you_cant_join_this_group_subscription": "You cant join this group subscription",
"you_cant_reset_password_due_to_sso": "You cant reset your password because your group or organization uses SSO. <0>Log in with SSO</0>.",
"you_currently_have_x_linked_with_your_overleaf_account": "You currently have <0>__managers__</0> linked with your __appName__ account.",
"you_dont_have_any_add_ons_on_your_account": "You dont have any add-ons on your account.",
"you_dont_have_any_repositories": "You dont have any repositories",
"you_have_1_license_and_your_plan_supports_up_to_y": "You have allocated 1 license and your plan supports up to __groupSize__.",
"you_have_added_x_of_group_size_y": "You have added <0>__addedUsersSize__</0> of <1>__groupSize__</1> available members",
-1
View File
@@ -2449,7 +2449,6 @@
"you_cant_add_or_change_password_due_to_sso": "您无法添加或更改密码,因为您的群组或组织使用<0>单点登录 (SSO)</0>。",
"you_cant_join_this_group_subscription": "您无法加入此团队订阅",
"you_cant_reset_password_due_to_sso": "您无法重置密码,因为您的群组或组织使用 SSO。 <0>使用单点登录登录</0>。",
"you_dont_have_any_add_ons_on_your_account": "您的帐户中没有任何附加组件。",
"you_dont_have_any_repositories": "您没有任何仓库",
"you_have_1_license_and_your_plan_supports_up_to_y": "您有 1 个许可证并且您的计划最多支持 __groupSize__。",
"you_have_added_x_of_group_size_y": "您已经添加 <0>__addedUsersSize__</0> / <1>__groupSize__</1> 个可用成员。",
@@ -224,9 +224,9 @@ describe('<ActiveSubscription />', function () {
screen.getByText('AI Assist')
})
it('shows empty add-ons message if none present', function () {
it('hides the add-ons section when none are present', function () {
renderActiveSubscription(annualActiveSubscription)
screen.getByText(/You dont have any add-ons on your account/i)
expect(screen.queryByRole('heading', { name: 'Add-ons' })).to.be.null
})
it('shows multiple active coupons', function () {