Added configurable warning message

This commit is contained in:
Dániel Gyenizse
2023-10-30 16:50:49 +01:00
committed by Adam Saghy
parent cee57c525e
commit 53bbe13603
9 changed files with 65 additions and 2 deletions
+6 -1
View File
@@ -10,6 +10,7 @@ import { startWith, map } from 'rxjs/operators';
/** Custom Imports. */
import { activities } from './activities';
import { WarningDialogComponent } from './warning-dialog/warning-dialog.component';
/** Custom Services */
import { AuthenticationService } from '../core/authentication/authentication.service';
@@ -62,7 +63,7 @@ export class HomeComponent implements OnInit, AfterViewInit {
private router: Router,
private dialog: MatDialog,
private configurationWizardService: ConfigurationWizardService,
private popoverService: PopoverService) { }
private popoverService: PopoverService,) { }
/**
* Sets the username of the authenticated user.
@@ -72,6 +73,10 @@ export class HomeComponent implements OnInit, AfterViewInit {
const credentials = this.authenticationService.getCredentials();
this.username = credentials.username;
this.setFilteredActivities();
if (!this.authenticationService.hasDialogBeenShown()) {
this.dialog.open(WarningDialogComponent);
this.authenticationService.showDialog();
}
}
/**