2018-07-02 23:09:53 +02:00
|
|
|
import {
|
|
|
|
Component,
|
2018-07-20 16:29:40 +02:00
|
|
|
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',
|
|
|
|
})
|
2018-07-20 16:29:40 +02:00
|
|
|
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
|
|
|
|
2018-07-20 16:29:40 +02:00
|
|
|
ngOnInit() {
|
2018-12-20 16:06:40 +01:00
|
|
|
const queryParamsSub = this.route.queryParams.subscribe(async (qParams) => {
|
2018-07-20 16:29:40 +02:00
|
|
|
if (qParams.plan === 'families' || qParams.plan === 'teams' || qParams.plan === 'enterprise') {
|
2019-03-21 18:11:40 +01:00
|
|
|
this.orgPlansComponent.plan = qParams.plan;
|
2018-07-20 16:29:40 +02:00
|
|
|
}
|
2019-01-17 05:30:32 +01:00
|
|
|
if (queryParamsSub != null) {
|
|
|
|
queryParamsSub.unsubscribe();
|
|
|
|
}
|
2018-07-20 16:29:40 +02:00
|
|
|
});
|
|
|
|
}
|
2018-07-02 23:09:53 +02:00
|
|
|
}
|