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 02071f5aa8..1c92cbf663 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 @@ -389,17 +389,21 @@ bitTypography="body2" *ngIf=" selectedPlan.PasswordManager.hasAdditionalStorageOption && - !organization.useSecretsManager + !organization.useSecretsManager && + organization.maxStorageGb > 0 " > - {{ 0 }} + {{ organization.maxStorageGb }} {{ "additionalStorageGbMessage" | i18n }} × - {{ selectedPlan.PasswordManager.additionalStoragePricePerGb | currency: "$" }} + {{ additionalStoragePriceMonthly(selectedPlan) | currency: "$" }} /{{ "year" | i18n }} - {{ 0 | currency: "$" }} + {{ + organization.maxStorageGb * selectedPlan.PasswordManager.additionalStoragePricePerGb + | currency: "$" + }}
@@ -505,17 +509,21 @@ bitTypography="body2" *ngIf=" selectedPlan.PasswordManager.hasAdditionalStorageOption && - !organization.useSecretsManager + !organization.useSecretsManager && + organization.maxStorageGb > 0 " > - {{ 0 }} + {{ organization.maxStorageGb }} {{ "additionalStorageGbMessage" | i18n }} × - {{ selectedPlan.PasswordManager.additionalStoragePricePerGb | currency: "$" }} + {{ additionalStoragePriceMonthly(selectedPlan) | currency: "$" }} /{{ "month" | i18n }} - {{ 0 | currency: "$" }} + {{ + organization.maxStorageGb * selectedPlan.PasswordManager.additionalStoragePricePerGb + | currency: "$" + }}
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 a359c281eb..9492b51fcb 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 @@ -477,6 +477,13 @@ export class ChangePlanDialogComponent implements OnInit, OnDestroy { ); } + additionalStoragePriceMonthly(selectedPlan: PlanResponse) { + if (!selectedPlan.isAnnual) { + return selectedPlan.PasswordManager.additionalStoragePricePerGb; + } + return selectedPlan.PasswordManager.additionalStoragePricePerGb / 12; + } + additionalServiceAccountTotal(plan: PlanResponse): number { if (!plan.SecretsManager.hasAdditionalServiceAccountOption || this.additionalServiceAccount) { return 0; @@ -525,9 +532,18 @@ export class ChangePlanDialogComponent implements OnInit, OnDestroy { get total() { if (this.organization.useSecretsManager) { - return this.passwordManagerSubtotal + this.secretsManagerSubtotal + this.taxCharges || 0; + return ( + this.passwordManagerSubtotal + + this.additionalStorageTotal(this.selectedPlan) + + this.secretsManagerSubtotal + + this.taxCharges || 0 + ); } - return this.passwordManagerSubtotal + this.taxCharges || 0; + return ( + this.passwordManagerSubtotal + + this.additionalStorageTotal(this.selectedPlan) + + this.taxCharges || 0 + ); } get teamsStarterPlanIsAvailable() { @@ -639,6 +655,7 @@ export class ChangePlanDialogComponent implements OnInit, OnDestroy { if (this.selectedPlan.productTier !== ProductTierType.Families) { request.additionalSeats = this.organization.seats; } + request.additionalStorageGb = this.organization.maxStorageGb; request.premiumAccessAddon = this.selectedPlan.PasswordManager.hasPremiumAccessOption && this.formGroup.controls.premiumAccessAddon.value;