From 28e828745194bd0ea3aad589b52776c255832a47 Mon Sep 17 00:00:00 2001 From: Conner Turnbull <133619638+cturnbull-bitwarden@users.noreply.github.com> Date: Fri, 19 Apr 2024 13:15:35 -0400 Subject: [PATCH] Updated missing logic for 2023 plans (#4000) --- .../Views/Shared/_OrganizationFormScripts.cshtml | 5 +++++ src/Billing/Controllers/FreshsalesController.cs | 5 +++++ src/Core/Models/Business/SubscriptionUpdate.cs | 1 + 3 files changed, 11 insertions(+) diff --git a/src/Admin/AdminConsole/Views/Shared/_OrganizationFormScripts.cshtml b/src/Admin/AdminConsole/Views/Shared/_OrganizationFormScripts.cshtml index a84cf92c6a..5095d62c5b 100644 --- a/src/Admin/AdminConsole/Views/Shared/_OrganizationFormScripts.cshtml +++ b/src/Admin/AdminConsole/Views/Shared/_OrganizationFormScripts.cshtml @@ -57,8 +57,11 @@ case '@((byte)PlanType.TeamsAnnually2019)': case '@((byte)PlanType.TeamsMonthly2020)': case '@((byte)PlanType.TeamsAnnually2020)': + case '@((byte)PlanType.TeamsMonthly2023)': + case '@((byte)PlanType.TeamsAnnually2023)': case '@((byte)PlanType.TeamsMonthly)': case '@((byte)PlanType.TeamsAnnually)': + case '@((byte)PlanType.TeamsStarter2023)': case '@((byte)PlanType.TeamsStarter)': document.getElementById('@(nameof(Model.UsePolicies))').checked = false; document.getElementById('@(nameof(Model.UseSso))').checked = false; @@ -79,6 +82,8 @@ case '@((byte)PlanType.EnterpriseAnnually2019)': case '@((byte)PlanType.EnterpriseMonthly2020)': case '@((byte)PlanType.EnterpriseAnnually2020)': + case '@((byte)PlanType.EnterpriseMonthly2023)': + case '@((byte)PlanType.EnterpriseAnnually2023)': case '@((byte)PlanType.EnterpriseMonthly)': case '@((byte)PlanType.EnterpriseAnnually)': document.getElementById('@(nameof(Model.UsePolicies))').checked = true; diff --git a/src/Billing/Controllers/FreshsalesController.cs b/src/Billing/Controllers/FreshsalesController.cs index 7ce7565fca..72d8de5e54 100644 --- a/src/Billing/Controllers/FreshsalesController.cs +++ b/src/Billing/Controllers/FreshsalesController.cs @@ -159,18 +159,23 @@ public class FreshsalesController : Controller planName = "Families"; return true; case PlanType.TeamsAnnually: + case PlanType.TeamsAnnually2023: case PlanType.TeamsAnnually2020: case PlanType.TeamsAnnually2019: case PlanType.TeamsMonthly: + case PlanType.TeamsMonthly2023: case PlanType.TeamsMonthly2020: case PlanType.TeamsMonthly2019: case PlanType.TeamsStarter: + case PlanType.TeamsStarter2023: planName = "Teams"; return true; case PlanType.EnterpriseAnnually: + case PlanType.EnterpriseAnnually2023: case PlanType.EnterpriseAnnually2020: case PlanType.EnterpriseAnnually2019: case PlanType.EnterpriseMonthly: + case PlanType.EnterpriseMonthly2023: case PlanType.EnterpriseMonthly2020: case PlanType.EnterpriseMonthly2019: planName = "Enterprise"; diff --git a/src/Core/Models/Business/SubscriptionUpdate.cs b/src/Core/Models/Business/SubscriptionUpdate.cs index bba9d384d2..011444e9a1 100644 --- a/src/Core/Models/Business/SubscriptionUpdate.cs +++ b/src/Core/Models/Business/SubscriptionUpdate.cs @@ -48,5 +48,6 @@ public abstract class SubscriptionUpdate => plan.Type is >= PlanType.FamiliesAnnually2019 and <= PlanType.EnterpriseAnnually2019 or PlanType.FamiliesAnnually + or PlanType.TeamsStarter2023 or PlanType.TeamsStarter; }