From 0d75b71ea9d593fca6d83cb67c042e819f5eb5db Mon Sep 17 00:00:00 2001 From: cyprain-okeke <108260115+cyprain-okeke@users.noreply.github.com> Date: Fri, 23 Aug 2024 16:45:03 +0100 Subject: [PATCH] [AC-2708][AC-2712][AC-2713] upgrading from a Organizations new design changes (#10662) * Changes base on the new design * changes base on the new design * Fix the family plan summary issue --- .../change-plan-dialog.component.html | 630 +++++++++++++++--- .../change-plan-dialog.component.ts | 207 ++++-- apps/web/src/locales/en/messages.json | 51 ++ 3 files changed, 745 insertions(+), 143 deletions(-) diff --git a/apps/web/src/app/billing/organizations/change-plan-dialog.component.html b/apps/web/src/app/billing/organizations/change-plan-dialog.component.html index 0ca913a3b7..96bf6c43a3 100644 --- a/apps/web/src/app/billing/organizations/change-plan-dialog.component.html +++ b/apps/web/src/app/billing/organizations/change-plan-dialog.component.html @@ -5,40 +5,40 @@

{{ "upgradePlan" | i18n }}

-
+
{{ "selectAPlan" | i18n }} - - + {{ + "upgradeDiscount" + | i18n + : (this.discountPercentageFromSub > 0 + ? discountPercentageFromSub + : this.discountPercentage) + }} - - - {{ planInterval.name }} {{ - "upgradeDiscount" - | i18n - : (this.discountPercentageFromSub > 0 - ? discountPercentageFromSub - : this.discountPercentage) - }} + - - + + {{ planInterval.name }} + + +
+
-
- {{ "selected" | i18n }} -
-

- {{ selectableProduct.nameLocalizationKey | i18n }} +

+ {{ + selectableProduct.nameLocalizationKey | i18n + }} + + {{ "current" | i18n }}

+

+ {{ "bitwardenPasswordManager" | i18n }} +

{{ "upgradeEnterpriseMessage" | i18n }}

-

{{ "includeAllTeamsFeatures" | i18n }}

-
    -
  • + +
      +
    • + {{ "includeEnterprisePolicies" | i18n }}
    • -
    • - {{ "includeSsoAuthenticationMessage" | i18n }} +
    • + + {{ "passwordLessSso" | i18n }} +
    • +
    • + + {{ "accountRecovery" | i18n }} +
    • +
    • + + {{ "customRoles" | i18n }} +
    • +
    + +

    + {{ "bitwardenSecretsManager" | i18n }} +

    +
      +
    • + + {{ "unlimitedSecretsStorage" | i18n }} +
    • +
    • + + {{ "unlimitedUsers" | i18n }} +
    • +
    • + + {{ "unlimitedProjects" | i18n }} +
    • +
    • + + {{ "UpTo50MachineAccounts" | i18n }}
    • -
    • {{ "optionalOnPremHosting" | i18n }}
    @@ -153,6 +186,12 @@
+

+ {{ "bitwardenPasswordManager" | i18n }} +

{{ "upgradeFamilyMessage" | i18n }}

-
    -
  • - {{ "limitedUsers" | i18n: selectableProduct.PasswordManager.maxSeats }} +
      +
    • + + {{ "premiumAccounts" | i18n }}
    • -
    • - {{ "teamsInviteMessage" | i18n }} +
    • + + {{ "unlimitedSharing" | i18n }}
    • -
    • - {{ - "chooseMonthlyOrAnnualBilling" - | i18n: selectableProduct.PasswordManager.maxCollections - }} +
    • + + {{ "unlimitedCollections" | i18n }}
    • -
    • - {{ "createUnlimitedCollections" | i18n }} +
    +
      +
    • + + {{ "secureDataSharing" | i18n }}
    • -
    • - {{ "accessToCreateGroups" | i18n }} +
    • + + {{ "eventLogMonitoring" | i18n }}
    • -
    • - {{ "syncGroupsAndUsersFromDirectory" | i18n }} +
    • + + {{ "directoryIntegration" | i18n }}
    • -
    • - {{ "accessToPremiumFeatures" | i18n }} +
    +

    + {{ "bitwardenSecretsManager" | i18n }} +

    +
      +
    • + + {{ "unlimitedSecretsStorage" | i18n }}
    • -
    • - {{ "priorityCustomerSupport" | i18n }} +
    • + + {{ "unlimitedProjects" | i18n }}
    • -
    • - {{ "optionalOnPremHosting" | i18n }} +
    • + + {{ "UpTo20MachineAccounts" | i18n }}
+
+ + {{ "secretsManagerSubInfo" | i18n }} + + + {{ "secretsManagerWithFreePasswordManagerInfo" | i18n }} + +
-

{{ "paymentMethod" | i18n }}

@@ -237,16 +322,327 @@ >

- -
+ +
+

+ {{ "passwordManager" | i18n }} +

+

+ + {{ passwordManagerSeats }} + {{ "members" | i18n }} × + {{ + (selectedPlan.isAnnual + ? selectedPlan.PasswordManager.basePrice / 12 + : selectedPlan.PasswordManager.basePrice + ) | currency: "$" + }} + /{{ "year" | i18n }} + + + + {{ + selectedPlan.PasswordManager.basePrice | currency: "$" + }} + {{ "freeWithSponsorship" | i18n }} + + + {{ selectedPlan.PasswordManager.basePrice | currency: "$" }} + + +

+

+ + {{ "additionalUsers" | i18n }}: + {{ passwordManagerSeats || 0 }}  + {{ "members" | i18n }} + × + {{ selectedPlan.PasswordManager.seatPrice | currency: "$" }} + /{{ "year" | i18n }} + + + + {{ passwordManagerSeatTotal(selectedPlan) | currency: "$" }} + +

+

+ + {{ 0 }} + {{ "additionalStorageGbMessage" | i18n }} + × + {{ selectedPlan.PasswordManager.additionalStoragePricePerGb | currency: "$" }} + /{{ "year" | i18n }} + + {{ 0 | currency: "$" }} +

+ +

+ {{ "secretsManager" | i18n }} +

+

+ + {{ sub?.smSeats }} + {{ "members" | i18n }} × + {{ + (selectedPlan.isAnnual + ? selectedPlan.SecretsManager.basePrice / 12 + : selectedPlan.SecretsManager.basePrice + ) | currency: "$" + }} + /{{ "year" | i18n }} + +

+

+ + {{ "additionalUsers" | i18n }}: + {{ sub?.smSeats || 0 }}  + {{ "members" | i18n }} + × + {{ selectedPlan.SecretsManager.seatPrice | currency: "$" }} + /{{ "year" | i18n }} + + + + {{ secretsManagerSeatTotal(selectedPlan, sub.smSeats) | currency: "$" }} + +

+

+ + {{ additionalServiceAccount }} + {{ "additionalStorageGbMessage" | i18n }} + × + {{ selectedPlan?.SecretsManager?.additionalPricePerServiceAccount | currency: "$" }} + /{{ "month" | i18n }} + + {{ additionalServiceAccountTotal(selectedPlan) | currency: "$" }} +

+
+ +

+ {{ "passwordManager" | i18n }} +

- {{ selectedPlan.PasswordManager.baseSeats }} + {{ "basePrice" | i18n }}: + {{ selectedPlan.PasswordManager.basePrice | currency: "$" }} + {{ "monthAbbr" | i18n }} + + + {{ selectedPlan.PasswordManager.basePrice | currency: "$" }} + +

+

+ + {{ "additionalUsers" | i18n }}: + {{ passwordManagerSeats }}  + {{ "members" | i18n }} + × + {{ selectedPlan.PasswordManager.seatPrice | currency: "$" }} + /{{ "month" | i18n }} + + + {{ passwordManagerSeatTotal(selectedPlan) | currency: "$" }} + +

+

+ + {{ 0 }} + {{ "additionalStorageGbMessage" | i18n }} + × + {{ selectedPlan.PasswordManager.additionalStoragePricePerGb | currency: "$" }} + /{{ "month" | i18n }} + + {{ 0 | currency: "$" }} +

+ +

+ {{ "secretsManager" | i18n }} +

+

+ + {{ "basePrice" | i18n }}: + {{ selectedPlan.SecretsManager.basePrice | currency: "$" }} + {{ "monthAbbr" | i18n }} + + + {{ selectedPlan.SecretsManager.basePrice | currency: "$" }} + +

+

+ + {{ "additionalUsers" | i18n }}: + {{ sub?.smSeats }}  + {{ "members" | i18n }} + × + {{ selectedPlan.SecretsManager.seatPrice | currency: "$" }} + /{{ "month" | i18n }} + + + {{ secretsManagerSeatTotal(selectedPlan, sub?.smSeats) | currency: "$" }} + +

+

+ + {{ additionalServiceAccount }} + {{ "additionalStorageGbMessage" | i18n }} + × + {{ selectedPlan.SecretsManager.additionalPricePerServiceAccount | currency: "$" }} + /{{ "month" | i18n }} + + {{ additionalServiceAccountTotal(selectedPlan) | currency: "$" }} +

+
+
+ +
+ + +

+ {{ "secretsManager" | i18n }} +

+

+ + {{ sub?.smSeats }} + {{ "members" | i18n }} × + {{ + (selectedPlan.isAnnual + ? selectedPlan.SecretsManager.basePrice / 12 + : selectedPlan.SecretsManager.basePrice + ) | currency: "$" + }} + /{{ "year" | i18n }} + +

+

+ + {{ "additionalUsers" | i18n }}: + {{ sub?.smSeats || 0 }}  + {{ "members" | i18n }} + × + {{ selectedPlan.SecretsManager.seatPrice | currency: "$" }} + /{{ "year" | i18n }} + + + + {{ secretsManagerSeatTotal(selectedPlan, sub.smSeats) | currency: "$" }} + +

+

+ + {{ additionalServiceAccount }} + {{ "additionalStorageGbMessage" | i18n }} + × + {{ selectedPlan.SecretsManager.additionalPricePerServiceAccount | currency: "$" }} + /{{ "month" | i18n }} + + {{ additionalServiceAccountTotal(selectedPlan) | currency: "$" }} +

+ +

+ {{ "passwordManager" | i18n }} +

+

+ + {{ organization.seats }} {{ "members" | i18n }} × {{ (selectedPlan.isAnnual @@ -284,26 +680,77 @@ /{{ "year" | i18n }} - + + {{ "freeForOneYear" | i18n }} + + + {{ passwordManagerSeatTotal(selectedPlan) | currency: "$" }}

+
+ + +

+ {{ "secretsManager" | i18n }} +

+

+ + {{ "basePrice" | i18n }}: + {{ selectedPlan.SecretsManager.basePrice | currency: "$" }} + {{ "monthAbbr" | i18n }} + + + {{ selectedPlan.SecretsManager.basePrice | currency: "$" }} + +

- {{ 0 }} + {{ "additionalUsers" | i18n }}: + {{ sub?.smSeats }}  + {{ "members" | i18n }} + × + {{ selectedPlan.SecretsManager.seatPrice | currency: "$" }} + /{{ "month" | i18n }} + + + {{ secretsManagerSeatTotal(selectedPlan, sub?.smSeats) | currency: "$" }} + +

+

+ + {{ additionalServiceAccount }} {{ "additionalStorageGbMessage" | i18n }} × - {{ selectedPlan.PasswordManager.additionalStoragePricePerGb | currency: "$" }} - /{{ "year" | i18n }} + {{ selectedPlan.SecretsManager.additionalPricePerServiceAccount | currency: "$" }} + /{{ "month" | i18n }} - {{ 0 | currency: "$" }} + {{ additionalServiceAccountTotal(selectedPlan) | currency: "$" }} +

+ +

+ {{ "passwordManager" | i18n }}

-
-

{{ "additionalUsers" | i18n }}: - {{ formGroup.controls["additionalSeats"].value || 0 }}  + {{ organization.seats }}  {{ "members" | i18n }} × {{ selectedPlan.PasswordManager.seatPrice | currency: "$" }} /{{ "month" | i18n }} - + + {{ "freeForOneYear" | i18n }} + + + {{ passwordManagerSeatTotal(selectedPlan) | currency: "$" }}

-

- - {{ 0 }} - {{ "additionalStorageGbMessage" | i18n }} - × - {{ selectedPlan.PasswordManager.additionalStoragePricePerGb | currency: "$" }} - /{{ "month" | i18n }} - - {{ 0 | currency: "$" }} -

-