1
0
mirror of https://github.com/bitwarden/web synced 2025-12-27 05:33:19 +00:00

Fix basePrice to reflect the sponsorship

This commit is contained in:
Justin Baur
2021-11-23 15:39:50 -05:00
parent 346052922e
commit 16f8f1a16c

View File

@@ -120,14 +120,18 @@ export class OrganizationPlansComponent implements OnInit {
validPlans = validPlans.filter(plan => plan.product !== ProductType.Free);
}
if (this.acceptingSponsorship) {
validPlans = validPlans.filter(plan => plan.product === ProductType.Families);
}
validPlans = validPlans
.filter(plan => !plan.legacyYear
&& !plan.disabled
&& (plan.isAnnual || plan.product === this.productTypes.Free));
.filter(plan => !plan.legacyYear
&& !plan.disabled
&& (plan.isAnnual || plan.product === this.productTypes.Free));
if (this.acceptingSponsorship) {
const familyPlan = this.plans.find(plan => plan.type === PlanType.FamiliesAnnually);
familyPlan.basePrice = 0;
validPlans = [
familyPlan,
];
}
return validPlans;
}