1
0
mirror of https://github.com/bitwarden/web synced 2025-12-18 17:23:24 +00:00

fixes to plan/pricing page (#776)

This commit is contained in:
Kyle Spearrin
2021-01-15 14:46:25 -05:00
committed by GitHub
parent 03aa806af6
commit 5a8198a878
3 changed files with 20 additions and 3 deletions

View File

@@ -5,6 +5,9 @@ import {
} from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { PlanType } from 'jslib/enums/planType';
import { ProductType } from 'jslib/enums/productType';
import { OrganizationPlansComponent } from './organization-plans.component';
@Component({
@@ -18,8 +21,15 @@ export class CreateOrganizationComponent implements OnInit {
ngOnInit() {
const queryParamsSub = this.route.queryParams.subscribe(async (qParams) => {
if (qParams.plan === 'families' || qParams.plan === 'teams' || qParams.plan === 'enterprise') {
this.orgPlansComponent.plan = qParams.plan;
if (qParams.plan === 'families') {
this.orgPlansComponent.plan = PlanType.FamiliesAnnually;
this.orgPlansComponent.product = ProductType.Families;
} else if (qParams.plan === 'teams') {
this.orgPlansComponent.plan = PlanType.TeamsAnnually;
this.orgPlansComponent.product = ProductType.Teams;
} else if (qParams.plan === 'enterprise') {
this.orgPlansComponent.plan = PlanType.EnterpriseAnnually;
this.orgPlansComponent.product = ProductType.Enterprise;
}
if (queryParamsSub != null) {
queryParamsSub.unsubscribe();