Skip to content

Commit

Permalink
Merge branch '287-authority-section--organizations--users-live-update…
Browse files Browse the repository at this point in the history
…-when-deactivatingactivating-users' of https://github.com/sovity/authority-portal into 287-authority-section--organizations--users-live-update-when-deactivatingactivating-users
  • Loading branch information
illfixit committed Oct 9, 2024
2 parents 1d74bfd + ff73868 commit 4cba5fa
Show file tree
Hide file tree
Showing 10 changed files with 72 additions and 23 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ please see [changelog_updates.md](docs/dev/changelog_updates.md).
#### Patch

- Added documentation for roles and rights ([#334](https://github.com/sovity/authority-portal/issues/334))
- 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))

### Known issues

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion authority-portal-backend/gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ npmVersion = "8.15.0"

sovity-edcCe = "10.4.1"

quarkus = "3.9.2"
quarkus = "3.15.1"
quarkus-keycloakAdminClientReactive = "3.6.6"
quarkus-jooq = "2.0.0"

Expand Down
16 changes: 8 additions & 8 deletions authority-portal-frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ export class RegisterCentralComponentPageComponent
() => {
setTimeout(() => {
this.stepper.next();
}, 0);
}, 300);
},
),
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ 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 {BreadcrumbService} from '../../../shared/common/portal-layout/breadcrumb/breadcrumb.service';
import {Reset} from './state/control-center-organization-members-page-action';
import {
Expand All @@ -37,11 +38,13 @@ export class ControlCenterOrganizationMembersPageComponent
private store: Store,
private router: Router,
private breadcrumbService: BreadcrumbService,
private globalStateUtils: GlobalStateUtils,
) {}

ngOnInit(): void {
this.refresh();
this.startListeningToState();
this.startRefreshingOnEnvChange();
}

refresh(): void {
Expand Down Expand Up @@ -69,6 +72,15 @@ export class ControlCenterOrganizationMembersPageComponent
this.router.navigate(['control-center/users-and-roles', user.userId]);
}

startRefreshingOnEnvChange() {
this.globalStateUtils.onDeploymentEnvironmentChangeSkipFirst({
ngOnDestroy$: this.ngOnDestroy$,
onChanged: () => {
this.refresh();
},
});
}

ngOnDestroy$ = new Subject();
ngOnDestroy(): void {
this.ngOnDestroy$.next(null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import {Component, OnDestroy, OnInit} from '@angular/core';
import {Subject, takeUntil} from 'rxjs';
import {Store} from '@ngxs/store';
import {GlobalStateUtils} from 'src/app/core/global-state/global-state-utils';
import {Reset} from '../state/control-center-organization-profile-page-action';
import {
ControlCenterOrganizationProfilePageState,
Expand All @@ -30,11 +31,15 @@ export class ControlCenterOrganizationProfilePageComponent
state: ControlCenterOrganizationProfilePageState =
DEFAULT_CONTROL_CENTER_ORGANIZATION_PROFILE_PAGE_STATE;

constructor(private store: Store) {}
constructor(
private store: Store,
private globalStateUtils: GlobalStateUtils,
) {}

ngOnInit(): void {
this.refresh();
this.startListeningToState();
this.startRefreshingOnEnvChange();
}

refresh(): void {
Expand All @@ -52,6 +57,15 @@ export class ControlCenterOrganizationProfilePageComponent
});
}

startRefreshingOnEnvChange() {
this.globalStateUtils.onDeploymentEnvironmentChangeSkipFirst({
ngOnDestroy$: this.ngOnDestroy$,
onChanged: () => {
this.refresh();
},
});
}

ngOnDestroy$ = new Subject();
ngOnDestroy(): void {
this.ngOnDestroy$.next(null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import {Component, OnDestroy, OnInit} from '@angular/core';
import {Subject, takeUntil} from 'rxjs';
import {Store} from '@ngxs/store';
import {GlobalStateUtils} from 'src/app/core/global-state/global-state-utils';
import {Reset} from '../state/control-center-user-profile-page-action';
import {
ControlCenterUserProfilePageState,
Expand All @@ -30,11 +31,15 @@ export class ControlCenterUserProfilePageComponent
state: ControlCenterUserProfilePageState =
DEFAULT_CONTROL_CENTER_USER_PROFILE_PAGE_STATE;

constructor(private store: Store) {}
constructor(
private store: Store,
private globalStateUtils: GlobalStateUtils,
) {}

ngOnInit(): void {
this.refresh();
this.startListeningToState();
this.startRefreshingOnEnvChange();
}

refresh(): void {
Expand All @@ -52,6 +57,15 @@ export class ControlCenterUserProfilePageComponent
});
}

startRefreshingOnEnvChange() {
this.globalStateUtils.onDeploymentEnvironmentChangeSkipFirst({
ngOnDestroy$: this.ngOnDestroy$,
onChanged: () => {
this.refresh();
},
});
}

ngOnDestroy$ = new Subject();
ngOnDestroy(): void {
this.ngOnDestroy$.next(null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</mat-dialog-content>
<mat-dialog-actions class="flex gap-3" align="end">
<button
*ngFor="let button of confirmationDialog.actionButtons.reverse()"
*ngFor="let button of confirmationDialog.actionButtons"
[ngClass]="button?.style || 'btn-accent-outline'"
(click)="actionHandler(button.action)">
{{ button.label }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,16 @@ export class ConfirmationDialogComponent {
private dialogRef: MatDialogRef<ConfirmationDialogComponent>,
@Inject(MAT_DIALOG_DATA) public confirmationDialog: ConfirmationDialog,
) {
this.confirmationDialog.actionButtons.push({
label: 'Cancel',
action: 'CANCEL',
});
this.confirmationDialog = {
...this.confirmationDialog,
actionButtons: [
...this.confirmationDialog.actionButtons,
{
label: 'Cancel',
action: 'CANCEL',
},
].reverse(),
};
}

actionHandler(action: string) {
Expand Down

0 comments on commit 4cba5fa

Please sign in to comment.