mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-22 11:45:59 +01:00
[AC-3029][Defect] Organization storage count is not carried over to the Upgrade dialog Total section (#10965)
* Resolve the ui changes issues * Resolve the storage ui issue
This commit is contained in:
parent
71e5bcb947
commit
c1b1db071d
@ -389,17 +389,21 @@
|
||||
bitTypography="body2"
|
||||
*ngIf="
|
||||
selectedPlan.PasswordManager.hasAdditionalStorageOption &&
|
||||
!organization.useSecretsManager
|
||||
!organization.useSecretsManager &&
|
||||
organization.maxStorageGb > 0
|
||||
"
|
||||
>
|
||||
<span>
|
||||
{{ 0 }}
|
||||
{{ organization.maxStorageGb }}
|
||||
{{ "additionalStorageGbMessage" | i18n }}
|
||||
×
|
||||
{{ selectedPlan.PasswordManager.additionalStoragePricePerGb | currency: "$" }}
|
||||
{{ additionalStoragePriceMonthly(selectedPlan) | currency: "$" }}
|
||||
/{{ "year" | i18n }}
|
||||
</span>
|
||||
<span>{{ 0 | currency: "$" }}</span>
|
||||
<span>{{
|
||||
organization.maxStorageGb * selectedPlan.PasswordManager.additionalStoragePricePerGb
|
||||
| currency: "$"
|
||||
}}</span>
|
||||
</p>
|
||||
<!-- secrets manager summary for annual -->
|
||||
<p class="tw-font-semibold tw-mt-3 tw-mb-1" *ngIf="organization.useSecretsManager">
|
||||
@ -505,17 +509,21 @@
|
||||
bitTypography="body2"
|
||||
*ngIf="
|
||||
selectedPlan.PasswordManager.hasAdditionalStorageOption &&
|
||||
!organization.useSecretsManager
|
||||
!organization.useSecretsManager &&
|
||||
organization.maxStorageGb > 0
|
||||
"
|
||||
>
|
||||
<span>
|
||||
{{ 0 }}
|
||||
{{ organization.maxStorageGb }}
|
||||
{{ "additionalStorageGbMessage" | i18n }}
|
||||
×
|
||||
{{ selectedPlan.PasswordManager.additionalStoragePricePerGb | currency: "$" }}
|
||||
{{ additionalStoragePriceMonthly(selectedPlan) | currency: "$" }}
|
||||
/{{ "month" | i18n }}
|
||||
</span>
|
||||
<span>{{ 0 | currency: "$" }}</span>
|
||||
<span>{{
|
||||
organization.maxStorageGb * selectedPlan.PasswordManager.additionalStoragePricePerGb
|
||||
| currency: "$"
|
||||
}}</span>
|
||||
</p>
|
||||
<!-- secrets manager summary for monthly -->
|
||||
<p class="tw-font-semibold tw-mt-3 tw-mb-1" *ngIf="organization.useSecretsManager">
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user