[web] add notification message to the dashboard for migrated subscriptions (#31429)
GitOrigin-RevId: 12c14020b9e43e6544bdbd363fd2bc0d4051c80b
This commit is contained in:
@@ -53,6 +53,7 @@ export class PaymentProviderSubscription {
|
||||
* @param {Date|null} [props.pausePeriodStart]
|
||||
* @param {Date|null} [props.pausePeriodEnd]
|
||||
* @param {number|null} [props.remainingPauseCycles]
|
||||
* @param {boolean} [props.isMigratedFromRecurly]
|
||||
*/
|
||||
constructor(props) {
|
||||
this.id = props.id
|
||||
@@ -80,6 +81,7 @@ export class PaymentProviderSubscription {
|
||||
this.pausePeriodStart = props.pausePeriodStart ?? null
|
||||
this.pausePeriodEnd = props.pausePeriodEnd ?? null
|
||||
this.remainingPauseCycles = props.remainingPauseCycles ?? null
|
||||
this.isMigratedFromRecurly = props.isMigratedFromRecurly ?? false
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -305,6 +305,8 @@ async function buildUsersSubscriptionViewModel(user, locale = 'en') {
|
||||
remainingPauseCycles: paymentRecord.subscription.remainingPauseCycles,
|
||||
isEligibleForPause,
|
||||
isEligibleForGroupPlan: !isInTrial,
|
||||
isMigratedFromRecurly:
|
||||
paymentRecord.subscription.isMigratedFromRecurly ?? false,
|
||||
}
|
||||
|
||||
const isMonthlyCollaboratorPlan =
|
||||
|
||||
@@ -2203,6 +2203,7 @@
|
||||
"view_only_reviewer_downgraded": "",
|
||||
"view_options": "",
|
||||
"view_payment_portal": "",
|
||||
"view_payment_portal_disclaimer": "",
|
||||
"view_pdf": "",
|
||||
"view_your_invoices": "",
|
||||
"viewer": "",
|
||||
|
||||
+19
-7
@@ -164,13 +164,25 @@ export function ActiveSubscription({
|
||||
</a>
|
||||
</>
|
||||
) : (
|
||||
<a
|
||||
href={subscription.payment.accountManagementLink}
|
||||
rel="noreferrer noopener"
|
||||
className="me-2"
|
||||
>
|
||||
{t('view_payment_portal')}
|
||||
</a>
|
||||
<>
|
||||
<a
|
||||
href={subscription.payment.accountManagementLink}
|
||||
rel="noreferrer noopener"
|
||||
className="me-2"
|
||||
>
|
||||
{t('view_payment_portal')}
|
||||
</a>
|
||||
{subscription.payment.isMigratedFromRecurly && (
|
||||
<p>
|
||||
<i style={{ fontSize: 'var(--font-size-01)' }}>
|
||||
<Trans
|
||||
i18nKey="view_payment_portal_disclaimer"
|
||||
components={[<a href="/contact" />]} // eslint-disable-line react/jsx-key, jsx-a11y/anchor-has-content
|
||||
/>
|
||||
</i>
|
||||
</p>
|
||||
)}
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
<div className="mt-3">
|
||||
|
||||
@@ -2752,6 +2752,7 @@
|
||||
"view_only_reviewer_downgraded": "View only. Upgrade to restore review access.",
|
||||
"view_options": "View options",
|
||||
"view_payment_portal": "View invoices and billing details",
|
||||
"view_payment_portal_disclaimer": "You might have older invoices prior to February 2026. Please <0>contact support</0> if you need to get access to these.",
|
||||
"view_pdf": "View PDF",
|
||||
"view_source": "View Source",
|
||||
"view_your_invoices": "View your invoices",
|
||||
|
||||
@@ -55,6 +55,7 @@ export const annualActiveSubscription: PaidSubscription = {
|
||||
isEligibleForGroupPlan: true,
|
||||
isEligibleForPause: false,
|
||||
isEligibleForDowngradeUpsell: false,
|
||||
isMigratedFromRecurly: false,
|
||||
},
|
||||
}
|
||||
|
||||
@@ -101,6 +102,7 @@ export const annualActiveSubscriptionWithCoupons: PaidSubscription = {
|
||||
isEligibleForGroupPlan: true,
|
||||
isEligibleForPause: false,
|
||||
isEligibleForDowngradeUpsell: false,
|
||||
isMigratedFromRecurly: false,
|
||||
},
|
||||
}
|
||||
|
||||
@@ -145,6 +147,7 @@ export const pendingPausedSubscription: PaidSubscription = {
|
||||
isEligibleForGroupPlan: true,
|
||||
isEligibleForPause: false,
|
||||
isEligibleForDowngradeUpsell: false,
|
||||
isMigratedFromRecurly: false,
|
||||
},
|
||||
}
|
||||
|
||||
@@ -189,6 +192,7 @@ export const pausedSubscription: PaidSubscription = {
|
||||
isEligibleForGroupPlan: true,
|
||||
isEligibleForPause: false,
|
||||
isEligibleForDowngradeUpsell: false,
|
||||
isMigratedFromRecurly: false,
|
||||
},
|
||||
}
|
||||
|
||||
@@ -234,6 +238,7 @@ export const annualActiveSubscriptionWithAddons: PaidSubscription = {
|
||||
isEligibleForGroupPlan: true,
|
||||
isEligibleForPause: false,
|
||||
isEligibleForDowngradeUpsell: false,
|
||||
isMigratedFromRecurly: false,
|
||||
},
|
||||
addOns: [{ addOnCode: 'assistant', quantity: 1, unitAmountInCents: 10000 }],
|
||||
}
|
||||
@@ -278,6 +283,7 @@ export const annualActiveSubscriptionEuro: PaidSubscription = {
|
||||
isEligibleForGroupPlan: true,
|
||||
isEligibleForPause: true,
|
||||
isEligibleForDowngradeUpsell: false,
|
||||
isMigratedFromRecurly: false,
|
||||
},
|
||||
}
|
||||
|
||||
@@ -320,6 +326,7 @@ export const annualActiveSubscriptionPro: PaidSubscription = {
|
||||
isEligibleForGroupPlan: true,
|
||||
isEligibleForPause: true,
|
||||
isEligibleForDowngradeUpsell: false,
|
||||
isMigratedFromRecurly: false,
|
||||
},
|
||||
}
|
||||
|
||||
@@ -363,6 +370,7 @@ export const pastDueExpiredSubscription: PaidSubscription = {
|
||||
isEligibleForGroupPlan: true,
|
||||
isEligibleForPause: true,
|
||||
isEligibleForDowngradeUpsell: false,
|
||||
isMigratedFromRecurly: false,
|
||||
},
|
||||
}
|
||||
|
||||
@@ -406,6 +414,7 @@ export const canceledSubscription: PaidSubscription = {
|
||||
isEligibleForGroupPlan: true,
|
||||
isEligibleForPause: true,
|
||||
isEligibleForDowngradeUpsell: false,
|
||||
isMigratedFromRecurly: false,
|
||||
},
|
||||
}
|
||||
|
||||
@@ -456,6 +465,7 @@ export const pendingAddOnChange: PaidSubscription = {
|
||||
isEligibleForGroupPlan: true,
|
||||
isEligibleForPause: false,
|
||||
isEligibleForDowngradeUpsell: false,
|
||||
isMigratedFromRecurly: false,
|
||||
},
|
||||
pendingPlan: {
|
||||
planCode: 'collaborator-annual',
|
||||
@@ -506,6 +516,7 @@ export const pendingSubscriptionChange: PaidSubscription = {
|
||||
isEligibleForGroupPlan: true,
|
||||
isEligibleForPause: false,
|
||||
isEligibleForDowngradeUpsell: false,
|
||||
isMigratedFromRecurly: false,
|
||||
},
|
||||
pendingPlan: {
|
||||
planCode: 'professional-annual',
|
||||
@@ -560,6 +571,7 @@ export const groupActiveSubscription: GroupSubscription = {
|
||||
isEligibleForGroupPlan: true,
|
||||
isEligibleForPause: false,
|
||||
isEligibleForDowngradeUpsell: false,
|
||||
isMigratedFromRecurly: false,
|
||||
},
|
||||
}
|
||||
|
||||
@@ -607,6 +619,7 @@ export const groupProfessionalActiveSubscription: GroupSubscription = {
|
||||
isEligibleForGroupPlan: true,
|
||||
isEligibleForPause: false,
|
||||
isEligibleForDowngradeUpsell: false,
|
||||
isMigratedFromRecurly: false,
|
||||
},
|
||||
}
|
||||
|
||||
@@ -657,6 +670,7 @@ export const groupActiveSubscriptionWithPendingLicenseChange: GroupSubscription
|
||||
isEligibleForGroupPlan: true,
|
||||
isEligibleForPause: false,
|
||||
isEligibleForDowngradeUpsell: false,
|
||||
isMigratedFromRecurly: false,
|
||||
},
|
||||
pendingPlan: {
|
||||
planCode: 'group_collaborator_10_enterprise',
|
||||
@@ -709,6 +723,7 @@ export const trialSubscription: PaidSubscription = {
|
||||
isEligibleForGroupPlan: true,
|
||||
isEligibleForPause: false,
|
||||
isEligibleForDowngradeUpsell: false,
|
||||
isMigratedFromRecurly: false,
|
||||
},
|
||||
}
|
||||
|
||||
@@ -772,6 +787,7 @@ export const trialCollaboratorSubscription: PaidSubscription = {
|
||||
isEligibleForGroupPlan: true,
|
||||
isEligibleForPause: true,
|
||||
isEligibleForDowngradeUpsell: false,
|
||||
isMigratedFromRecurly: false,
|
||||
},
|
||||
}
|
||||
|
||||
@@ -814,5 +830,6 @@ export const monthlyActiveCollaborator: PaidSubscription = {
|
||||
isEligibleForGroupPlan: true,
|
||||
isEligibleForPause: true,
|
||||
isEligibleForDowngradeUpsell: true,
|
||||
isMigratedFromRecurly: false,
|
||||
},
|
||||
}
|
||||
|
||||
@@ -721,6 +721,7 @@ describe('SubscriptionViewModelBuilder', function () {
|
||||
isEligibleForGroupPlan: true,
|
||||
isEligibleForPause: false,
|
||||
isEligibleForDowngradeUpsell: true,
|
||||
isMigratedFromRecurly: false,
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
@@ -56,6 +56,7 @@ type PaymentProviderRecord = {
|
||||
isEligibleForPause: boolean
|
||||
isEligibleForGroupPlan: boolean
|
||||
isEligibleForDowngradeUpsell: boolean
|
||||
isMigratedFromRecurly: boolean
|
||||
}
|
||||
|
||||
export type GroupPolicy = {
|
||||
|
||||
Reference in New Issue
Block a user