mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) Polishing upgrade plan UI
Summary: - Update nudge boxes content and collapsing on personal and free team site - New confirmation after upgrading from a free team site - Refactoring ProductUpgrade code, splitting plans / modals and nudges Test Plan: Manual and updated tests Reviewers: georgegevoian Reviewed By: georgegevoian Differential Revision: https://phab.getgrist.com/D3481
This commit is contained in:
@@ -15,7 +15,7 @@ export type BillingPage = typeof BillingPage.type;
|
||||
// signUpLite - it is a subpage for payment, to finalize (complete) signup process
|
||||
// and set domain and team name when they are not set yet (currently only from landing pages).
|
||||
// signUp - it is landing page for new team sites (it doesn't ask for the name of the team)
|
||||
export const BillingTask = StringUnion('signUpLite', 'updateDomain', 'signUp', 'cancelPlan');
|
||||
export const BillingTask = StringUnion('signUpLite', 'updateDomain', 'signUp', 'cancelPlan', 'upgraded');
|
||||
export type BillingTask = typeof BillingTask.type;
|
||||
|
||||
// Note that IBillingPlan includes selected fields from the Stripe plan object along with
|
||||
|
||||
@@ -68,7 +68,12 @@ export function canAddOrgMembers(features: Features): boolean {
|
||||
return features.maxWorkspacesPerOrg !== 1;
|
||||
}
|
||||
|
||||
|
||||
export const FREE_PERSONAL_PLAN = 'starter';
|
||||
export const TEAM_FREE_PLAN = 'teamFree';
|
||||
export const TEAM_PLAN = 'team';
|
||||
|
||||
// Returns true if `product` is free.
|
||||
export function isFreeProduct(product: Product): boolean {
|
||||
return ['starter', 'teamFree', 'Free'].includes(product?.name);
|
||||
return [FREE_PERSONAL_PLAN, TEAM_FREE_PLAN, 'Free'].includes(product?.name);
|
||||
}
|
||||
|
||||
@@ -38,9 +38,6 @@ export interface UserOrgPrefs extends Prefs {
|
||||
|
||||
// List of document IDs where the user has seen and dismissed the document tour.
|
||||
seenDocTours?: string[];
|
||||
|
||||
// Whether the user seen the nudge to upgrade to Free Team Site and dismissed it.
|
||||
seenFreeTeamUpgradeNudge?: boolean;
|
||||
}
|
||||
|
||||
export type OrgPrefs = Prefs;
|
||||
|
||||
Reference in New Issue
Block a user