mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) set up a trialing list and a call scheduled flag for Grist SaaS
Summary: This adds support for the automation described in https://grist.quip.com/rt3tAoEH4kuy/Automate-Sprouts-outreach-email Test Plan: added tests; will need manual testing and iterative integration work Reviewers: georgegevoian Reviewed By: georgegevoian Differential Revision: https://phab.getgrist.com/D3804
This commit is contained in:
@@ -101,6 +101,7 @@ export interface AppModel {
|
||||
dismissedWelcomePopups: Observable<DismissedReminder[]>;
|
||||
|
||||
pageType: Observable<PageType>;
|
||||
needsOrg: Observable<boolean>;
|
||||
|
||||
notifier: Notifier;
|
||||
planName: string|null;
|
||||
@@ -253,6 +254,11 @@ export class AppModelImpl extends Disposable implements AppModel {
|
||||
public readonly pageType: Observable<PageType> = Computed.create(this, urlState().state,
|
||||
(use, state) => (state.doc ? "doc" : (state.billing ? "billing" : (state.welcome ? "welcome" : "home"))));
|
||||
|
||||
public readonly needsOrg: Observable<boolean> = Computed.create(
|
||||
this, urlState().state, (use, state) => {
|
||||
return !(Boolean(state.welcome) || state.billing === 'scheduled');
|
||||
});
|
||||
|
||||
public readonly notifier = this.topAppModel.notifier;
|
||||
|
||||
public readonly behavioralPromptsManager: BehavioralPromptsManager =
|
||||
|
||||
@@ -53,7 +53,7 @@ export function createAppUI(topAppModel: TopAppModel, appObj: App): IDisposable
|
||||
}
|
||||
|
||||
function createMainPage(appModel: AppModel, appObj: App) {
|
||||
if (!appModel.currentOrg && appModel.pageType.get() !== 'welcome') {
|
||||
if (!appModel.currentOrg && appModel.needsOrg.get()) {
|
||||
const err = appModel.orgError;
|
||||
if (err && err.status === 404) {
|
||||
return createNotFoundPage(appModel);
|
||||
|
||||
Reference in New Issue
Block a user