mirror of
https://github.com/bitwarden/web
synced 2026-01-08 19:44:08 +00:00
Show upgrade plan button for free orgs. (#1269)
* Show upgrade plan button for free orgs. * Add families plan callout for subscription upgrade
This commit is contained in:
@@ -110,15 +110,7 @@ export class OrganizationSubscriptionComponent implements OnInit {
|
||||
}
|
||||
|
||||
async changePlan() {
|
||||
if (this.subscription == null && this.sub.planType === PlanType.Free) {
|
||||
this.showChangePlan = !this.showChangePlan;
|
||||
return;
|
||||
}
|
||||
const contactSupport = await this.platformUtilsService.showDialog(this.i18nService.t('changeBillingPlanDesc'),
|
||||
this.i18nService.t('changeBillingPlan'), this.i18nService.t('contactSupport'), this.i18nService.t('close'));
|
||||
if (contactSupport) {
|
||||
this.platformUtilsService.launchUri('https://bitwarden.com/contact');
|
||||
}
|
||||
this.showChangePlan = !this.showChangePlan;
|
||||
}
|
||||
|
||||
closeChangePlan(changed: boolean) {
|
||||
@@ -221,7 +213,11 @@ export class OrganizationSubscriptionComponent implements OnInit {
|
||||
}
|
||||
|
||||
get subscriptionDesc() {
|
||||
if (this.sub.maxAutoscaleSeats === this.sub.seats && this.sub.seats != null) {
|
||||
if (this.sub.planType === PlanType.Free) {
|
||||
return this.i18nService.t('subscriptionFreePlan', this.sub.seats.toString());
|
||||
} else if (this.sub.planType === PlanType.FamiliesAnnually || this.sub.planType === PlanType.FamiliesAnnually2019) {
|
||||
return this.i18nService.t('subscriptionFamiliesPlan', this.sub.seats.toString());
|
||||
} else if (this.sub.maxAutoscaleSeats === this.sub.seats && this.sub.seats != null) {
|
||||
return this.i18nService.t('subscriptionMaxReached', this.sub.seats.toString());
|
||||
} else if (this.sub.maxAutoscaleSeats == null) {
|
||||
return this.i18nService.t('subscriptionUserSeatsUnlimitedAutoscale');
|
||||
@@ -229,4 +225,8 @@ export class OrganizationSubscriptionComponent implements OnInit {
|
||||
return this.i18nService.t('subscriptionUserSeatsLimitedAutoscale', this.sub.maxAutoscaleSeats.toString());
|
||||
}
|
||||
}
|
||||
|
||||
get showChangePlanButton() {
|
||||
return this.subscription == null && this.sub.planType === PlanType.Free && !this.showChangePlan;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user