(core) Add product for new personal plan

Summary:
Adds the new personal plan as a product that will be available
in the future. Can be enabled along with other plan-related via
an environment variable.

Test Plan: Browser tests and existing tests.

Reviewers: jarek

Reviewed By: jarek

Subscribers: dsagal

Differential Revision: https://phab.getgrist.com/D3533
This commit is contained in:
George Gevoian
2022-07-26 10:49:35 -07:00
parent 5c8211c61d
commit aeba738f7c
18 changed files with 194 additions and 73 deletions

View File

@@ -191,7 +191,7 @@ function addMenu(home: HomeModel, creating: Observable<boolean>): DomElementArg[
dom.cls('disabled', (use) => !roles.canEdit(orgAccess) || !use(home.available)),
testId("dm-new-workspace")
),
upgradeText(needUpgrade),
upgradeText(needUpgrade, () => home.app.showUpgradeModal()),
];
}
@@ -225,8 +225,12 @@ function workspaceMenu(home: HomeModel, ws: Workspace, renaming: Observable<Work
testId('dm-delete-workspace')),
upgradableMenuItem(needUpgrade, manageWorkspaceUsers,
roles.canEditAccess(ws.access) ? "Manage Users" : "Access Details",
// TODO: Personal plans can't currently share workspaces, but that restriction
// should formally be documented and defined in `Features`, with this check updated
// to look there instead.
dom.cls('disabled', () => home.app.isPersonal),
testId('dm-workspace-access')),
upgradeText(needUpgrade),
upgradeText(needUpgrade, () => home.app.showUpgradeModal()),
];
}