From 9f5226f8a6e71f4aaa6348306c912b238841dc8e Mon Sep 17 00:00:00 2001
From: Conner Turnbull <133619638+cturnbull-bitwarden@users.noreply.github.com>
Date: Fri, 3 Nov 2023 18:32:44 -0400
Subject: [PATCH] [AC-1708] Teams Starter Plan (#6740)
* Added support for the teams starter plan
* Plans now respect display sort order. Updated teams starter to be in its own product
* Remove upgrade button and show new copy instead -- wip copy
* Added upgrade dialog for teams starter plan when adding an 11th user
* Updated the add user validator to check if plan is teams starter. Updated to not count duplicated emails in the overall count
* Renamed validator to be more descriptive and added additional unit tests
* Added validator for org types that require customer support to upgrade
* Updated small localization for teams plan to account for new starter plan
* Removed invalid tests
* Resolved issues around free trial flow for teams starter
* Added new layout for teams starter free trial flow
* Updated copy following demo. Resolved display issues discovered during demo
* Removed temporary copy for testing
* Updated the second step of free trial flow to use org display name
* Updated invite user modal to display 10 instead of 20 as the invite limit for Teams Starter
---------
Co-authored-by: cyprain-okeke <108260115+cyprain-okeke@users.noreply.github.com>
---
.../member-dialog.component.html | 5 +-
.../member-dialog/member-dialog.component.ts | 19 ++-
...ached-with-upgrade-path.validator.spec.ts} | 41 +++++--
...it-reached-with-upgrade-path.validator.ts} | 26 +++--
...-reached-without-upgrade-path.validator.ts | 45 ++++++++
.../organizations/members/people.component.ts | 108 +++++++++++++-----
.../settings/create-organization.component.ts | 3 +
.../content/teams3-content.component.html | 18 +++
.../content/teams3-content.component.ts | 7 ++
.../trial-initiation.component.html | 3 +-
.../trial-initiation.component.ts | 18 ++-
.../trial-initiation.module.ts | 2 +
.../trial-initiation/billing.component.html | 4 +-
.../trial-initiation/billing.component.ts | 4 +-
.../organizations/change-plan.component.html | 1 +
.../organizations/change-plan.component.ts | 1 +
.../organization-plans.component.html | 68 ++++++++---
.../organization-plans.component.ts | 66 +++++++----
...nization-subscription-cloud.component.html | 3 +-
...ganization-subscription-cloud.component.ts | 11 +-
.../billing/shared/sm-subscribe.component.ts | 1 +
apps/web/src/locales/en/messages.json | 48 ++++++++
.../src/billing/enums/plan-type.enum.ts | 13 ++-
.../billing/models/response/plan.response.ts | 2 +-
libs/common/src/enums/product-type.enum.ts | 1 +
25 files changed, 417 insertions(+), 101 deletions(-)
rename apps/web/src/app/admin-console/organizations/members/components/member-dialog/validators/{free-org-inv-limit-reached.validator.spec.ts => org-without-additional-seat-limit-reached-with-upgrade-path.validator.spec.ts} (66%)
rename apps/web/src/app/admin-console/organizations/members/components/member-dialog/validators/{free-org-inv-limit-reached.validator.ts => org-without-additional-seat-limit-reached-with-upgrade-path.validator.ts} (63%)
create mode 100644 apps/web/src/app/admin-console/organizations/members/components/member-dialog/validators/org-without-additional-seat-limit-reached-without-upgrade-path.validator.ts
create mode 100644 apps/web/src/app/auth/trial-initiation/content/teams3-content.component.html
create mode 100644 apps/web/src/app/auth/trial-initiation/content/teams3-content.component.ts
diff --git a/apps/web/src/app/admin-console/organizations/members/components/member-dialog/member-dialog.component.html b/apps/web/src/app/admin-console/organizations/members/components/member-dialog/member-dialog.component.html
index 34d407e7b23..1c718372af6 100644
--- a/apps/web/src/app/admin-console/organizations/members/components/member-dialog/member-dialog.component.html
+++ b/apps/web/src/app/admin-console/organizations/members/components/member-dialog/member-dialog.component.html
@@ -23,7 +23,10 @@
{{ "email" | i18n }}
- {{ "inviteMultipleEmailDesc" | i18n : "20" }}
+ {{
+ "inviteMultipleEmailDesc"
+ | i18n : (organization.planProductType === ProductType.TeamsStarter ? "10" : "20")
+ }}