feat: Update sidebar navigation and add dashboard component

- Changed display name for the main dashboard in sidebar from 'Dashboards' to 'Hlavná stránka'.
- Removed commented-out children routes for dashboards and frontend pages in sidebar.
- Added new dashboard component and its routing.
- Introduced logout functionality with a dedicated logout component.
- Updated authentication routes to include logout path.
- Modified callback component to navigate to the dashboard upon successful login.
- Enhanced authentication service to handle user profile loading more effectively.
This commit is contained in:
Marek Lesko
2025-10-29 19:59:35 +00:00
parent 74f15cabd9
commit d5619e42da
18 changed files with 865 additions and 807 deletions

View File

@@ -1,5 +1,5 @@
import { Component } from '@angular/core';
import { RouterModule } from '@angular/router';
import { Router, RouterModule } from '@angular/router';
import { CoreService } from '../../../services/core.service';
import { MaterialModule } from '../../../material.module';
import { BrandingComponent } from '../../../layouts/full/vertical/sidebar/branding.component';
@@ -15,7 +15,7 @@ export class CallbackComponent {
options: any;
profile: any;
constructor(private settings: CoreService, private as: AuthenticationService) {
constructor(private settings: CoreService, private as: AuthenticationService, private router: Router) {
this.options = this.settings.getOptions();
// Handle the OAuth2 callback and load user profile
@@ -24,6 +24,7 @@ export class CallbackComponent {
.then(_ => {
console.log('Login successful');
this.profile = this.as.profile;
this.router.navigate(['/dashboard']);
}).catch(err => {
console.error('Error handling callback', err);
});