1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-12-21 16:18:28 +01:00

Removed 2023 plans for view for grandfathered 2020 providers (#8804)

This commit is contained in:
Conner Turnbull 2024-04-19 13:15:30 -04:00 committed by GitHub
parent 1e67014158
commit ddee74fdee
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -48,11 +48,7 @@ interface OnSuccessArgs {
organizationId: string;
}
const AllowedLegacyPlanTypes = [
PlanType.TeamsMonthly2023,
PlanType.TeamsAnnually2023,
PlanType.EnterpriseAnnually2023,
PlanType.EnterpriseMonthly2023,
const Allowed2020PlansForLegacyProviders = [
PlanType.TeamsMonthly2020,
PlanType.TeamsAnnually2020,
PlanType.EnterpriseAnnually2020,
@ -283,7 +279,8 @@ 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() && AllowedLegacyPlanTypes.includes(plan.type))),
(this.isProviderQualifiedFor2020Plan() &&
Allowed2020PlansForLegacyProviders.includes(plan.type))),
);
result.sort((planA, planB) => planA.displaySortOrder - planB.displaySortOrder);
@ -298,7 +295,8 @@ export class OrganizationPlansComponent implements OnInit, OnDestroy {
(plan) =>
plan.product === selectedProductType &&
((!this.isProviderQualifiedFor2020Plan() && this.planIsEnabled(plan)) ||
(this.isProviderQualifiedFor2020Plan() && AllowedLegacyPlanTypes.includes(plan.type))),
(this.isProviderQualifiedFor2020Plan() &&
Allowed2020PlansForLegacyProviders.includes(plan.type))),
) || [];
result.sort((planA, planB) => planA.displaySortOrder - planB.displaySortOrder);