mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) suspend a team site after an AppSumo refund
Summary: This suspends service to a team site for which an AppSumo refund has been made, and nudges users to their free personal account. I expect that a refund request would fail for a site where user is also paying us for extra seats. Test Plan: tested manually Reviewers: dsagal Reviewed By: dsagal Differential Revision: https://phab.getgrist.com/D2912
This commit is contained in:
@@ -31,6 +31,17 @@ function buildAction(action: NotifyAction, item: Notification, options: IBeaconO
|
||||
return dom('a', cssToastAction.cls(''), 'Renew', {target: '_blank'},
|
||||
{href: urlState().makeUrl({billing: 'billing'})});
|
||||
|
||||
case 'personal':
|
||||
if (!appModel) { return null; }
|
||||
return cssToastAction('Go to your free personal site', dom.on('click', async () => {
|
||||
const info = await appModel.api.getSessionAll();
|
||||
const orgs = info.orgs.filter(org => org.owner && org.owner.id === appModel.currentUser?.id);
|
||||
if (orgs.length !== 1) {
|
||||
throw new Error('Cannot find personal site, sorry!');
|
||||
}
|
||||
window.location.assign(urlState().makeUrl({org: orgs[0].domain || undefined}));
|
||||
}));
|
||||
|
||||
case 'report-problem':
|
||||
return cssToastAction('Report a problem', testId('toast-report-problem'),
|
||||
dom.on('click', () => beaconOpenMessage({...options, includeAppErrors: true})));
|
||||
|
||||
Reference in New Issue
Block a user