Merge pull request #11862 from overleaf/ab-group-subscription-memberships-dash-react

[web] Migrate group subscription memberships to React dash

GitOrigin-RevId: d5ff3ae4e5d8c422530502af22edda6c24c9a593
This commit is contained in:
Alexandre Bourdin
2023-02-23 09:04:49 +00:00
committed by Copybot
parent f4a9b7bf60
commit f86eeac522
11 changed files with 346 additions and 11 deletions
@@ -2,3 +2,4 @@ export type SubscriptionDashModalIds =
| 'change-to-plan'
| 'change-to-group'
| 'keep-current-plan'
| 'leave-group'
@@ -1,3 +1,4 @@
import { CurrencyCode } from '../../../frontend/js/features/subscription/data/currency'
import { Nullable } from '../../utils'
import { Plan } from '../plan'
import { User } from '../../../types/user'
@@ -24,7 +25,7 @@ export type Subscription = {
additionalLicenses: number
totalLicenses: number
nextPaymentDueAt: string
currency: string
currency: CurrencyCode
state?: SubscriptionState
trialEndsAtFormatted: Nullable<string>
trial_ends_at: Nullable<string>
@@ -53,7 +54,8 @@ export type Subscription = {
}
export type GroupSubscription = Subscription & {
teamName: string
teamName?: string
teamNotice?: string
}
export type ManagedGroupSubscription = Omit<GroupSubscription, 'admin_id'> & {
@@ -61,3 +63,9 @@ export type ManagedGroupSubscription = Omit<GroupSubscription, 'admin_id'> & {
planLevelName: string
admin_id: User
}
export type MemberGroupSubscription = Omit<GroupSubscription, 'admin_id'> & {
userIsGroupManager: boolean
planLevelName: string
admin_id: User
}