bitwarden-estensione-browser/src/app/settings/create-organization.compone...

30 lines
926 B
TypeScript
Raw Normal View History

2018-07-02 23:09:53 +02:00
import {
Component,
OnInit,
2018-07-02 23:09:53 +02:00
ViewChild,
} from '@angular/core';
2019-03-21 18:11:40 +01:00
import { ActivatedRoute } from '@angular/router';
2018-07-02 23:09:53 +02:00
2019-03-21 18:11:40 +01:00
import { OrganizationPlansComponent } from './organization-plans.component';
2018-07-02 23:09:53 +02:00
@Component({
selector: 'app-create-organization',
templateUrl: 'create-organization.component.html',
})
export class CreateOrganizationComponent implements OnInit {
2019-03-21 18:11:40 +01:00
@ViewChild(OrganizationPlansComponent) orgPlansComponent: OrganizationPlansComponent;
2018-07-02 23:09:53 +02:00
2019-03-21 18:11:40 +01:00
constructor(private route: ActivatedRoute) { }
2018-07-02 23:09:53 +02:00
ngOnInit() {
const queryParamsSub = this.route.queryParams.subscribe(async (qParams) => {
if (qParams.plan === 'families' || qParams.plan === 'teams' || qParams.plan === 'enterprise') {
2019-03-21 18:11:40 +01:00
this.orgPlansComponent.plan = qParams.plan;
}
2019-01-17 05:30:32 +01:00
if (queryParamsSub != null) {
queryParamsSub.unsubscribe();
}
});
}
2018-07-02 23:09:53 +02:00
}