From 4066022e18da5deba1a6acd9f888f65bdc288352 Mon Sep 17 00:00:00 2001 From: cyprain-okeke <108260115+cyprain-okeke@users.noreply.github.com> Date: Tue, 21 Jan 2025 16:01:48 +0100 Subject: [PATCH] make the pricing breakdown to show properly (#12982) --- .../change-plan-dialog.component.html | 38 +++++++++---------- .../change-plan-dialog.component.ts | 3 ++ 2 files changed, 22 insertions(+), 19 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 89c0075ba0d..96679ea1753 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 @@ -130,7 +130,7 @@ : selectableProduct.PasswordManager.seatPrice ) | currency: "$" }} - /{{ "month" | i18n }} + /{{ selectedPlanInterval | i18n }} @@ -400,7 +400,7 @@ : selectedPlan.PasswordManager.basePrice ) | currency: "$" }} - /{{ "year" | i18n }} + /{{ selectedPlanInterval | i18n }} @@ -427,7 +427,7 @@ {{ "members" | i18n }} × {{ selectedPlan.PasswordManager.seatPrice | currency: "$" }} - /{{ "year" | i18n }} + /{{ selectedPlanInterval | i18n }} @@ -444,7 +444,7 @@ {{ "additionalStorageGbMessage" | i18n }} × {{ additionalStoragePriceMonthly(selectedPlan) | currency: "$" }} - /{{ "year" | i18n }} + /{{ selectedPlanInterval | i18n }} {{ additionalStorageTotal(selectedPlan) | currency: "$" }}

@@ -485,7 +485,7 @@ : selectedPlan.SecretsManager.basePrice ) | currency: "$" }} - /{{ "year" | i18n }} + /{{ selectedPlanInterval | i18n }}

{{ "members" | i18n }} × {{ selectedPlan.SecretsManager.seatPrice | currency: "$" }} - /{{ "year" | i18n }} + /{{ selectedPlanInterval | i18n }} @@ -524,7 +524,7 @@ {{ "serviceAccounts" | i18n | lowercase }} × {{ selectedPlan?.SecretsManager?.additionalPricePerServiceAccount | currency: "$" }} - /{{ "year" | i18n }} + /{{ selectedPlanInterval | i18n }} {{ additionalServiceAccountTotal(selectedPlan) | currency: "$" }}

@@ -580,7 +580,7 @@ {{ "members" | i18n }} × {{ selectedPlan.PasswordManager.seatPrice | currency: "$" }} - /{{ "month" | i18n }} + /{{ selectedPlanInterval | i18n }} {{ passwordManagerSeatTotal(selectedPlan) | currency: "$" }} @@ -596,7 +596,7 @@ {{ "additionalStorageGbMessage" | i18n }} × {{ additionalStoragePriceMonthly(selectedPlan) | currency: "$" }} - /{{ "month" | i18n }} + /{{ selectedPlanInterval | i18n }} {{ storageGb * selectedPlan.PasswordManager.additionalStoragePricePerGb | currency: "$" @@ -656,7 +656,7 @@ {{ "members" | i18n }} × {{ selectedPlan.SecretsManager.seatPrice | currency: "$" }} - /{{ "month" | i18n }} + /{{ selectedPlanInterval | i18n }} {{ secretsManagerSeatTotal(selectedPlan, sub?.smSeats) | currency: "$" }} @@ -675,7 +675,7 @@ {{ "serviceAccounts" | i18n | lowercase }} × {{ selectedPlan.SecretsManager.additionalPricePerServiceAccount | currency: "$" }} - /{{ "month" | i18n }} + /{{ selectedPlanInterval | i18n }} {{ additionalServiceAccountTotal(selectedPlan) | currency: "$" }}

@@ -725,7 +725,7 @@ : selectedPlan.SecretsManager.basePrice ) | currency: "$" }} - /{{ "year" | i18n }} + /{{ selectedPlanInterval | i18n }}

{{ "members" | i18n }} × {{ selectedPlan.SecretsManager.seatPrice | currency: "$" }} - /{{ "year" | i18n }} + /{{ selectedPlanInterval | i18n }} @@ -764,7 +764,7 @@ {{ "serviceAccounts" | i18n }} × {{ selectedPlan.SecretsManager.additionalPricePerServiceAccount | currency: "$" }} - /{{ "year" | i18n }} + /{{ selectedPlanInterval | i18n }} {{ additionalServiceAccountTotal(selectedPlan) | currency: "$" }}

@@ -786,7 +786,7 @@ : selectedPlan.PasswordManager.basePrice ) | currency: "$" }} - /{{ "year" | i18n }} + /{{ selectedPlanInterval | i18n }} @@ -813,7 +813,7 @@ {{ "members" | i18n }} × {{ selectedPlan.PasswordManager.seatPrice | currency: "$" }} - /{{ "year" | i18n }} + /{{ selectedPlanInterval | i18n }} @@ -860,7 +860,7 @@ {{ "members" | i18n }} × {{ selectedPlan.SecretsManager.seatPrice | currency: "$" }} - /{{ "month" | i18n }} + /{{ selectedPlanInterval | i18n }} {{ secretsManagerSeatTotal(selectedPlan, sub?.smSeats) | currency: "$" }} @@ -879,7 +879,7 @@ {{ "serviceAccounts" | i18n }} × {{ selectedPlan.SecretsManager.additionalPricePerServiceAccount | currency: "$" }} - /{{ "month" | i18n }} + /{{ selectedPlanInterval | i18n }} {{ additionalServiceAccountTotal(selectedPlan) | currency: "$" }}

@@ -914,7 +914,7 @@ {{ "members" | i18n }} × {{ selectedPlan.PasswordManager.seatPrice | currency: "$" }} - /{{ "month" | i18n }} + /{{ selectedPlanInterval | i18n }} {{ "freeForOneYear" | i18n }} diff --git a/apps/web/src/app/billing/organizations/change-plan-dialog.component.ts b/apps/web/src/app/billing/organizations/change-plan-dialog.component.ts index 73577c7b002..4e850edfb0e 100644 --- a/apps/web/src/app/billing/organizations/change-plan-dialog.component.ts +++ b/apps/web/src/app/billing/organizations/change-plan-dialog.component.ts @@ -485,6 +485,9 @@ export class ChangePlanDialogComponent implements OnInit, OnDestroy { } get selectedPlanInterval() { + if (this.isSubscriptionCanceled) { + return this.currentPlan.isAnnual ? "year" : "month"; + } return this.selectedPlan.isAnnual ? "year" : "month"; }