(core) correct capitalization of AppSumo; add account management link

Summary:
Branding feedback from AppSumo found a capitalization problem. They also nudged us again to include a link back for the user to manage
their AppSumo account.

Test Plan: manual

Reviewers: dsagal, anaisconce

Reviewed By: dsagal

Subscribers: dsagal

Differential Revision: https://phab.getgrist.com/D2901
This commit is contained in:
Paul Fitzpatrick 2021-07-07 15:14:31 -04:00
parent b389ee7c23
commit d0905b6224
2 changed files with 20 additions and 0 deletions

View File

@ -182,6 +182,7 @@ export class BillingPage extends Disposable {
makeSummaryFeature([`Your next invoice is `, getPriceString(sub.nextTotal),
' on ', dateFmt(sub.periodEnd)]),
] : null,
tier ? this.buildAppSumoLink(this._appModel.currentOrg?.billingAccount?.externalOptions?.invoiceId) : null,
getSubscriptionProblem(sub),
testId('summary')
),
@ -250,6 +251,22 @@ export class BillingPage extends Disposable {
return null;
}
// Include a precise link back to AppSumo for changing plans.
public buildAppSumoLink(invoiceId: string | undefined) {
if (!invoiceId) { return null; }
return dom('div',
css.billingTextBtn({ style: 'margin: 10px 0;' },
cssBreadcrumbsLink(
css.billingIcon('Plus'), 'Change your AppSumo plan',
{
href: `https://appsumo.com/account/redemption/${invoiceId}/#change-plan`,
target: '_blank'
},
testId('appsumo-link')
)
));
}
public buildPlansPage() {
// Fetch plan and card data if not already present.
this._model.fetchData().catch(reportError);

View File

@ -65,6 +65,9 @@ export interface BillingAccount {
individual: boolean;
product: Product;
isManager: boolean;
externalOptions?: {
invoiceId?: string;
};
}
// Information about the product associated with an org or orgs.