mirror of
https://github.com/bitwarden/web
synced 2026-02-14 15:33:29 +00:00
Stopped hardcoding basePrice
This commit is contained in:
@@ -92,7 +92,7 @@
|
||||
</small>
|
||||
</ng-template>
|
||||
<span *ngIf="selectableProduct.product != productTypes.Free">
|
||||
<ng-container *ngIf="selectableProduct.basePrice">
|
||||
<ng-container *ngIf="selectableProduct.basePrice && !acceptingSponsorship">
|
||||
{{selectableProduct.basePrice / 12 | currency:'$'}} /{{'month' | i18n}},
|
||||
{{'includesXUsers' | i18n : selectableProduct.baseSeats}}
|
||||
<ng-container *ngIf="selectableProduct.hasAdditionalSeatsOption">
|
||||
@@ -158,7 +158,7 @@
|
||||
<label class="form-check-label" for="interval{{selectablePlan.type}}">
|
||||
<ng-container *ngIf="selectablePlan.isAnnual">
|
||||
{{'annually' | i18n}}
|
||||
<small *ngIf="selectablePlan.basePrice">
|
||||
<small *ngIf="selectablePlan.basePrice && !acceptingSponsorship">
|
||||
{{'basePrice' | i18n}}: {{ selectablePlan.basePrice / 12 | currency:'$'}} × 12
|
||||
{{'monthAbbr' | i18n}}
|
||||
=
|
||||
|
||||
@@ -68,6 +68,7 @@ export class OrganizationPlansComponent implements OnInit {
|
||||
productTypes = ProductType;
|
||||
formPromise: Promise<any>;
|
||||
singleOrgPolicyBlock: boolean = false;
|
||||
discount = 0;
|
||||
|
||||
plans: PlanResponse[];
|
||||
|
||||
@@ -127,7 +128,7 @@ export class OrganizationPlansComponent implements OnInit {
|
||||
|
||||
if (this.acceptingSponsorship) {
|
||||
const familyPlan = this.plans.find(plan => plan.type === PlanType.FamiliesAnnually);
|
||||
familyPlan.basePrice = 0;
|
||||
this.discount = familyPlan.basePrice;
|
||||
validPlans = [
|
||||
familyPlan,
|
||||
];
|
||||
@@ -181,7 +182,7 @@ export class OrganizationPlansComponent implements OnInit {
|
||||
if (this.selectedPlan.hasPremiumAccessOption && this.premiumAccessAddon) {
|
||||
subTotal += this.selectedPlan.premiumAccessOptionPrice;
|
||||
}
|
||||
return subTotal;
|
||||
return subTotal - this.discount;
|
||||
}
|
||||
|
||||
get freeTrial() {
|
||||
|
||||
Reference in New Issue
Block a user