mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-14 14:13:43 +01:00
Merge pull request #24164 from overleaf/ds-group-discount-10-percent-february
Group plans - Reintroduce 10% discount for group plans (Part 1, 2 & 3 Combined) GitOrigin-RevId: f3a59a65bbd300cc06f70e179e794c32ed7970ce
This commit is contained in:
-21
@@ -15,8 +15,6 @@ import ExtendTrialButton from './extend-trial-button'
|
||||
import { useLocation } from '../../../../../../../shared/hooks/use-location'
|
||||
import { debugConsole } from '@/utils/debugging'
|
||||
import OLButton from '@/features/ui/components/ol/ol-button'
|
||||
import moment from 'moment'
|
||||
import OLNotification from '@/features/ui/components/ol/ol-notification'
|
||||
|
||||
const planCodeToDowngradeTo = 'paid-personal'
|
||||
|
||||
@@ -172,12 +170,6 @@ export function CancelSubscription() {
|
||||
return <LoadingSpinner />
|
||||
}
|
||||
|
||||
const startDate = moment.utc(personalSubscription.recurly.account.created_at)
|
||||
const pricingChangeEffectiveDate = moment.utc('2025-01-08T12:00:00Z')
|
||||
const displayPricingWarning =
|
||||
personalSubscription.plan.groupPlan &&
|
||||
startDate.isBefore(pricingChangeEffectiveDate)
|
||||
|
||||
async function handleCancelSubscription() {
|
||||
try {
|
||||
await runAsyncCancel(postJSON(cancelSubscriptionUrl))
|
||||
@@ -191,19 +183,6 @@ export function CancelSubscription() {
|
||||
|
||||
return (
|
||||
<>
|
||||
{displayPricingWarning && (
|
||||
<OLNotification
|
||||
type="warning"
|
||||
content={
|
||||
<>
|
||||
<h2 className="pricing-warning-heading">
|
||||
{t('cancel_group_price_warning_heading')}
|
||||
</h2>
|
||||
<p>{t('cancel_group_price_warning')}</p>
|
||||
</>
|
||||
}
|
||||
/>
|
||||
)}
|
||||
<div className="text-center">
|
||||
<p>
|
||||
<strong>{t('wed_love_you_to_stay')}</strong>
|
||||
|
||||
+9
-14
@@ -118,6 +118,7 @@ export function ChangeToGroupModal() {
|
||||
const { modal: contactModal, showModal: showContactModal } =
|
||||
useContactUsModal({ autofillProjectUrl: false })
|
||||
const groupPlans = getMeta('ol-groupPlans')
|
||||
const showGroupDiscount = getMeta('ol-showGroupDiscount')
|
||||
const personalSubscription = getMeta('ol-subscription') as RecurlySubscription
|
||||
const [error, setError] = useState(false)
|
||||
const [inflight, setInflight] = useState(false)
|
||||
@@ -172,6 +173,11 @@ export function ChangeToGroupModal() {
|
||||
<OLModalHeader closeButton>
|
||||
<OLModalTitle className="lh-sm">
|
||||
{t('customize_your_group_subscription')}
|
||||
{showGroupDiscount && (
|
||||
<p className="group-subscription-modal-title-discount">
|
||||
{t('save_x_or_more', { percentage: '10%' })}
|
||||
</p>
|
||||
)}
|
||||
</OLModalTitle>
|
||||
</OLModalHeader>
|
||||
|
||||
@@ -259,20 +265,9 @@ export function ChangeToGroupModal() {
|
||||
setGroupPlanToChangeToUsage('enterprise')
|
||||
}
|
||||
}}
|
||||
label={
|
||||
<Trans
|
||||
i18nKey="license_for_educational_purposes_confirmation"
|
||||
values={{ percent: educationalPercentDiscount }}
|
||||
shouldUnescape
|
||||
tOptions={{ interpolation: { escapeValue: true } }}
|
||||
components={[
|
||||
/* eslint-disable-next-line react/jsx-key */
|
||||
<strong />,
|
||||
/* eslint-disable-next-line react/jsx-key */
|
||||
<br />,
|
||||
]}
|
||||
/>
|
||||
}
|
||||
label={t(
|
||||
'apply_educational_discount_description_with_group_discount'
|
||||
)}
|
||||
/>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user