1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-10 05:13:29 +00:00

SM changes (#8531)

This commit is contained in:
Conner Turnbull
2024-04-08 14:42:49 -04:00
committed by GitHub
parent 0c291bf79b
commit 18ae698f8d
5 changed files with 22 additions and 8 deletions

View File

@@ -47,7 +47,11 @@ interface OnSuccessArgs {
organizationId: string;
}
const Allowed2020PlanTypes = [
const AllowedLegacyPlanTypes = [
PlanType.TeamsMonthly2023,
PlanType.TeamsAnnually2023,
PlanType.EnterpriseAnnually2023,
PlanType.EnterpriseMonthly2023,
PlanType.TeamsMonthly2020,
PlanType.TeamsAnnually2020,
PlanType.EnterpriseAnnually2020,
@@ -278,7 +282,7 @@ export class OrganizationPlansComponent implements OnInit, OnDestroy {
(!this.currentPlan || this.currentPlan.upgradeSortOrder < plan.upgradeSortOrder) &&
(!this.hasProvider || plan.product !== ProductType.TeamsStarter) &&
((!this.isProviderQualifiedFor2020Plan() && this.planIsEnabled(plan)) ||
(this.isProviderQualifiedFor2020Plan() && Allowed2020PlanTypes.includes(plan.type))),
(this.isProviderQualifiedFor2020Plan() && AllowedLegacyPlanTypes.includes(plan.type))),
);
result.sort((planA, planB) => planA.displaySortOrder - planB.displaySortOrder);
@@ -293,7 +297,7 @@ export class OrganizationPlansComponent implements OnInit, OnDestroy {
(plan) =>
plan.product === selectedProductType &&
((!this.isProviderQualifiedFor2020Plan() && this.planIsEnabled(plan)) ||
(this.isProviderQualifiedFor2020Plan() && Allowed2020PlanTypes.includes(plan.type))),
(this.isProviderQualifiedFor2020Plan() && AllowedLegacyPlanTypes.includes(plan.type))),
) || [];
result.sort((planA, planB) => planA.displaySortOrder - planB.displaySortOrder);

View File

@@ -241,6 +241,8 @@ export class OrganizationSubscriptionCloudComponent implements OnInit, OnDestroy
return (
this.sub.planType === PlanType.EnterpriseAnnually ||
this.sub.planType === PlanType.EnterpriseMonthly ||
this.sub.planType === PlanType.EnterpriseAnnually2023 ||
this.sub.planType === PlanType.EnterpriseMonthly2023 ||
this.sub.planType === PlanType.EnterpriseAnnually2020 ||
this.sub.planType === PlanType.EnterpriseMonthly2020 ||
this.sub.planType === PlanType.EnterpriseAnnually2019 ||
@@ -254,6 +256,7 @@ export class OrganizationSubscriptionCloudComponent implements OnInit, OnDestroy
} else if (
this.sub.planType === PlanType.FamiliesAnnually ||
this.sub.planType === PlanType.FamiliesAnnually2019 ||
this.sub.planType === PlanType.TeamsStarter2023 ||
this.sub.planType === PlanType.TeamsStarter
) {
if (this.isSponsoredSubscription) {