@@ -16,6 +16,7 @@ import { WarningDialogComponent } from './warning-dialog/warning-dialog.componen
1616import { AuthenticationService } from '../core/authentication/authentication.service' ;
1717import { PopoverService } from '../configuration-wizard/popover/popover.service' ;
1818import { ConfigurationWizardService } from '../configuration-wizard/configuration-wizard.service' ;
19+ import { SettingsService } from 'app/settings/settings.service' ;
1920
2021/** Custom Components */
2122import { NextStepDialogComponent } from '../configuration-wizard/next-step-dialog/next-step-dialog.component' ;
@@ -46,6 +47,8 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
4647export class HomeComponent implements OnInit , AfterViewInit {
4748 /** Username of authenticated user. */
4849 username : string ;
50+ /** Tenant name */
51+ tenant : string ;
4952 /** Activity Form. */
5053 activityForm : any ;
5154 /** Search Text. */
@@ -71,14 +74,16 @@ export class HomeComponent implements OnInit, AfterViewInit {
7174 * @param {MatDialog } dialog MatDialog.
7275 * @param {ConfigurationWizardService } configurationWizardService ConfigurationWizard Service.
7376 * @param {PopoverService } popoverService PopoverService.
77+ * @param {SettingsService } settingsService SettingsService.
7478 */
7579 constructor (
7680 private authenticationService : AuthenticationService ,
7781 private activatedRoute : ActivatedRoute ,
7882 private router : Router ,
7983 private dialog : MatDialog ,
8084 private configurationWizardService : ConfigurationWizardService ,
81- private popoverService : PopoverService
85+ private popoverService : PopoverService ,
86+ private settingsService : SettingsService
8287 ) { }
8388
8489 /**
@@ -88,6 +93,7 @@ export class HomeComponent implements OnInit, AfterViewInit {
8893 ngOnInit ( ) {
8994 const credentials = this . authenticationService . getCredentials ( ) ;
9095 this . username = credentials . username ;
96+ this . tenant = this . tenantIdentifier ( ) ;
9197 this . setFilteredActivities ( ) ;
9298 if ( ! this . authenticationService . hasDialogBeenShown ( ) ) {
9399 this . dialog . open ( WarningDialogComponent ) ;
@@ -193,4 +199,11 @@ export class HomeComponent implements OnInit, AfterViewInit {
193199 this . router . onSameUrlNavigation = 'reload' ;
194200 this . router . navigate ( [ '/home' ] ) ;
195201 }
202+
203+ tenantIdentifier ( ) {
204+ if ( ! this . settingsService . tenantIdentifier || this . settingsService . tenantIdentifier === '' ) {
205+ return 'default' ;
206+ }
207+ return this . settingsService . tenantIdentifier ;
208+ }
196209}
0 commit comments