diff --git a/services/web/app/src/Features/Subscription/SubscriptionController.js b/services/web/app/src/Features/Subscription/SubscriptionController.js index 9175a520bd..ecac7dea0c 100644 --- a/services/web/app/src/Features/Subscription/SubscriptionController.js +++ b/services/web/app/src/Features/Subscription/SubscriptionController.js @@ -236,6 +236,7 @@ async function userSubscriptionPage(req, res) { res, 'bootstrap-5-subscription' ) + await SplitTestHandler.promises.getAssignment(req, res, 'group-pricing-2025') const results = await SubscriptionViewModelBuilder.promises.buildUsersSubscriptionViewModel( diff --git a/services/web/frontend/extracted-translations.json b/services/web/frontend/extracted-translations.json index 70d5c11cd2..05a30c1fdb 100644 --- a/services/web/frontend/extracted-translations.json +++ b/services/web/frontend/extracted-translations.json @@ -830,6 +830,7 @@ "lets_fix_your_errors": "", "library": "", "license_for_educational_purposes": "", + "license_for_educational_purposes_2025": "", "limited_offer": "", "limited_to_n_editors": "", "limited_to_n_editors_per_project": "", 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 9ed0154326..c5deba1765 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 @@ -25,6 +25,7 @@ import OLButton from '@/features/ui/components/ol/ol-button' import BootstrapVersionSwitcher from '@/features/ui/components/bootstrap-5/bootstrap-version-switcher' import OLNotification from '@/features/ui/components/ol/ol-notification' import { bsVersion } from '@/features/utils/bootstrap-5' +import { useFeatureFlag } from '@/shared/context/split-test-context' const educationalPercentDiscount = 40 const groupSizeForEducationalDiscount = 10 @@ -46,10 +47,16 @@ function GroupPlanCollaboratorCount({ planCode }: { planCode: string }) { return null } -function EducationDiscountAppliedOrNot({ groupSize }: { groupSize: string }) { +function EducationDiscountAppliedOrNot({ + groupSize, + showGroupPricing2025, +}: { + groupSize: string + showGroupPricing2025: boolean +}) { const { t } = useTranslation() const size = parseInt(groupSize) - if (size >= groupSizeForEducationalDiscount) { + if (size >= groupSizeForEducationalDiscount || showGroupPricing2025) { return (
{t('educational_percent_discount_applied', {
@@ -145,6 +152,7 @@ export function ChangeToGroupModal() {
const [error, setError] = useState(false)
const [inflight, setInflight] = useState(false)
const location = useLocation()
+ const showGroupPricing2025 = useFeatureFlag('group-pricing-2025')
async function upgrade() {
setError(false)
@@ -196,11 +204,13 @@ export function ChangeToGroupModal() {
-
- {t('save_x_percent_or_more', {
- percent: '30',
- })}
-
+ {!showGroupPricing2025 && (
+
+ {t('save_x_percent_or_more', {
+ percent: '30',
+ })}
+
+ )}
,
+ ]}
+ />
+ ) : (
+ t('license_for_educational_purposes')
+ )
+ }
/>
@@ -306,6 +335,7 @@ export function ChangeToGroupModal() {
{groupPlanToChangeToUsage === 'educational' && (