From 92cb61bdf52c017351ee8bd298795c3cc87d01cf Mon Sep 17 00:00:00 2001 From: Jonas Hendrickx Date: Tue, 14 Jan 2025 10:37:05 +0100 Subject: [PATCH] [PM-16921] Fix cadence label for line item --- .../subscription/provider-subscription.component.html | 2 +- .../providers/subscription/provider-subscription.component.ts | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/bitwarden_license/bit-web/src/app/billing/providers/subscription/provider-subscription.component.html b/bitwarden_license/bit-web/src/app/billing/providers/subscription/provider-subscription.component.html index 5102dd45d91..72f743d2cc7 100644 --- a/bitwarden_license/bit-web/src/app/billing/providers/subscription/provider-subscription.component.html +++ b/bitwarden_license/bit-web/src/app/billing/providers/subscription/provider-subscription.component.html @@ -25,7 +25,7 @@ {{ getFormattedPlanName(i.planName) }} {{ "orgSeats" | i18n }} ({{ - i.cadence.toLowerCase() + getFormattedPlanNameCadence(i.cadence) | i18n }}) {{ "×" }}{{ getFormattedSeatCount(i.seatMinimum, i.purchasedSeats) }} @ {{ diff --git a/bitwarden_license/bit-web/src/app/billing/providers/subscription/provider-subscription.component.ts b/bitwarden_license/bit-web/src/app/billing/providers/subscription/provider-subscription.component.ts index 1d366fb862e..02fa29578d9 100644 --- a/bitwarden_license/bit-web/src/app/billing/providers/subscription/provider-subscription.component.ts +++ b/bitwarden_license/bit-web/src/app/billing/providers/subscription/provider-subscription.component.ts @@ -90,6 +90,10 @@ export class ProviderSubscriptionComponent implements OnInit, OnDestroy { return totalSeats > 1 ? totalSeats.toString() : ""; } + protected getFormattedPlanNameCadence(cadence: string) { + return cadence === "Annual" ? "annually" : "monthly"; + } + private sumCost(plans: ProviderPlanResponse[]): number { return plans.reduce((acc, plan) => acc + plan.cost, 0); }