Profile creation part completed

This commit is contained in:
Anish Gurung 2024-03-21 18:13:58 -07:00
parent f75e93e3eb
commit f0a980b182
6 changed files with 21 additions and 29 deletions

View file

@ -6,6 +6,7 @@ import { LayoutService } from '../../../@core/utils';
import { map, takeUntil } from 'rxjs/operators';
import { Subject } from 'rxjs';
import { AuthService } from '../../../service/auth.service';
import { Router } from '@angular/router';
@Component({
selector: 'ngx-header',
@ -47,7 +48,8 @@ export class HeaderComponent implements OnInit, OnDestroy {
private userService: UserData,
private layoutService: LayoutService,
private breakpointService: NbMediaBreakpointsService,
private authService: AuthService) {
private authService: AuthService,
private router: Router) {
}
ngOnInit() {
@ -75,6 +77,8 @@ export class HeaderComponent implements OnInit, OnDestroy {
this.menuService.onItemClick().subscribe((event: { item: NbMenuItem }) => {
if (event.item.title === 'Log out') {
this.logout();
} else if (event.item.title === 'Profile') {
this.router.navigate(['/pages/layout/stepper/profile']); // Redirect to profile page
}
});
}