40 remove self billing feature flag (#4379)
* Define quantity at checkout * Remove billing submenu when not isBillingEnabled * Remove feature flag * Log warning when missing subscription active workspace add or remove member * Display subscribe cta for free usage of twenty * Authorize all settings when subscription canceled or unpaid * Display subscribe cta for workspace with canceled subscription * Replace OneToOne by OneToMany * Add a currentBillingSubscriptionField * Handle multiple subscriptions by workspace * Fix redirection * Fix test * Fix billingState
This commit is contained in:
@ -10,6 +10,7 @@ export enum OnboardingStatus {
|
||||
OngoingWorkspaceActivation = 'ongoing_workspace_activation',
|
||||
OngoingProfileCreation = 'ongoing_profile_creation',
|
||||
Completed = 'completed',
|
||||
CompletedWithoutSubscription = 'completed_without_subscription',
|
||||
}
|
||||
|
||||
export const getOnboardingStatus = ({
|
||||
@ -75,5 +76,12 @@ export const getOnboardingStatus = ({
|
||||
return OnboardingStatus.Unpaid;
|
||||
}
|
||||
|
||||
if (
|
||||
isBillingEnabled === true &&
|
||||
!currentWorkspace.currentBillingSubscription
|
||||
) {
|
||||
return OnboardingStatus.CompletedWithoutSubscription;
|
||||
}
|
||||
|
||||
return OnboardingStatus.Completed;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user