From 3851ee4eb2390abb0720834a816283633f958095 Mon Sep 17 00:00:00 2001 From: Davinder Singh Date: Thu, 27 Feb 2025 10:16:11 +0000 Subject: [PATCH] Plans Group Size - Removing the 50 size (#23851) * removing the group size 50 * removing the if condition for 20/50 groups * running make cleanup_unused_locales * removing instances of sizesForHighDenominationCurrencies and the related if conditions * removing the price related to group size of 50 in different currencies * fixing the test * changing the 50 to 20 under faqs * changing the remaining 50 to 20 * cleaning of variables * removing extra variable GitOrigin-RevId: 68f5d7df1eab29360e9c806ad844f1c900341c19 --- .../Subscription/SubscriptionController.js | 3 --- .../subscriptions/plans/_plans_faq_tabs.pug | 8 +++--- .../modals/change-to-group-modal.tsx | 10 ++----- services/web/locales/en.json | 1 - .../active/change-plan/change-plan.test.tsx | 2 +- .../features/subscription/fixtures/plans.ts | 27 +------------------ .../SubscriptionControllerTests.js | 1 - .../subscription/dashboard/group-plans.ts | 1 - 8 files changed, 8 insertions(+), 45 deletions(-) diff --git a/services/web/app/src/Features/Subscription/SubscriptionController.js b/services/web/app/src/Features/Subscription/SubscriptionController.js index 5efe2a0ed2..2bac343698 100644 --- a/services/web/app/src/Features/Subscription/SubscriptionController.js +++ b/services/web/app/src/Features/Subscription/SubscriptionController.js @@ -38,9 +38,6 @@ function formatGroupPlansDataForDash() { return { plans: [...groupPlanModalOptions.plan_codes], sizes: [...groupPlanModalOptions.sizes], - sizesForHighDenominationCurrencies: [ - ...groupPlanModalOptions.sizesForHighDenominationCurrencies, - ], usages: [...groupPlanModalOptions.usages], priceByUsageTypeAndSize: JSON.parse(JSON.stringify(GroupPlansData)), } diff --git a/services/web/app/views/subscriptions/plans/_plans_faq_tabs.pug b/services/web/app/views/subscriptions/plans/_plans_faq_tabs.pug index bfabd09b14..dcbfbb1901 100644 --- a/services/web/app/views/subscriptions/plans/_plans_faq_tabs.pug +++ b/services/web/app/views/subscriptions/plans/_plans_faq_tabs.pug @@ -146,7 +146,7 @@ mixin overleafGroupPlans() i.material-symbols.material-symbols-outlined(aria-hidden="true") keyboard_arrow_down .collapse(id="overleafGroupPlansQ2") .custom-accordion-body - | Our Group subscriptions allow you to purchase access to our premium features for multiple people. They’re easy to manage, help save on paperwork, and allow groups of 5 or more to purchase via purchase order (PO). We also offer discounts on purchases of Group subscriptions for more than 50 users; just get in touch with our + | Our Group subscriptions allow you to purchase access to our premium features for multiple people. They’re easy to manage, help save on paperwork, and allow groups of 5 or more to purchase via purchase order (PO). We also offer discounts on purchases of Group subscriptions for more than 20 users; just get in touch with our a.inline-green-link( target="_blank" href="/for/contact-sales" @@ -174,7 +174,7 @@ mixin overleafGroupPlans() .collapse(id="overleafGroupPlansQ4") .custom-accordion-body div - | You can add up to 50 licenses using the + | You can add up to 20 licenses using the a.inline-green-link( target="_blank" href="/user/subscription" @@ -196,7 +196,7 @@ mixin overleafGroupPlans() span Subscription | when logged into Overleaf. The cost per license will be prorated at the current per license rate, and will end with your existing renewal date. div.mt-2 - | If you need more than 50 licenses added to your subscription, please + | If you need more than 20 licenses added to your subscription, please a.inline-green-link( target="_blank" href="/for/contact-sales" @@ -235,4 +235,4 @@ mixin overleafGroupPlans() .custom-accordion-body | Yes. To add more users to your subscription you’ll need to button.btn-link.inline-green-link(data-ol-open-contact-form-modal="general") - span #{translate("contact_us")} \ No newline at end of file + span #{translate("contact_us")} diff --git a/services/web/frontend/js/features/subscription/components/dashboard/states/active/change-plan/modals/change-to-group-modal.tsx b/services/web/frontend/js/features/subscription/components/dashboard/states/active/change-plan/modals/change-to-group-modal.tsx index cfb6e37b73..822afc269d 100644 --- a/services/web/frontend/js/features/subscription/components/dashboard/states/active/change-plan/modals/change-to-group-modal.tsx +++ b/services/web/frontend/js/features/subscription/components/dashboard/states/active/change-plan/modals/change-to-group-modal.tsx @@ -155,16 +155,10 @@ export function ChangeToGroupModal() { !groupPlans || !groupPlans.plans || !groupPlans.sizes || - !groupPlans.sizesForHighDenominationCurrencies || !groupPlanToChangeToCode ) return null - const isUsingCOP = personalSubscription.recurly?.currency === 'COP' - const groupPlanSizes = isUsingCOP - ? groupPlans.sizesForHighDenominationCurrencies - : groupPlans.sizes - return ( <> {contactModal} @@ -247,7 +241,7 @@ export function ChangeToGroupModal() { value={groupPlanToChangeToSize} onChange={e => setGroupPlanToChangeToSize(e.target.value)} > - {groupPlanSizes.map(size => ( + {groupPlans.sizes.map(size => ( ))} @@ -358,7 +352,7 @@ export function ChangeToGroupModal() { onClick={showContactModal} > {t('need_more_than_x_licenses', { - x: isUsingCOP ? 20 : 50, + x: 20, })}{' '} {t('please_get_in_touch')} diff --git a/services/web/locales/en.json b/services/web/locales/en.json index 7fc5038563..25b57a1c94 100644 --- a/services/web/locales/en.json +++ b/services/web/locales/en.json @@ -1338,7 +1338,6 @@ "navigation": "Navigation", "nearly_activated": "You’re one step away from activating your __appName__ account!", "need_20_plus_users_discount": "20+ users? <0>Contact Sales to get the best discounts.", - "need_50_plus_users_discount": "50+ users? <0>Contact Sales to get the best discounts.", "need_anything_contact_us_at": "If there is anything you ever need please feel free to contact us directly at", "need_contact_group_admin_to_make_changes": "You’ll need to contact your group admin if you want to make certain changes to your account. <0>Read more about managed users.", "need_make_changes": "You need to make some changes", diff --git a/services/web/test/frontend/features/subscription/components/dashboard/states/active/change-plan/change-plan.test.tsx b/services/web/test/frontend/features/subscription/components/dashboard/states/active/change-plan/change-plan.test.tsx index 5e30d1793f..bbd0755e40 100644 --- a/services/web/test/frontend/features/subscription/components/dashboard/states/active/change-plan/change-plan.test.tsx +++ b/services/web/test/frontend/features/subscription/components/dashboard/states/active/change-plan/change-plan.test.tsx @@ -387,7 +387,7 @@ describe('', function () { within(modal).getByRole('button', { name: 'Upgrade now' }) within(modal).getByRole('button', { - name: 'Need more than 50 licenses? Please get in touch', + name: 'Need more than 20 licenses? Please get in touch', }) }) diff --git a/services/web/test/frontend/features/subscription/fixtures/plans.ts b/services/web/test/frontend/features/subscription/fixtures/plans.ts index e3b94b57df..368449f03d 100644 --- a/services/web/test/frontend/features/subscription/fixtures/plans.ts +++ b/services/web/test/frontend/features/subscription/fixtures/plans.ts @@ -226,8 +226,7 @@ export const groupPlans: GroupPlans = { code: 'professional', }, ], - sizes: ['2', '3', '4', '5', '10', '20', '50'], - sizesForHighDenominationCurrencies: ['2', '3', '4', '5', '10', '20'], + sizes: ['2', '3', '4', '5', '10', '20'], } export const groupPriceByUsageTypeAndSize = { @@ -252,9 +251,6 @@ export const groupPriceByUsageTypeAndSize = { '20': { price_in_cents: 264000, }, - '50': { - price_in_cents: 605000, - }, }, USD: { '2': { @@ -275,9 +271,6 @@ export const groupPriceByUsageTypeAndSize = { '20': { price_in_cents: 286000, }, - '50': { - price_in_cents: 655000, - }, }, }, collaborator: { @@ -300,9 +293,6 @@ export const groupPriceByUsageTypeAndSize = { '20': { price_in_cents: 128000, }, - '50': { - price_in_cents: 295000, - }, }, USD: { '2': { @@ -323,9 +313,6 @@ export const groupPriceByUsageTypeAndSize = { '20': { price_in_cents: 142000, }, - '50': { - price_in_cents: 325000, - }, }, }, }, @@ -350,9 +337,6 @@ export const groupPriceByUsageTypeAndSize = { '20': { price_in_cents: 442000, }, - '50': { - price_in_cents: 1010000, - }, }, USD: { '2': { @@ -373,9 +357,6 @@ export const groupPriceByUsageTypeAndSize = { '20': { price_in_cents: 478000, }, - '50': { - price_in_cents: 1095000, - }, }, }, collaborator: { @@ -398,9 +379,6 @@ export const groupPriceByUsageTypeAndSize = { '20': { price_in_cents: 214000, }, - '50': { - price_in_cents: 490000, - }, }, USD: { '2': { @@ -421,9 +399,6 @@ export const groupPriceByUsageTypeAndSize = { '20': { price_in_cents: 238000, }, - '50': { - price_in_cents: 545000, - }, }, }, }, diff --git a/services/web/test/unit/src/Subscription/SubscriptionControllerTests.js b/services/web/test/unit/src/Subscription/SubscriptionControllerTests.js index 3db2df9ce8..602fb574ef 100644 --- a/services/web/test/unit/src/Subscription/SubscriptionControllerTests.js +++ b/services/web/test/unit/src/Subscription/SubscriptionControllerTests.js @@ -99,7 +99,6 @@ describe('SubscriptionController', function () { }, ], sizes: ['42'], - sizesForHighDenominationCurrencies: ['42'], usages: [{ code: 'foo', display: 'Foo' }], }, apis: { diff --git a/services/web/types/subscription/dashboard/group-plans.ts b/services/web/types/subscription/dashboard/group-plans.ts index 9a82399fc2..de93fe6a6d 100644 --- a/services/web/types/subscription/dashboard/group-plans.ts +++ b/services/web/types/subscription/dashboard/group-plans.ts @@ -4,5 +4,4 @@ export type GroupPlans = { code: string }[] sizes: string[] - sizesForHighDenominationCurrencies: string[] }