mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-22 11:45:59 +01:00
SM changes (#8531)
This commit is contained in:
parent
0c291bf79b
commit
18ae698f8d
@ -47,7 +47,11 @@ interface OnSuccessArgs {
|
|||||||
organizationId: string;
|
organizationId: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
const Allowed2020PlanTypes = [
|
const AllowedLegacyPlanTypes = [
|
||||||
|
PlanType.TeamsMonthly2023,
|
||||||
|
PlanType.TeamsAnnually2023,
|
||||||
|
PlanType.EnterpriseAnnually2023,
|
||||||
|
PlanType.EnterpriseMonthly2023,
|
||||||
PlanType.TeamsMonthly2020,
|
PlanType.TeamsMonthly2020,
|
||||||
PlanType.TeamsAnnually2020,
|
PlanType.TeamsAnnually2020,
|
||||||
PlanType.EnterpriseAnnually2020,
|
PlanType.EnterpriseAnnually2020,
|
||||||
@ -278,7 +282,7 @@ export class OrganizationPlansComponent implements OnInit, OnDestroy {
|
|||||||
(!this.currentPlan || this.currentPlan.upgradeSortOrder < plan.upgradeSortOrder) &&
|
(!this.currentPlan || this.currentPlan.upgradeSortOrder < plan.upgradeSortOrder) &&
|
||||||
(!this.hasProvider || plan.product !== ProductType.TeamsStarter) &&
|
(!this.hasProvider || plan.product !== ProductType.TeamsStarter) &&
|
||||||
((!this.isProviderQualifiedFor2020Plan() && this.planIsEnabled(plan)) ||
|
((!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);
|
result.sort((planA, planB) => planA.displaySortOrder - planB.displaySortOrder);
|
||||||
@ -293,7 +297,7 @@ export class OrganizationPlansComponent implements OnInit, OnDestroy {
|
|||||||
(plan) =>
|
(plan) =>
|
||||||
plan.product === selectedProductType &&
|
plan.product === selectedProductType &&
|
||||||
((!this.isProviderQualifiedFor2020Plan() && this.planIsEnabled(plan)) ||
|
((!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);
|
result.sort((planA, planB) => planA.displaySortOrder - planB.displaySortOrder);
|
||||||
|
@ -241,6 +241,8 @@ export class OrganizationSubscriptionCloudComponent implements OnInit, OnDestroy
|
|||||||
return (
|
return (
|
||||||
this.sub.planType === PlanType.EnterpriseAnnually ||
|
this.sub.planType === PlanType.EnterpriseAnnually ||
|
||||||
this.sub.planType === PlanType.EnterpriseMonthly ||
|
this.sub.planType === PlanType.EnterpriseMonthly ||
|
||||||
|
this.sub.planType === PlanType.EnterpriseAnnually2023 ||
|
||||||
|
this.sub.planType === PlanType.EnterpriseMonthly2023 ||
|
||||||
this.sub.planType === PlanType.EnterpriseAnnually2020 ||
|
this.sub.planType === PlanType.EnterpriseAnnually2020 ||
|
||||||
this.sub.planType === PlanType.EnterpriseMonthly2020 ||
|
this.sub.planType === PlanType.EnterpriseMonthly2020 ||
|
||||||
this.sub.planType === PlanType.EnterpriseAnnually2019 ||
|
this.sub.planType === PlanType.EnterpriseAnnually2019 ||
|
||||||
@ -254,6 +256,7 @@ export class OrganizationSubscriptionCloudComponent implements OnInit, OnDestroy
|
|||||||
} else if (
|
} else if (
|
||||||
this.sub.planType === PlanType.FamiliesAnnually ||
|
this.sub.planType === PlanType.FamiliesAnnually ||
|
||||||
this.sub.planType === PlanType.FamiliesAnnually2019 ||
|
this.sub.planType === PlanType.FamiliesAnnually2019 ||
|
||||||
|
this.sub.planType === PlanType.TeamsStarter2023 ||
|
||||||
this.sub.planType === PlanType.TeamsStarter
|
this.sub.planType === PlanType.TeamsStarter
|
||||||
) {
|
) {
|
||||||
if (this.isSponsoredSubscription) {
|
if (this.isSponsoredSubscription) {
|
||||||
|
@ -29,6 +29,7 @@ const DisallowedPlanTypes = [
|
|||||||
PlanType.Free,
|
PlanType.Free,
|
||||||
PlanType.FamiliesAnnually2019,
|
PlanType.FamiliesAnnually2019,
|
||||||
PlanType.FamiliesAnnually,
|
PlanType.FamiliesAnnually,
|
||||||
|
PlanType.TeamsStarter2023,
|
||||||
PlanType.TeamsStarter,
|
PlanType.TeamsStarter,
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -11,9 +11,14 @@ export enum PlanType {
|
|||||||
TeamsAnnually2020 = 9,
|
TeamsAnnually2020 = 9,
|
||||||
EnterpriseMonthly2020 = 10,
|
EnterpriseMonthly2020 = 10,
|
||||||
EnterpriseAnnually2020 = 11,
|
EnterpriseAnnually2020 = 11,
|
||||||
TeamsMonthly = 12,
|
TeamsMonthly2023 = 12,
|
||||||
TeamsAnnually = 13,
|
TeamsAnnually2023 = 13,
|
||||||
EnterpriseMonthly = 14,
|
EnterpriseMonthly2023 = 14,
|
||||||
EnterpriseAnnually = 15,
|
EnterpriseAnnually2023 = 15,
|
||||||
TeamsStarter = 16,
|
TeamsStarter2023 = 16,
|
||||||
|
TeamsMonthly = 17,
|
||||||
|
TeamsAnnually = 18,
|
||||||
|
EnterpriseMonthly = 19,
|
||||||
|
EnterpriseAnnually = 20,
|
||||||
|
TeamsStarter = 21,
|
||||||
}
|
}
|
||||||
|
@ -81,6 +81,7 @@ export class OrganizationBillingService implements OrganizationBillingServiceAbs
|
|||||||
case PlanType.Free:
|
case PlanType.Free:
|
||||||
case PlanType.FamiliesAnnually:
|
case PlanType.FamiliesAnnually:
|
||||||
case PlanType.FamiliesAnnually2019:
|
case PlanType.FamiliesAnnually2019:
|
||||||
|
case PlanType.TeamsStarter2023:
|
||||||
case PlanType.TeamsStarter:
|
case PlanType.TeamsStarter:
|
||||||
return true;
|
return true;
|
||||||
default:
|
default:
|
||||||
|
Loading…
Reference in New Issue
Block a user