Role verification open modal in after view init

This commit is contained in:
Konstantinos Triantafyllou 2021-09-07 10:34:16 +03:00
parent b91f8a1ab5
commit a5de5eb83e
1 changed files with 5 additions and 2 deletions

View File

@ -1,4 +1,4 @@
import {Component, Input, OnDestroy, OnInit, ViewChild} from "@angular/core";
import {AfterViewInit, Component, Input, OnDestroy, OnInit, ViewChild} from "@angular/core";
import {User} from "../login/utils/helper.class";
import {ActivatedRoute, Router} from "@angular/router";
import {UserManagementService} from "../services/user-management.service";
@ -81,7 +81,7 @@ import {Composer} from "../utils/email/composer";
</modal-alert>
`
})
export class RoleVerificationComponent implements OnInit, OnDestroy {
export class RoleVerificationComponent implements OnInit, OnDestroy, AfterViewInit {
@Input()
public id: string;
@ -112,6 +112,9 @@ export class RoleVerificationComponent implements OnInit, OnDestroy {
ngOnInit() {
this.reset();
}
ngAfterViewInit() {
this.subs.push(this.route.queryParams.subscribe(params => {
if (params && params['verify']) {
this.subs.push(this.userManagementService.getUserInfo(false).subscribe(user => {