mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-14 22:23:42 +01:00
Merge pull request #11885 from overleaf/ab-personal-sub-custom-react
[web] Display a message for custom personal subscriptions in React dash GitOrigin-RevId: c70986ffacfdfdeccd3675385e2e5dba1a2ad61f
This commit is contained in:
committed by
Copybot
parent
8b00a496e7
commit
d2fb800174
@@ -5,6 +5,40 @@ import { User } from '../../../types/user'
|
||||
|
||||
type SubscriptionState = 'active' | 'canceled' | 'expired'
|
||||
|
||||
type Recurly = {
|
||||
tax: number
|
||||
taxRate: number
|
||||
billingDetailsLink: string
|
||||
accountManagementLink: string
|
||||
additionalLicenses: number
|
||||
totalLicenses: number
|
||||
nextPaymentDueAt: string
|
||||
currency: CurrencyCode
|
||||
state?: SubscriptionState
|
||||
trialEndsAtFormatted: Nullable<string>
|
||||
trial_ends_at: Nullable<string>
|
||||
activeCoupons: any[] // TODO: confirm type in array
|
||||
account: {
|
||||
// data via Recurly API
|
||||
has_canceled_subscription: {
|
||||
_: 'false' | 'true'
|
||||
$: {
|
||||
type: 'boolean'
|
||||
}
|
||||
}
|
||||
has_past_due_invoice: {
|
||||
_: 'false' | 'true'
|
||||
$: {
|
||||
type: 'boolean'
|
||||
}
|
||||
}
|
||||
}
|
||||
displayPrice: string
|
||||
currentPlanDisplayPrice?: string
|
||||
pendingAdditionalLicenses?: number
|
||||
pendingTotalLicenses?: number
|
||||
}
|
||||
|
||||
export type Subscription = {
|
||||
_id: string
|
||||
admin_id: string
|
||||
@@ -17,44 +51,19 @@ export type Subscription = {
|
||||
planCode: string
|
||||
recurlySubscription_id: string
|
||||
plan: Plan
|
||||
recurly: {
|
||||
tax: number
|
||||
taxRate: number
|
||||
billingDetailsLink: string
|
||||
accountManagementLink: string
|
||||
additionalLicenses: number
|
||||
totalLicenses: number
|
||||
nextPaymentDueAt: string
|
||||
currency: CurrencyCode
|
||||
state?: SubscriptionState
|
||||
trialEndsAtFormatted: Nullable<string>
|
||||
trial_ends_at: Nullable<string>
|
||||
activeCoupons: any[] // TODO: confirm type in array
|
||||
account: {
|
||||
// data via Recurly API
|
||||
has_canceled_subscription: {
|
||||
_: 'false' | 'true'
|
||||
$: {
|
||||
type: 'boolean'
|
||||
}
|
||||
}
|
||||
has_past_due_invoice: {
|
||||
_: 'false' | 'true'
|
||||
$: {
|
||||
type: 'boolean'
|
||||
}
|
||||
}
|
||||
}
|
||||
displayPrice: string
|
||||
currentPlanDisplayPrice?: string
|
||||
pendingAdditionalLicenses?: number
|
||||
pendingTotalLicenses?: number
|
||||
}
|
||||
pendingPlan?: Plan
|
||||
}
|
||||
|
||||
export type GroupSubscription = Subscription & {
|
||||
teamName?: string
|
||||
export type RecurlySubscription = Subscription & {
|
||||
recurly: Recurly
|
||||
}
|
||||
|
||||
export type CustomSubscription = Subscription & {
|
||||
customAccount: boolean
|
||||
}
|
||||
|
||||
export type GroupSubscription = RecurlySubscription & {
|
||||
teamName: string
|
||||
teamNotice?: string
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user