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
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
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) {

View File

@ -29,6 +29,7 @@ const DisallowedPlanTypes = [
PlanType.Free,
PlanType.FamiliesAnnually2019,
PlanType.FamiliesAnnually,
PlanType.TeamsStarter2023,
PlanType.TeamsStarter,
];

View File

@ -11,9 +11,14 @@ export enum PlanType {
TeamsAnnually2020 = 9,
EnterpriseMonthly2020 = 10,
EnterpriseAnnually2020 = 11,
TeamsMonthly = 12,
TeamsAnnually = 13,
EnterpriseMonthly = 14,
EnterpriseAnnually = 15,
TeamsStarter = 16,
TeamsMonthly2023 = 12,
TeamsAnnually2023 = 13,
EnterpriseMonthly2023 = 14,
EnterpriseAnnually2023 = 15,
TeamsStarter2023 = 16,
TeamsMonthly = 17,
TeamsAnnually = 18,
EnterpriseMonthly = 19,
EnterpriseAnnually = 20,
TeamsStarter = 21,
}

View File

@ -81,6 +81,7 @@ export class OrganizationBillingService implements OrganizationBillingServiceAbs
case PlanType.Free:
case PlanType.FamiliesAnnually:
case PlanType.FamiliesAnnually2019:
case PlanType.TeamsStarter2023:
case PlanType.TeamsStarter:
return true;
default: