diff --git a/CHANGELOG.md b/CHANGELOG.md index 072691448..ec6ea9255 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,7 @@ please see [changelog_updates.md](docs/dev/changelog_updates.md). - Fixed Confirm and Delete buttons' behavior in confirmation modals ([#304](https://github.com/sovity/authority-portal/issues/304)) - Fixed final step not showing when registering a central component ([#305](https://github.com/sovity/authority-portal/issues/305)) - Fixed My Organization page not updated when switching between environments ([#255](https://github.com/sovity/authority-portal/issues/255)) +- Fixed Website title not updating in some scenarios [#237](https://github.com/sovity/authority-portal/issues/237) - Fixed security vulnerabilities ### Known issues diff --git a/authority-portal-frontend/src/app/pages/authority-connector-list-page/authority-connector-list-page/authority-connector-list-page.component.ts b/authority-portal-frontend/src/app/pages/authority-connector-list-page/authority-connector-list-page/authority-connector-list-page.component.ts index 674d6204f..c62167a3b 100644 --- a/authority-portal-frontend/src/app/pages/authority-connector-list-page/authority-connector-list-page/authority-connector-list-page.component.ts +++ b/authority-portal-frontend/src/app/pages/authority-connector-list-page/authority-connector-list-page/authority-connector-list-page.component.ts @@ -11,11 +11,13 @@ * sovity GmbH - initial implementation */ import {Component, OnDestroy, OnInit} from '@angular/core'; +import {Title} from '@angular/platform-browser'; import {Subject, interval} from 'rxjs'; import {takeUntil} from 'rxjs/operators'; import {Store} from '@ngxs/store'; import {ConnectorOverviewEntryDto} from '@sovity.de/authority-portal-client'; import {GlobalStateUtils} from 'src/app/core/global-state/global-state-utils'; +import {ActiveFeatureSet} from 'src/app/core/services/config/active-feature-set'; import {SlideOverService} from 'src/app/core/services/slide-over.service'; import {sliderOverNavigation} from 'src/app/core/utils/helper'; import {getConnectorsTypeClasses} from 'src/app/core/utils/ui-utils'; @@ -60,7 +62,13 @@ export class AuthorityConnectorListPageComponent implements OnInit, OnDestroy { private store: Store, private globalStateUtils: GlobalStateUtils, private slideOverService: SlideOverService, - ) {} + private titleService: Title, + private activeFeatureSet: ActiveFeatureSet, + ) { + this.activeFeatureSet.usesMdsId() + ? this.titleService.setTitle('MDS Connectors') + : this.titleService.setTitle('All Connectors'); + } ngOnInit() { this.initializeHeaderBar(); diff --git a/authority-portal-frontend/src/app/pages/authority-organization-list-page/authority-organization-list-page/authority-organization-list-page.component.ts b/authority-portal-frontend/src/app/pages/authority-organization-list-page/authority-organization-list-page/authority-organization-list-page.component.ts index 943bda19a..d19fad357 100644 --- a/authority-portal-frontend/src/app/pages/authority-organization-list-page/authority-organization-list-page/authority-organization-list-page.component.ts +++ b/authority-portal-frontend/src/app/pages/authority-organization-list-page/authority-organization-list-page/authority-organization-list-page.component.ts @@ -12,6 +12,7 @@ */ import {Component, OnDestroy, OnInit} from '@angular/core'; import {MatDialog} from '@angular/material/dialog'; +import {Title} from '@angular/platform-browser'; import {Subject} from 'rxjs'; import {takeUntil} from 'rxjs/operators'; import {Store} from '@ngxs/store'; @@ -20,6 +21,7 @@ import { OrganizationRegistrationStatusDto, UserRoleDto, } from '@sovity.de/authority-portal-client'; +import {ActiveFeatureSet} from 'src/app/core/services/config/active-feature-set'; import {SlideOverService} from 'src/app/core/services/slide-over.service'; import {sliderOverNavigation} from 'src/app/core/utils/helper'; import {getOrganizationRegistrationStatusClasses} from 'src/app/core/utils/ui-utils'; @@ -73,7 +75,13 @@ export class AuthorityOrganizationListPageComponent public dialog: MatDialog, private slideOverService: SlideOverService, private globalStateUtils: GlobalStateUtils, - ) {} + private titleService: Title, + private activeFeatureSet: ActiveFeatureSet, + ) { + this.activeFeatureSet.usesMdsId() + ? this.titleService.setTitle('MDS Organizations') + : this.titleService.setTitle('Participant Management'); + } ngOnInit() { this.initializeHeaderBar(); diff --git a/authority-portal-frontend/src/app/pages/catalog-page/catalog-page/catalog-page.component.ts b/authority-portal-frontend/src/app/pages/catalog-page/catalog-page/catalog-page.component.ts index 9172c6489..c02d16e2a 100644 --- a/authority-portal-frontend/src/app/pages/catalog-page/catalog-page/catalog-page.component.ts +++ b/authority-portal-frontend/src/app/pages/catalog-page/catalog-page/catalog-page.component.ts @@ -19,6 +19,7 @@ import { } from '@angular/core'; import {FormControl} from '@angular/forms'; import {PageEvent} from '@angular/material/paginator'; +import {Title} from '@angular/platform-browser'; import {ActivatedRoute, Router} from '@angular/router'; import {Subject, distinctUntilChanged, of, switchMap, tap} from 'rxjs'; import {finalize, map, take, takeUntil} from 'rxjs/operators'; @@ -66,6 +67,8 @@ export class CatalogPageComponent implements OnInit, OnDestroy { // only tracked to prevent the component from resetting expandedFilterId = ''; + catalogType = this.route.snapshot.data.catalogType; + catalogSpelling = this.activeFeatureSet.usesBritishCatalogue() ? 'Catalogue' : 'Catalog'; @@ -78,7 +81,10 @@ export class CatalogPageComponent implements OnInit, OnDestroy { private globalStateUtils: GlobalStateUtils, private deploymentEnvironmentUrlSyncService: DeploymentEnvironmentUrlSyncService, private activeFeatureSet: ActiveFeatureSet, - ) {} + private titleService: Title, + ) { + this.setTitle(); + } ngOnInit(): void { this.deploymentEnvironmentUrlSyncService.updateFromUrlOnce( @@ -181,6 +187,7 @@ export class CatalogPageComponent implements OnInit, OnDestroy { .pipe( finalize(() => { this.changeUrlToCatalogRoot(); + this.setTitle(); }), ) .subscribe(); @@ -270,4 +277,15 @@ export class CatalogPageComponent implements OnInit, OnDestroy { headerActions: [], }; } + + private setTitle() { + let title; + this.catalogType === 'my-data-offers' + ? this.titleService.setTitle('My Data Offers') + : this.titleService.setTitle( + `${this.activeFeatureSet.usesMdsId() ? 'MDS ' : ''}${ + this.catalogSpelling + }`, + ); + } } diff --git a/authority-portal-frontend/src/app/pages/central-component-list-page/central-component-list-page/central-component-list-page.component.ts b/authority-portal-frontend/src/app/pages/central-component-list-page/central-component-list-page/central-component-list-page.component.ts index f3144c0a5..dbe47ddb7 100644 --- a/authority-portal-frontend/src/app/pages/central-component-list-page/central-component-list-page/central-component-list-page.component.ts +++ b/authority-portal-frontend/src/app/pages/central-component-list-page/central-component-list-page/central-component-list-page.component.ts @@ -12,6 +12,7 @@ */ import {Component, HostBinding, OnDestroy, OnInit} from '@angular/core'; import {MatDialog} from '@angular/material/dialog'; +import {Title} from '@angular/platform-browser'; import {Router} from '@angular/router'; import {Subject} from 'rxjs'; import {filter, takeUntil} from 'rxjs/operators'; @@ -21,6 +22,7 @@ import { UserRoleDto, } from '@sovity.de/authority-portal-client'; import {GlobalStateUtils} from 'src/app/core/global-state/global-state-utils'; +import {ActiveFeatureSet} from 'src/app/core/services/config/active-feature-set'; import {HeaderBarConfig} from 'src/app/shared/common/header-bar/header-bar.model'; import {ConfirmationDialogComponent} from '../../../shared/common/confirmation-dialog/confirmation-dialog.component'; import {ConfirmationDialog} from '../../../shared/common/confirmation-dialog/confirmation-dialog.model'; @@ -54,7 +56,13 @@ export class CentralComponentListPageComponent implements OnInit, OnDestroy { private globalStateUtils: GlobalStateUtils, private router: Router, private dialog: MatDialog, - ) {} + private titleService: Title, + private activeFeatureSet: ActiveFeatureSet, + ) { + this.activeFeatureSet.usesMdsId() + ? this.titleService.setTitle('MDS Central Components') + : this.titleService.setTitle('Central Components'); + } ngOnInit() { this.refresh(); diff --git a/authority-portal-frontend/src/app/pages/control-center-organization-member-detail-page/control-center-organization-member-detail-page/control-center-organization-member-detail-page.component.ts b/authority-portal-frontend/src/app/pages/control-center-organization-member-detail-page/control-center-organization-member-detail-page/control-center-organization-member-detail-page.component.ts index 6d6f716aa..88dbcc533 100644 --- a/authority-portal-frontend/src/app/pages/control-center-organization-member-detail-page/control-center-organization-member-detail-page/control-center-organization-member-detail-page.component.ts +++ b/authority-portal-frontend/src/app/pages/control-center-organization-member-detail-page/control-center-organization-member-detail-page/control-center-organization-member-detail-page.component.ts @@ -11,9 +11,11 @@ * sovity GmbH - initial implementation */ import {Component, OnDestroy, OnInit} from '@angular/core'; +import {Title} from '@angular/platform-browser'; import {ActivatedRoute} from '@angular/router'; import {Subject, takeUntil} from 'rxjs'; import {Store} from '@ngxs/store'; +import {ActiveFeatureSet} from 'src/app/core/services/config/active-feature-set'; import {Reset} from '../state/control-center-organization-member-detail-page-action'; import { ControlCenterOrganizationMemberDetailPageState, @@ -32,7 +34,16 @@ export class ControlCenterOrganizationMemberDetailPageComponent state: ControlCenterOrganizationMemberDetailPageState = DEFAULT_CONTROL_CENTER_ORGANIZATION_MEMBER_DETAIL_PAGE_STATE; - constructor(private store: Store, private activatedRoute: ActivatedRoute) {} + constructor( + private store: Store, + private activatedRoute: ActivatedRoute, + private titleService: Title, + private activeFeatureSet: ActiveFeatureSet, + ) { + this.activeFeatureSet.usesMdsId() + ? this.titleService.setTitle('MDS Member Details') + : this.titleService.setTitle('Member Details'); + } ngOnInit(): void { this.startRefreshingOnRouteChanges(); diff --git a/authority-portal-frontend/src/app/pages/control-center-organization-members-page/control-center-organization-members-page/control-center-organization-members-page.component.ts b/authority-portal-frontend/src/app/pages/control-center-organization-members-page/control-center-organization-members-page/control-center-organization-members-page.component.ts index b41a72f9f..363f160d2 100644 --- a/authority-portal-frontend/src/app/pages/control-center-organization-members-page/control-center-organization-members-page/control-center-organization-members-page.component.ts +++ b/authority-portal-frontend/src/app/pages/control-center-organization-members-page/control-center-organization-members-page/control-center-organization-members-page.component.ts @@ -11,11 +11,13 @@ * sovity GmbH - initial implementation */ import {Component, OnDestroy, OnInit} from '@angular/core'; +import {Title} from '@angular/platform-browser'; import {Router} from '@angular/router'; import {Subject, takeUntil} from 'rxjs'; import {Store} from '@ngxs/store'; import {MemberInfo} from '@sovity.de/authority-portal-client'; import {GlobalStateUtils} from 'src/app/core/global-state/global-state-utils'; +import {ActiveFeatureSet} from 'src/app/core/services/config/active-feature-set'; import {BreadcrumbService} from '../../../shared/common/portal-layout/breadcrumb/breadcrumb.service'; import {Reset} from './state/control-center-organization-members-page-action'; import { @@ -39,7 +41,13 @@ export class ControlCenterOrganizationMembersPageComponent private router: Router, private breadcrumbService: BreadcrumbService, private globalStateUtils: GlobalStateUtils, - ) {} + private titleService: Title, + private activeFeatureSet: ActiveFeatureSet, + ) { + this.activeFeatureSet.usesMdsId() + ? this.titleService.setTitle('MDS Users and Roles') + : this.titleService.setTitle('Users and Roles'); + } ngOnInit(): void { this.refresh(); diff --git a/authority-portal-frontend/src/app/pages/control-center-organization-profile-page/control-center-organization-profile-page/control-center-organization-profile-page.component.ts b/authority-portal-frontend/src/app/pages/control-center-organization-profile-page/control-center-organization-profile-page/control-center-organization-profile-page.component.ts index b401402a6..755569638 100644 --- a/authority-portal-frontend/src/app/pages/control-center-organization-profile-page/control-center-organization-profile-page/control-center-organization-profile-page.component.ts +++ b/authority-portal-frontend/src/app/pages/control-center-organization-profile-page/control-center-organization-profile-page/control-center-organization-profile-page.component.ts @@ -11,9 +11,11 @@ * sovity GmbH - initial implementation */ import {Component, OnDestroy, OnInit} from '@angular/core'; +import {Title} from '@angular/platform-browser'; import {Subject, takeUntil} from 'rxjs'; import {Store} from '@ngxs/store'; import {GlobalStateUtils} from 'src/app/core/global-state/global-state-utils'; +import {ActiveFeatureSet} from 'src/app/core/services/config/active-feature-set'; import {Reset} from '../state/control-center-organization-profile-page-action'; import { ControlCenterOrganizationProfilePageState, @@ -34,7 +36,13 @@ export class ControlCenterOrganizationProfilePageComponent constructor( private store: Store, private globalStateUtils: GlobalStateUtils, - ) {} + private titleService: Title, + private activeFeatureSet: ActiveFeatureSet, + ) { + this.activeFeatureSet.usesMdsId() + ? this.titleService.setTitle('MDS My Organization') + : this.titleService.setTitle('My Organization'); + } ngOnInit(): void { this.refresh(); diff --git a/authority-portal-frontend/src/app/pages/control-center-user-profile-page/control-center-user-profile-page/control-center-user-profile-page.component.ts b/authority-portal-frontend/src/app/pages/control-center-user-profile-page/control-center-user-profile-page/control-center-user-profile-page.component.ts index 4b0947247..de3ed375c 100644 --- a/authority-portal-frontend/src/app/pages/control-center-user-profile-page/control-center-user-profile-page/control-center-user-profile-page.component.ts +++ b/authority-portal-frontend/src/app/pages/control-center-user-profile-page/control-center-user-profile-page/control-center-user-profile-page.component.ts @@ -11,9 +11,11 @@ * sovity GmbH - initial implementation */ import {Component, OnDestroy, OnInit} from '@angular/core'; +import {Title} from '@angular/platform-browser'; import {Subject, takeUntil} from 'rxjs'; import {Store} from '@ngxs/store'; import {GlobalStateUtils} from 'src/app/core/global-state/global-state-utils'; +import {ActiveFeatureSet} from 'src/app/core/services/config/active-feature-set'; import {Reset} from '../state/control-center-user-profile-page-action'; import { ControlCenterUserProfilePageState, @@ -34,7 +36,13 @@ export class ControlCenterUserProfilePageComponent constructor( private store: Store, private globalStateUtils: GlobalStateUtils, - ) {} + private titleService: Title, + private activeFeatureSet: ActiveFeatureSet, + ) { + this.activeFeatureSet.usesMdsId() + ? this.titleService.setTitle('MDS My Profile') + : this.titleService.setTitle('My Profile'); + } ngOnInit(): void { this.refresh(); diff --git a/authority-portal-frontend/src/app/pages/dashboard-page/dashboard-page/dashboard-page.component.ts b/authority-portal-frontend/src/app/pages/dashboard-page/dashboard-page/dashboard-page.component.ts index 01cc76207..7f830b336 100644 --- a/authority-portal-frontend/src/app/pages/dashboard-page/dashboard-page/dashboard-page.component.ts +++ b/authority-portal-frontend/src/app/pages/dashboard-page/dashboard-page/dashboard-page.component.ts @@ -11,6 +11,7 @@ * sovity GmbH - initial implementation */ import {Component, Inject, OnDestroy, OnInit} from '@angular/core'; +import {Title} from '@angular/platform-browser'; import {Subject} from 'rxjs'; import {map, switchMap, takeUntil} from 'rxjs/operators'; import { @@ -19,6 +20,7 @@ import { } from '@sovity.de/authority-portal-client'; import {ApiService} from 'src/app/core/api/api.service'; import {GlobalStateUtils} from 'src/app/core/global-state/global-state-utils'; +import {ActiveFeatureSet} from 'src/app/core/services/config/active-feature-set'; import {APP_CONFIG, AppConfig} from 'src/app/core/services/config/app-config'; import {Fetched} from 'src/app/core/utils/fetched'; import {HeaderBarConfig} from 'src/app/shared/common/header-bar/header-bar.model'; @@ -43,7 +45,13 @@ export class DashboardPageComponent implements OnInit, OnDestroy { @Inject(APP_CONFIG) public appConfig: AppConfig, private globalStateUtils: GlobalStateUtils, private apiService: ApiService, - ) {} + private titleService: Title, + private activeFeatureSet: ActiveFeatureSet, + ) { + this.activeFeatureSet.usesMdsId() + ? this.titleService.setTitle('MDS Dashboard') + : this.titleService.setTitle('Dashboard'); + } ngOnInit(): void { this.fetchDashboardPageData(); diff --git a/authority-portal-frontend/src/app/pages/empty-pages/loading-page/loading-page/loading-page.component.ts b/authority-portal-frontend/src/app/pages/empty-pages/loading-page/loading-page/loading-page.component.ts index c57f88c0e..29ce29921 100644 --- a/authority-portal-frontend/src/app/pages/empty-pages/loading-page/loading-page/loading-page.component.ts +++ b/authority-portal-frontend/src/app/pages/empty-pages/loading-page/loading-page/loading-page.component.ts @@ -11,6 +11,7 @@ * sovity GmbH - initial implementation */ import {Component, OnDestroy, OnInit} from '@angular/core'; +import {Title} from '@angular/platform-browser'; import {Subject} from 'rxjs'; import {Store} from '@ngxs/store'; import {GlobalState} from 'src/app/core/global-state/global-state'; @@ -25,7 +26,9 @@ export class LoadingPageComponent implements OnInit, OnDestroy { private ngOnDestroy$ = new Subject(); - constructor(private store: Store) {} + constructor(private store: Store, private titleService: Title) { + this.titleService.setTitle('Error'); + } ngOnInit() { this.startListeningToGlobalState(); diff --git a/authority-portal-frontend/src/app/pages/empty-pages/page-not-found-page/page-not-found-page/page-not-found-page.component.ts b/authority-portal-frontend/src/app/pages/empty-pages/page-not-found-page/page-not-found-page/page-not-found-page.component.ts index bad2daabc..b1dbf9824 100644 --- a/authority-portal-frontend/src/app/pages/empty-pages/page-not-found-page/page-not-found-page/page-not-found-page.component.ts +++ b/authority-portal-frontend/src/app/pages/empty-pages/page-not-found-page/page-not-found-page/page-not-found-page.component.ts @@ -11,9 +11,14 @@ * sovity GmbH - initial implementation */ import {Component} from '@angular/core'; +import {Title} from '@angular/platform-browser'; @Component({ selector: 'app-page-not-found', templateUrl: './page-not-found-page.component.html', }) -export class PageNotFoundPageComponent {} +export class PageNotFoundPageComponent { + constructor(private titleService: Title) { + this.titleService.setTitle('404 - Page Not Found'); + } +} diff --git a/authority-portal-frontend/src/app/pages/empty-pages/unauthenticated-page/unauthenticated-page/unauthenticated-page.component.ts b/authority-portal-frontend/src/app/pages/empty-pages/unauthenticated-page/unauthenticated-page/unauthenticated-page.component.ts index bd99a1681..c416c55d2 100644 --- a/authority-portal-frontend/src/app/pages/empty-pages/unauthenticated-page/unauthenticated-page/unauthenticated-page.component.ts +++ b/authority-portal-frontend/src/app/pages/empty-pages/unauthenticated-page/unauthenticated-page/unauthenticated-page.component.ts @@ -11,6 +11,7 @@ * sovity GmbH - initial implementation */ import {Component, Inject} from '@angular/core'; +import {Title} from '@angular/platform-browser'; import {APP_CONFIG, AppConfig} from 'src/app/core/services/config/app-config'; @Component({ @@ -18,7 +19,12 @@ import {APP_CONFIG, AppConfig} from 'src/app/core/services/config/app-config'; templateUrl: './unauthenticated-page.component.html', }) export class UnauthenticatedPageComponent { - constructor(@Inject(APP_CONFIG) public appConfig: AppConfig) {} + constructor( + @Inject(APP_CONFIG) public appConfig: AppConfig, + private titleService: Title, + ) { + this.titleService.setTitle('Unauthenticated'); + } get loginUrl(): string { const url = new URL(this.appConfig.loginUrl); diff --git a/authority-portal-frontend/src/app/pages/participant-own-connector-list-page/participant-own-connector-list-page/participant-own-connector-list-page.component.ts b/authority-portal-frontend/src/app/pages/participant-own-connector-list-page/participant-own-connector-list-page/participant-own-connector-list-page.component.ts index a1bc9b75f..b214150aa 100644 --- a/authority-portal-frontend/src/app/pages/participant-own-connector-list-page/participant-own-connector-list-page/participant-own-connector-list-page.component.ts +++ b/authority-portal-frontend/src/app/pages/participant-own-connector-list-page/participant-own-connector-list-page/participant-own-connector-list-page.component.ts @@ -11,6 +11,7 @@ * sovity GmbH - initial implementation */ import {Component, OnDestroy, OnInit} from '@angular/core'; +import {Title} from '@angular/platform-browser'; import {Router} from '@angular/router'; import {Subject, interval} from 'rxjs'; import {takeUntil} from 'rxjs/operators'; @@ -20,6 +21,7 @@ import { UserRoleDto, } from '@sovity.de/authority-portal-client'; import {GlobalStateUtils} from 'src/app/core/global-state/global-state-utils'; +import {ActiveFeatureSet} from 'src/app/core/services/config/active-feature-set'; import {SlideOverService} from 'src/app/core/services/slide-over.service'; import {sliderOverNavigation} from 'src/app/core/utils/helper'; import {getConnectorsTypeClasses} from 'src/app/core/utils/ui-utils'; @@ -69,7 +71,13 @@ export class ParticipantOwnConnectorListPageComponent private globalStateUtils: GlobalStateUtils, private router: Router, private slideOverService: SlideOverService, - ) {} + private titleService: Title, + private activeFeatureSet: ActiveFeatureSet, + ) { + this.activeFeatureSet.usesMdsId() + ? this.titleService.setTitle('MDS Connectors') + : this.titleService.setTitle('Connectors'); + } ngOnInit() { this.initializeHeaderBar(); diff --git a/authority-portal-frontend/src/app/pages/registration-pages/organization-onboard-page/organization-onboard-page/organization-onboard-page.component.ts b/authority-portal-frontend/src/app/pages/registration-pages/organization-onboard-page/organization-onboard-page/organization-onboard-page.component.ts index abc68f6bc..4cd7e8d84 100644 --- a/authority-portal-frontend/src/app/pages/registration-pages/organization-onboard-page/organization-onboard-page/organization-onboard-page.component.ts +++ b/authority-portal-frontend/src/app/pages/registration-pages/organization-onboard-page/organization-onboard-page/organization-onboard-page.component.ts @@ -13,6 +13,7 @@ import {Component, Inject, OnInit, ViewChild} from '@angular/core'; import {FormBuilder, FormGroup, Validators} from '@angular/forms'; import {MatStepper} from '@angular/material/stepper'; +import {Title} from '@angular/platform-browser'; import {Subject, take, takeUntil} from 'rxjs'; import {filter, map} from 'rxjs/operators'; import {Store} from '@ngxs/store'; @@ -87,7 +88,10 @@ export class OrganizationOnboardPageComponent implements OnInit { @Inject(APP_CONFIG) public appConfig: AppConfig, private store: Store, private formBuilder: FormBuilder, - ) {} + private titleService: Title, + ) { + this.titleService.setTitle('Onboarding'); + } ngOnInit(): void { this.store.dispatch(Reset); diff --git a/authority-portal-frontend/src/app/pages/registration-pages/organization-pending-page/organization-pending-page/organization-pending-page.component.ts b/authority-portal-frontend/src/app/pages/registration-pages/organization-pending-page/organization-pending-page/organization-pending-page.component.ts index dc09b8ca6..f968301df 100644 --- a/authority-portal-frontend/src/app/pages/registration-pages/organization-pending-page/organization-pending-page/organization-pending-page.component.ts +++ b/authority-portal-frontend/src/app/pages/registration-pages/organization-pending-page/organization-pending-page/organization-pending-page.component.ts @@ -11,6 +11,7 @@ * sovity GmbH - initial implementation */ import {Component, Inject} from '@angular/core'; +import {Title} from '@angular/platform-browser'; import { APP_CONFIG, AppConfig, @@ -21,5 +22,10 @@ import { templateUrl: './organization-pending-page.component.html', }) export class OrganizationPendingPageComponent { - constructor(@Inject(APP_CONFIG) public appConfig: AppConfig) {} + constructor( + @Inject(APP_CONFIG) public appConfig: AppConfig, + private titleService: Title, + ) { + this.titleService.setTitle('Pending'); + } } diff --git a/authority-portal-frontend/src/app/pages/registration-pages/organization-rejected-page/organization-rejected-page/organization-rejected-page.component.ts b/authority-portal-frontend/src/app/pages/registration-pages/organization-rejected-page/organization-rejected-page/organization-rejected-page.component.ts index 02317e3ea..96e2228ec 100644 --- a/authority-portal-frontend/src/app/pages/registration-pages/organization-rejected-page/organization-rejected-page/organization-rejected-page.component.ts +++ b/authority-portal-frontend/src/app/pages/registration-pages/organization-rejected-page/organization-rejected-page/organization-rejected-page.component.ts @@ -11,6 +11,7 @@ * sovity GmbH - initial implementation */ import {Component, Inject} from '@angular/core'; +import {Title} from '@angular/platform-browser'; import {APP_CONFIG, AppConfig} from 'src/app/core/services/config/app-config'; @Component({ @@ -18,5 +19,10 @@ import {APP_CONFIG, AppConfig} from 'src/app/core/services/config/app-config'; templateUrl: './organization-rejected-page.component.html', }) export class OrganizationRejectedPageComponent { - constructor(@Inject(APP_CONFIG) public appConfig: AppConfig) {} + constructor( + @Inject(APP_CONFIG) public appConfig: AppConfig, + private titleService: Title, + ) { + this.titleService.setTitle('Rejected'); + } } diff --git a/authority-portal-frontend/src/app/pages/sp-connector-list-page/sp-connector-list-page/sp-connector-list-page.component.ts b/authority-portal-frontend/src/app/pages/sp-connector-list-page/sp-connector-list-page/sp-connector-list-page.component.ts index eba15ac7c..8dcfb1230 100644 --- a/authority-portal-frontend/src/app/pages/sp-connector-list-page/sp-connector-list-page/sp-connector-list-page.component.ts +++ b/authority-portal-frontend/src/app/pages/sp-connector-list-page/sp-connector-list-page/sp-connector-list-page.component.ts @@ -11,6 +11,7 @@ * sovity GmbH - initial implementation */ import {Component, OnDestroy, OnInit} from '@angular/core'; +import {Title} from '@angular/platform-browser'; import {Router} from '@angular/router'; import {Subject, interval} from 'rxjs'; import {takeUntil} from 'rxjs/operators'; @@ -21,6 +22,7 @@ import { UserRoleDto, } from '@sovity.de/authority-portal-client'; import {GlobalStateUtils} from 'src/app/core/global-state/global-state-utils'; +import {ActiveFeatureSet} from 'src/app/core/services/config/active-feature-set'; import {SlideOverService} from 'src/app/core/services/slide-over.service'; import {sliderOverNavigation} from 'src/app/core/utils/helper'; import {getConnectorsTypeClasses} from 'src/app/core/utils/ui-utils'; @@ -67,7 +69,13 @@ export class SpConnectorListPageComponent implements OnInit, OnDestroy { private globalStateUtils: GlobalStateUtils, private router: Router, private slideOverService: SlideOverService, - ) {} + private titleService: Title, + private activeFeatureSet: ActiveFeatureSet, + ) { + this.activeFeatureSet.usesMdsId() + ? this.titleService.setTitle('MDS Provided Connectors') + : this.titleService.setTitle('Provided Connectors'); + } ngOnInit() { this.initializeHeaderBar(); diff --git a/authority-portal-frontend/src/app/shared/common/portal-layout/breadcrumb/breadcrumb.component.ts b/authority-portal-frontend/src/app/shared/common/portal-layout/breadcrumb/breadcrumb.component.ts index 9ca4aaf87..93fdbbd6b 100644 --- a/authority-portal-frontend/src/app/shared/common/portal-layout/breadcrumb/breadcrumb.component.ts +++ b/authority-portal-frontend/src/app/shared/common/portal-layout/breadcrumb/breadcrumb.component.ts @@ -24,22 +24,11 @@ import {BreadcrumbService} from './breadcrumb.service'; export class BreadcrumbComponent implements OnDestroy { breadcrumb: BreadcrumbItem[] = []; - constructor( - private breadcrumbService: BreadcrumbService, - private titleService: Title, - private activeFeatureSet: ActiveFeatureSet, - ) { + constructor(private breadcrumbService: BreadcrumbService) { this.breadcrumbService.breadcrumb$ .pipe(takeUntil(this.ngOnDestroy$)) .subscribe((breadcrumb) => { this.breadcrumb = breadcrumb; - this.titleService.setTitle( - `${ - this.activeFeatureSet.usesMdsId() - ? 'MDS ' + (breadcrumb[breadcrumb.length - 1].label || 'Portal') - : breadcrumb[breadcrumb.length - 1].label || 'Portal' - }`, - ); }); } diff --git a/authority-portal-frontend/src/app/shared/common/portal-layout/breadcrumb/breadcrumb.service.ts b/authority-portal-frontend/src/app/shared/common/portal-layout/breadcrumb/breadcrumb.service.ts index 2abeab6f7..75f124297 100644 --- a/authority-portal-frontend/src/app/shared/common/portal-layout/breadcrumb/breadcrumb.service.ts +++ b/authority-portal-frontend/src/app/shared/common/portal-layout/breadcrumb/breadcrumb.service.ts @@ -41,11 +41,6 @@ export class BreadcrumbService { combineLatest([this.url$(), this.replacementsChange$]).subscribe( ([url, _]) => { const breadcrumb = this.buildBreadcrumb(url); - document.title = `${ - this.activeFeatureSet.usesMdsId() - ? 'MDS ' - : breadcrumb[breadcrumb.length - 1].label || 'Authority Portal' - }`; this.breadcrumb$.next(breadcrumb); }, );