mirror of
https://github.com/bitwarden/browser
synced 2025-12-20 18:23:31 +00:00
[PM-9364] Copy for Aggregate auto-scaling invoices for Teams and Enterprise customers (#9875)
* Change the seat adjustment message * Move changes from en_GB file to en file * revert changes in en_GB file * Add feature flag to the change
This commit is contained in:
@@ -51,6 +51,7 @@ export class OrganizationSubscriptionCloudComponent implements OnInit, OnDestroy
|
||||
showUpdatedSubscriptionStatusSection$: Observable<boolean>;
|
||||
manageBillingFromProviderPortal = ManageBilling;
|
||||
isProviderManaged = false;
|
||||
enableTimeThreshold: boolean;
|
||||
|
||||
protected readonly teamsStarter = ProductTierType.TeamsStarter;
|
||||
|
||||
@@ -60,6 +61,10 @@ export class OrganizationSubscriptionCloudComponent implements OnInit, OnDestroy
|
||||
FeatureFlag.EnableConsolidatedBilling,
|
||||
);
|
||||
|
||||
protected enableTimeThreshold$ = this.configService.getFeatureFlag$(
|
||||
FeatureFlag.EnableTimeThreshold,
|
||||
);
|
||||
|
||||
constructor(
|
||||
private apiService: ApiService,
|
||||
private platformUtilsService: PlatformUtilsService,
|
||||
@@ -94,6 +99,7 @@ export class OrganizationSubscriptionCloudComponent implements OnInit, OnDestroy
|
||||
this.showUpdatedSubscriptionStatusSection$ = this.configService.getFeatureFlag$(
|
||||
FeatureFlag.AC1795_UpdatedSubscriptionStatusSection,
|
||||
);
|
||||
this.enableTimeThreshold = await firstValueFrom(this.enableTimeThreshold$);
|
||||
}
|
||||
|
||||
ngOnDestroy() {
|
||||
@@ -284,16 +290,38 @@ export class OrganizationSubscriptionCloudComponent implements OnInit, OnDestroy
|
||||
return this.i18nService.t("subscriptionUpgrade", 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());
|
||||
if (!this.enableTimeThreshold) {
|
||||
return this.i18nService.t("subscriptionMaxReached", this.sub.seats.toString());
|
||||
}
|
||||
const seatAdjustmentMessage = this.sub.plan.isAnnual
|
||||
? "annualSubscriptionUserSeatsMessage"
|
||||
: "monthlySubscriptionUserSeatsMessage";
|
||||
return this.i18nService.t(
|
||||
seatAdjustmentMessage + "subscriptionSeatMaxReached",
|
||||
this.sub.seats.toString(),
|
||||
);
|
||||
} else if (this.userOrg.productTierType === ProductTierType.TeamsStarter) {
|
||||
return this.i18nService.t("subscriptionUserSeatsWithoutAdditionalSeatsOption", 10);
|
||||
} else if (this.sub.maxAutoscaleSeats == null) {
|
||||
return this.i18nService.t("subscriptionUserSeatsUnlimitedAutoscale");
|
||||
if (!this.enableTimeThreshold) {
|
||||
return this.i18nService.t("subscriptionUserSeatsUnlimitedAutoscale");
|
||||
}
|
||||
|
||||
const seatAdjustmentMessage = this.sub.plan.isAnnual
|
||||
? "annualSubscriptionUserSeatsMessage"
|
||||
: "monthlySubscriptionUserSeatsMessage";
|
||||
return this.i18nService.t(seatAdjustmentMessage);
|
||||
} else {
|
||||
return this.i18nService.t(
|
||||
"subscriptionUserSeatsLimitedAutoscale",
|
||||
this.sub.maxAutoscaleSeats.toString(),
|
||||
);
|
||||
if (!this.enableTimeThreshold) {
|
||||
return this.i18nService.t(
|
||||
"subscriptionUserSeatsLimitedAutoscale",
|
||||
this.sub.maxAutoscaleSeats.toString(),
|
||||
);
|
||||
}
|
||||
const seatAdjustmentMessage = this.sub.plan.isAnnual
|
||||
? "annualSubscriptionUserSeatsMessage"
|
||||
: "monthlySubscriptionUserSeatsMessage";
|
||||
return this.i18nService.t(seatAdjustmentMessage, this.sub.maxAutoscaleSeats.toString());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user