mirror of
https://github.com/andwati/zitadel.git
synced 2026-11-01 11:52:15 +00:00
fix(console): routing on org change (#4369)
fix: console routing on org change Co-authored-by: Silvan <[email protected]> Co-authored-by: Fabi <[email protected]>
This commit is contained in:
co-authored by
Silvan
Fabi
parent
ef87a53dfc
commit
49396c4678
@@ -23,18 +23,9 @@
|
||||
matSort
|
||||
(matSortChange)="sortChange($event)"
|
||||
>
|
||||
<ng-container matColumnDef="select">
|
||||
<th class="selection" mat-header-cell *matHeaderCellDef>
|
||||
{{ 'ORG.PAGES.ACTIVE' | translate }}
|
||||
</th>
|
||||
<td class="selection" mat-cell *matCellDef="let org">
|
||||
<mat-radio-button (change)="selectOrg(org)" color="primary" [checked]="org.id === activeOrg.id"> </mat-radio-button>
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="id">
|
||||
<th mat-header-cell *matHeaderCellDef>{{ 'ORG.PAGES.ID' | translate }}</th>
|
||||
<td mat-cell *matCellDef="let org" (change)="selectOrg(org)">{{ org.id }}</td>
|
||||
<td mat-cell *matCellDef="let org" (click)="setAndNavigateToOrg(org)">{{ org.id }}</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="primaryDomain">
|
||||
@@ -58,7 +49,6 @@
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="name">
|
||||
<!-- mat-sort-header -->
|
||||
<th mat-header-cell *matHeaderCellDef>
|
||||
{{ 'ORG.PAGES.NAME' | translate }}
|
||||
</th>
|
||||
|
||||
@@ -94,14 +94,6 @@ export class OrgTableComponent {
|
||||
);
|
||||
}
|
||||
|
||||
public selectOrg(item: Org.AsObject, event?: any): void {
|
||||
this.authService.setActiveOrg(item);
|
||||
this.themeService.loadPrivateLabelling();
|
||||
this.authService.zitadelPermissions$.pipe(take(1)).subscribe(() => {
|
||||
this.router.navigate(['/org'], { fragment: item.id });
|
||||
});
|
||||
}
|
||||
|
||||
public refresh(): void {
|
||||
this.requestOrgs$.next({
|
||||
limit: this.paginator.length,
|
||||
@@ -146,9 +138,7 @@ export class OrgTableComponent {
|
||||
public setAndNavigateToOrg(org: Org.AsObject): void {
|
||||
this.authService.setActiveOrg(org);
|
||||
this.themeService.loadPrivateLabelling();
|
||||
this.authService.zitadelPermissions$.pipe(take(1)).subscribe(() => {
|
||||
this.router.navigate(['/org'], { fragment: org.id });
|
||||
});
|
||||
this.router.navigate(['/org']);
|
||||
}
|
||||
|
||||
public changePage(): void {
|
||||
|
||||
Reference in New Issue
Block a user