diff --git a/CHANGELOG.md b/CHANGELOG.md index df888dd2..5a494ee6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,7 @@ please see [changelog_updates.md](docs/dev/changelog_updates.md). - Already registered connectors will be updated automatically, this process can take up to 24 hours - Added a message when the CaaS request feature is not available - Catalog: Removed dataspace filter when only one dataspace is known +- Organization list: Data offer and connector counts now show the correct numbers according to the active environment ### Known issues 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 2107f21e..943bda19 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 @@ -34,6 +34,7 @@ import { SlideOverAction, SlideOverConfig, } from 'src/app/shared/common/slide-over/slide-over.model'; +import {GlobalStateUtils} from '../../../core/global-state/global-state-utils'; import {AuthorityOrganizationDetailPageComponent} from '../../authority-organization-detail-page/authority-organization-detail-page/authority-organization-detail-page.component'; import {AuthorityInviteNewOrganizationComponent} from '../authority-invite-new-organization/authority-invite-new-organization.component'; import { @@ -71,6 +72,7 @@ export class AuthorityOrganizationListPageComponent private store: Store, public dialog: MatDialog, private slideOverService: SlideOverService, + private globalStateUtils: GlobalStateUtils, ) {} ngOnInit() { @@ -78,6 +80,7 @@ export class AuthorityOrganizationListPageComponent this.initializeFilterBar(); this.refresh(); this.startListeningToState(); + this.startRefreshingOnEnvChange(); } initializeHeaderBar() { @@ -128,6 +131,15 @@ export class AuthorityOrganizationListPageComponent }); } + private startRefreshingOnEnvChange() { + this.globalStateUtils.onDeploymentEnvironmentChangeSkipFirst({ + ngOnDestroy$: this.ngOnDestroy$, + onChanged: () => { + this.refresh(); + }, + }); + } + openDetailPage(organization: OrganizationOverviewEntryDto) { this.slideOverConfig = { childComponentInput: {