kikocis/dataspace-portal public
Changesets · Branches · Tags · Compare
| Changeset | f136631351025a9cb2786a136784753fee6f66170e25ddcbd657884ab8afd19d |
|---|---|
| Author | Ilia Orlov <66363651+illfixit@users.noreply.github.com> · 2024-10-09 11:37 +02:00 |
| Committer | GitHub <noreply@github.com> · 2024-10-09 11:37 +02:00 |
| Parents | cd8c83ceb457 |
4 files changed
modified CHANGELOG.md +1 −0
| @@ -16,6 +16,7 @@ | ||
| 16 | 16 | #### Patch |
| 17 | 17 | |
| 18 | 18 | - Added documentation for roles and rights ([#334](https://github.com/sovity/authority-portal/issues/334)) |
| 19 | +- Fixed My Organization page not updated when switching between environments ([#255](https://github.com/sovity/authority-portal/issues/255)) | |
| 19 | 20 | |
| 20 | 21 | ### Known issues |
| 21 | 22 |
modified authority-portal-frontend/src/app/pages/control-center-organization-members-page/control-center-organization-members-page/control-center-organization-members-page.component.ts +12 −0
| @@ -15,6 +15,7 @@ | ||
| 15 | 15 | import {Subject, takeUntil} from 'rxjs'; |
| 16 | 16 | import {Store} from '@ngxs/store'; |
| 17 | 17 | import {MemberInfo} from '@sovity.de/authority-portal-client'; |
| 18 | +import {GlobalStateUtils} from 'src/app/core/global-state/global-state-utils'; | |
| 18 | 19 | import {BreadcrumbService} from '../../../shared/common/portal-layout/breadcrumb/breadcrumb.service'; |
| 19 | 20 | import {Reset} from './state/control-center-organization-members-page-action'; |
| 20 | 21 | import { |
| @@ -37,11 +38,13 @@ | ||
| 37 | 38 | private store: Store, |
| 38 | 39 | private router: Router, |
| 39 | 40 | private breadcrumbService: BreadcrumbService, |
| 41 | + private globalStateUtils: GlobalStateUtils, | |
| 40 | 42 | ) {} |
| 41 | 43 | |
| 42 | 44 | ngOnInit(): void { |
| 43 | 45 | this.refresh(); |
| 44 | 46 | this.startListeningToState(); |
| 47 | + this.startRefreshingOnEnvChange(); | |
| 45 | 48 | } |
| 46 | 49 | |
| 47 | 50 | refresh(): void { |
| @@ -69,6 +72,15 @@ | ||
| 69 | 72 | this.router.navigate(['control-center/users-and-roles', user.userId]); |
| 70 | 73 | } |
| 71 | 74 | |
| 75 | + startRefreshingOnEnvChange() { | |
| 76 | + this.globalStateUtils.onDeploymentEnvironmentChangeSkipFirst({ | |
| 77 | + ngOnDestroy$: this.ngOnDestroy$, | |
| 78 | + onChanged: () => { | |
| 79 | + this.refresh(); | |
| 80 | + }, | |
| 81 | + }); | |
| 82 | + } | |
| 83 | + | |
| 72 | 84 | ngOnDestroy$ = new Subject(); |
| 73 | 85 | ngOnDestroy(): void { |
| 74 | 86 | this.ngOnDestroy$.next(null); |
modified authority-portal-frontend/src/app/pages/control-center-organization-profile-page/control-center-organization-profile-page/control-center-organization-profile-page.component.ts +15 −1
| @@ -13,6 +13,7 @@ | ||
| 13 | 13 | import {Component, OnDestroy, OnInit} from '@angular/core'; |
| 14 | 14 | import {Subject, takeUntil} from 'rxjs'; |
| 15 | 15 | import {Store} from '@ngxs/store'; |
| 16 | +import {GlobalStateUtils} from 'src/app/core/global-state/global-state-utils'; | |
| 16 | 17 | import {Reset} from '../state/control-center-organization-profile-page-action'; |
| 17 | 18 | import { |
| 18 | 19 | ControlCenterOrganizationProfilePageState, |
| @@ -30,11 +31,15 @@ | ||
| 30 | 31 | state: ControlCenterOrganizationProfilePageState = |
| 31 | 32 | DEFAULT_CONTROL_CENTER_ORGANIZATION_PROFILE_PAGE_STATE; |
| 32 | 33 | |
| 33 | - constructor(private store: Store) {} | |
| 34 | + constructor( | |
| 35 | + private store: Store, | |
| 36 | + private globalStateUtils: GlobalStateUtils, | |
| 37 | + ) {} | |
| 34 | 38 | |
| 35 | 39 | ngOnInit(): void { |
| 36 | 40 | this.refresh(); |
| 37 | 41 | this.startListeningToState(); |
| 42 | + this.startRefreshingOnEnvChange(); | |
| 38 | 43 | } |
| 39 | 44 | |
| 40 | 45 | refresh(): void { |
| @@ -52,6 +57,15 @@ | ||
| 52 | 57 | }); |
| 53 | 58 | } |
| 54 | 59 | |
| 60 | + startRefreshingOnEnvChange() { | |
| 61 | + this.globalStateUtils.onDeploymentEnvironmentChangeSkipFirst({ | |
| 62 | + ngOnDestroy$: this.ngOnDestroy$, | |
| 63 | + onChanged: () => { | |
| 64 | + this.refresh(); | |
| 65 | + }, | |
| 66 | + }); | |
| 67 | + } | |
| 68 | + | |
| 55 | 69 | ngOnDestroy$ = new Subject(); |
| 56 | 70 | ngOnDestroy(): void { |
| 57 | 71 | this.ngOnDestroy$.next(null); |
modified authority-portal-frontend/src/app/pages/control-center-user-profile-page/control-center-user-profile-page/control-center-user-profile-page.component.ts +15 −1
| @@ -13,6 +13,7 @@ | ||
| 13 | 13 | import {Component, OnDestroy, OnInit} from '@angular/core'; |
| 14 | 14 | import {Subject, takeUntil} from 'rxjs'; |
| 15 | 15 | import {Store} from '@ngxs/store'; |
| 16 | +import {GlobalStateUtils} from 'src/app/core/global-state/global-state-utils'; | |
| 16 | 17 | import {Reset} from '../state/control-center-user-profile-page-action'; |
| 17 | 18 | import { |
| 18 | 19 | ControlCenterUserProfilePageState, |
| @@ -30,11 +31,15 @@ | ||
| 30 | 31 | state: ControlCenterUserProfilePageState = |
| 31 | 32 | DEFAULT_CONTROL_CENTER_USER_PROFILE_PAGE_STATE; |
| 32 | 33 | |
| 33 | - constructor(private store: Store) {} | |
| 34 | + constructor( | |
| 35 | + private store: Store, | |
| 36 | + private globalStateUtils: GlobalStateUtils, | |
| 37 | + ) {} | |
| 34 | 38 | |
| 35 | 39 | ngOnInit(): void { |
| 36 | 40 | this.refresh(); |
| 37 | 41 | this.startListeningToState(); |
| 42 | + this.startRefreshingOnEnvChange(); | |
| 38 | 43 | } |
| 39 | 44 | |
| 40 | 45 | refresh(): void { |
| @@ -52,6 +57,15 @@ | ||
| 52 | 57 | }); |
| 53 | 58 | } |
| 54 | 59 | |
| 60 | + startRefreshingOnEnvChange() { | |
| 61 | + this.globalStateUtils.onDeploymentEnvironmentChangeSkipFirst({ | |
| 62 | + ngOnDestroy$: this.ngOnDestroy$, | |
| 63 | + onChanged: () => { | |
| 64 | + this.refresh(); | |
| 65 | + }, | |
| 66 | + }); | |
| 67 | + } | |
| 68 | + | |
| 55 | 69 | ngOnDestroy$ = new Subject(); |
| 56 | 70 | ngOnDestroy(): void { |
| 57 | 71 | this.ngOnDestroy$.next(null); |