mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-11 20:47:32 +00:00
fix(console): filters on user's list ignored if you go back from user details (#8180)
# Which Problems Are Solved - As @stebenz reported, if we apply some user filters and show user's details clicking on the table's entry, if we go back again (maybe the action has to be repeated many times to see the error in action) the filter seems to be ignored and the table shows all users. # How the Problems Are Solved - There's an issue with getting data for the user's table. On ngOnInit the data is retrieved but also the data is retrieved again when the filter is applied after going back from the user details view. Due to asynchronous calls there are some times when the getData, called from ngOnInit, finishes after the call from applySearchQuery, which applies the filter, and that's why the data in the tables shows unfiltered data. In the screenshot we see that we get two results from ngOnInit call after getting the filtered data (1 result) overwriting the filtered results.  - I've added a check on ngOnInit that verifies if we have already a filter (query params) which means that we don't need to getData there as the filter and getData is going to be applied when applySearchQuery is called. Here's a video checking that the issue no longer happens: https://github.com/zitadel/zitadel/assets/30386061/9907d94f-1326-4975-8664-2a0ff51f4568 # Additional Changes - I think it's better to change the button text to apply the filter from Finish to Apply # Additional Context - Closes #8049
This commit is contained in:
@@ -34,7 +34,7 @@
|
|||||||
<button mat-stroked-button type="button" (click)="reset()">{{ 'ACTIONS.RESET' | translate }}</button>
|
<button mat-stroked-button type="button" (click)="reset()">{{ 'ACTIONS.RESET' | translate }}</button>
|
||||||
<span class="filter-middle">{{ 'FILTER.TITLE' | translate }}</span>
|
<span class="filter-middle">{{ 'FILTER.TITLE' | translate }}</span>
|
||||||
<button mat-raised-button color="primary" type="button" (click)="finish()" data-e2e="filter-finish-button">
|
<button mat-raised-button color="primary" type="button" (click)="finish()" data-e2e="filter-finish-button">
|
||||||
{{ 'ACTIONS.FINISH' | translate }}
|
{{ 'ACTIONS.APPLY' | translate }}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<form *ngIf="form" [formGroup]="form" (ngSubmit)="emitChange()">
|
<form *ngIf="form" [formGroup]="form" (ngSubmit)="emitChange()">
|
||||||
|
@@ -23,7 +23,7 @@
|
|||||||
<div class="filter-top">
|
<div class="filter-top">
|
||||||
<button mat-stroked-button (click)="resetted.emit()">{{ 'ACTIONS.RESET' | translate }}</button>
|
<button mat-stroked-button (click)="resetted.emit()">{{ 'ACTIONS.RESET' | translate }}</button>
|
||||||
<span class="filter-middle">{{ 'FILTER.TITLE' | translate }}</span>
|
<span class="filter-middle">{{ 'FILTER.TITLE' | translate }}</span>
|
||||||
<button mat-raised-button color="primary" (click)="emitFilter()">{{ 'ACTIONS.FINISH' | translate }}</button>
|
<button mat-raised-button color="primary" (click)="emitFilter()">{{ 'ACTIONS.APPLY' | translate }}</button>
|
||||||
</div>
|
</div>
|
||||||
<ng-content></ng-content>
|
<ng-content></ng-content>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -96,7 +96,10 @@ export class UserTableComponent implements OnInit {
|
|||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
this.route.queryParams.pipe(take(1)).subscribe((params) => {
|
this.route.queryParams.pipe(take(1)).subscribe((params) => {
|
||||||
this.getData(this.INITIAL_PAGE_SIZE, 0, this.type);
|
if (!params['filter']) {
|
||||||
|
this.getData(this.INITIAL_PAGE_SIZE, 0, this.type, this.searchQueries);
|
||||||
|
}
|
||||||
|
|
||||||
if (params['deferredReload']) {
|
if (params['deferredReload']) {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.getData(this.paginator.pageSize, this.paginator.pageIndex * this.paginator.pageSize, this.type);
|
this.getData(this.paginator.pageSize, this.paginator.pageIndex * this.paginator.pageSize, this.type);
|
||||||
@@ -116,7 +119,7 @@ export class UserTableComponent implements OnInit {
|
|||||||
queryParamsHandling: 'merge',
|
queryParamsHandling: 'merge',
|
||||||
skipLocationChange: false,
|
skipLocationChange: false,
|
||||||
});
|
});
|
||||||
this.getData(this.paginator.pageSize, this.paginator.pageIndex * this.paginator.pageSize, this.type);
|
this.getData(this.paginator.pageSize, this.paginator.pageIndex * this.paginator.pageSize, this.type, this.searchQueries);
|
||||||
}
|
}
|
||||||
|
|
||||||
public isAllSelected(): boolean {
|
public isAllSelected(): boolean {
|
||||||
@@ -131,7 +134,7 @@ export class UserTableComponent implements OnInit {
|
|||||||
|
|
||||||
public changePage(event: PageEvent): void {
|
public changePage(event: PageEvent): void {
|
||||||
this.selection.clear();
|
this.selection.clear();
|
||||||
this.getData(event.pageSize, event.pageIndex * event.pageSize, this.type);
|
this.getData(event.pageSize, event.pageIndex * event.pageSize, this.type, this.searchQueries);
|
||||||
}
|
}
|
||||||
|
|
||||||
public deactivateSelectedUsers(): void {
|
public deactivateSelectedUsers(): void {
|
||||||
|
@@ -497,7 +497,8 @@
|
|||||||
"TABLE": {
|
"TABLE": {
|
||||||
"SHOWUSER": "Покажи потребител {{value}}"
|
"SHOWUSER": "Покажи потребител {{value}}"
|
||||||
},
|
},
|
||||||
"DOWNLOAD": "Изтегляне"
|
"DOWNLOAD": "Изтегляне",
|
||||||
|
"APPLY": "Прилагам"
|
||||||
},
|
},
|
||||||
"MEMBERROLES": {
|
"MEMBERROLES": {
|
||||||
"IAM_OWNER": "Има контрол върху цялата инстанция, включително всички организации",
|
"IAM_OWNER": "Има контрол върху цялата инстанция, включително всички организации",
|
||||||
|
@@ -498,7 +498,8 @@
|
|||||||
"TABLE": {
|
"TABLE": {
|
||||||
"SHOWUSER": "Zobrazit uživatele {{value}}"
|
"SHOWUSER": "Zobrazit uživatele {{value}}"
|
||||||
},
|
},
|
||||||
"DOWNLOAD": "Stáhnout"
|
"DOWNLOAD": "Stáhnout",
|
||||||
|
"APPLY": "Platit"
|
||||||
},
|
},
|
||||||
"MEMBERROLES": {
|
"MEMBERROLES": {
|
||||||
"IAM_OWNER": "Má kontrolu nad celou instancí, včetně všech organizací",
|
"IAM_OWNER": "Má kontrolu nad celou instancí, včetně všech organizací",
|
||||||
|
@@ -498,7 +498,8 @@
|
|||||||
"TABLE": {
|
"TABLE": {
|
||||||
"SHOWUSER": "Zeige Benutzer {{value}}"
|
"SHOWUSER": "Zeige Benutzer {{value}}"
|
||||||
},
|
},
|
||||||
"DOWNLOAD": "Herunterladen"
|
"DOWNLOAD": "Herunterladen",
|
||||||
|
"APPLY": "Anwenden"
|
||||||
},
|
},
|
||||||
"MEMBERROLES": {
|
"MEMBERROLES": {
|
||||||
"IAM_OWNER": "Hat die Kontrolle über die gesamte Instanz, einschließlich aller Organisationen",
|
"IAM_OWNER": "Hat die Kontrolle über die gesamte Instanz, einschließlich aller Organisationen",
|
||||||
|
@@ -498,7 +498,8 @@
|
|||||||
"TABLE": {
|
"TABLE": {
|
||||||
"SHOWUSER": "Show user {{value}}"
|
"SHOWUSER": "Show user {{value}}"
|
||||||
},
|
},
|
||||||
"DOWNLOAD": "Download"
|
"DOWNLOAD": "Download",
|
||||||
|
"APPLY": "Apply"
|
||||||
},
|
},
|
||||||
"MEMBERROLES": {
|
"MEMBERROLES": {
|
||||||
"IAM_OWNER": "Has control over the whole instance, including all organizations",
|
"IAM_OWNER": "Has control over the whole instance, including all organizations",
|
||||||
|
@@ -498,7 +498,8 @@
|
|||||||
"TABLE": {
|
"TABLE": {
|
||||||
"SHOWUSER": "Mostrar usuario {{value}}"
|
"SHOWUSER": "Mostrar usuario {{value}}"
|
||||||
},
|
},
|
||||||
"DOWNLOAD": "Descargar"
|
"DOWNLOAD": "Descargar",
|
||||||
|
"APPLY": "Aplicar"
|
||||||
},
|
},
|
||||||
"MEMBERROLES": {
|
"MEMBERROLES": {
|
||||||
"IAM_OWNER": "Tiene control sobre toda la instancia, incluyendo todas las organizaciones",
|
"IAM_OWNER": "Tiene control sobre toda la instancia, incluyendo todas las organizaciones",
|
||||||
|
@@ -498,7 +498,8 @@
|
|||||||
"TABLE": {
|
"TABLE": {
|
||||||
"SHOWUSER": "Afficher l'utilisateur {{value}}"
|
"SHOWUSER": "Afficher l'utilisateur {{value}}"
|
||||||
},
|
},
|
||||||
"DOWNLOAD": "Télécharger"
|
"DOWNLOAD": "Télécharger",
|
||||||
|
"APPLY": "Appliquer"
|
||||||
},
|
},
|
||||||
"MEMBERROLES": {
|
"MEMBERROLES": {
|
||||||
"IAM_OWNER": "A le contrôle de toute l'instance, y compris toutes les organisations",
|
"IAM_OWNER": "A le contrôle de toute l'instance, y compris toutes les organisations",
|
||||||
|
@@ -497,7 +497,8 @@
|
|||||||
"TABLE": {
|
"TABLE": {
|
||||||
"SHOWUSER": "Mostra utente {{value}}"
|
"SHOWUSER": "Mostra utente {{value}}"
|
||||||
},
|
},
|
||||||
"DOWNLOAD": "Scarica"
|
"DOWNLOAD": "Scarica",
|
||||||
|
"APPLY": "Applicare"
|
||||||
},
|
},
|
||||||
"MEMBERROLES": {
|
"MEMBERROLES": {
|
||||||
"IAM_OWNER": "Ha il controllo sull'intera istanza, comprese tutte le organizzazioni",
|
"IAM_OWNER": "Ha il controllo sull'intera istanza, comprese tutte le organizzazioni",
|
||||||
|
@@ -498,7 +498,8 @@
|
|||||||
"TABLE": {
|
"TABLE": {
|
||||||
"SHOWUSER": "ユーザー {{value}} を表示する"
|
"SHOWUSER": "ユーザー {{value}} を表示する"
|
||||||
},
|
},
|
||||||
"DOWNLOAD": "ダウンロード"
|
"DOWNLOAD": "ダウンロード",
|
||||||
|
"APPLY": "アプライ"
|
||||||
},
|
},
|
||||||
"MEMBERROLES": {
|
"MEMBERROLES": {
|
||||||
"IAM_OWNER": "すべての組織を含むインスタンス全体を管理する権限を持ちます",
|
"IAM_OWNER": "すべての組織を含むインスタンス全体を管理する権限を持ちます",
|
||||||
|
@@ -498,7 +498,8 @@
|
|||||||
"TABLE": {
|
"TABLE": {
|
||||||
"SHOWUSER": "Прикажи корисник {{value}}"
|
"SHOWUSER": "Прикажи корисник {{value}}"
|
||||||
},
|
},
|
||||||
"DOWNLOAD": "Преземи"
|
"DOWNLOAD": "Преземи",
|
||||||
|
"APPLY": "Пријавете се"
|
||||||
},
|
},
|
||||||
"MEMBERROLES": {
|
"MEMBERROLES": {
|
||||||
"IAM_OWNER": "Има контрола врз целата инстанца, вклучувајќи ги сите организации",
|
"IAM_OWNER": "Има контрола врз целата инстанца, вклучувајќи ги сите организации",
|
||||||
|
@@ -498,7 +498,8 @@
|
|||||||
"TABLE": {
|
"TABLE": {
|
||||||
"SHOWUSER": "Toon gebruiker {{value}}"
|
"SHOWUSER": "Toon gebruiker {{value}}"
|
||||||
},
|
},
|
||||||
"DOWNLOAD": "Download"
|
"DOWNLOAD": "Download",
|
||||||
|
"APPLY": "Toepassen"
|
||||||
},
|
},
|
||||||
"MEMBERROLES": {
|
"MEMBERROLES": {
|
||||||
"IAM_OWNER": "Heeft controle over de hele instantie, inclusief alle organisaties",
|
"IAM_OWNER": "Heeft controle over de hele instantie, inclusief alle organisaties",
|
||||||
|
@@ -497,7 +497,8 @@
|
|||||||
"TABLE": {
|
"TABLE": {
|
||||||
"SHOWUSER": "Pokaż użytkownika {{value}}"
|
"SHOWUSER": "Pokaż użytkownika {{value}}"
|
||||||
},
|
},
|
||||||
"DOWNLOAD": "Pobierz"
|
"DOWNLOAD": "Pobierz",
|
||||||
|
"APPLY": "Stosować"
|
||||||
},
|
},
|
||||||
"MEMBERROLES": {
|
"MEMBERROLES": {
|
||||||
"IAM_OWNER": "Ma kontrolę nad całą instancją, włącznie z wszystkimi organizacjami",
|
"IAM_OWNER": "Ma kontrolę nad całą instancją, włącznie z wszystkimi organizacjami",
|
||||||
|
@@ -498,7 +498,8 @@
|
|||||||
"TABLE": {
|
"TABLE": {
|
||||||
"SHOWUSER": "Mostrar usuário {{value}}"
|
"SHOWUSER": "Mostrar usuário {{value}}"
|
||||||
},
|
},
|
||||||
"DOWNLOAD": "Baixar"
|
"DOWNLOAD": "Baixar",
|
||||||
|
"APPLY": "Aplicar"
|
||||||
},
|
},
|
||||||
"MEMBERROLES": {
|
"MEMBERROLES": {
|
||||||
"IAM_OWNER": "Tem controle sobre toda a instância, incluindo todas as organizações",
|
"IAM_OWNER": "Tem controle sobre toda a instância, incluindo todas as organizações",
|
||||||
|
@@ -497,7 +497,8 @@
|
|||||||
"TABLE": {
|
"TABLE": {
|
||||||
"SHOWUSER": "Показать пользователя {{value}}"
|
"SHOWUSER": "Показать пользователя {{value}}"
|
||||||
},
|
},
|
||||||
"DOWNLOAD": "Скачать"
|
"DOWNLOAD": "Скачать",
|
||||||
|
"APPLY": "Применять"
|
||||||
},
|
},
|
||||||
"MEMBERROLES": {
|
"MEMBERROLES": {
|
||||||
"IAM_OWNER": "Имеет контроль над всем экземпляром, включая все организации",
|
"IAM_OWNER": "Имеет контроль над всем экземпляром, включая все организации",
|
||||||
|
@@ -498,7 +498,8 @@
|
|||||||
"TABLE": {
|
"TABLE": {
|
||||||
"SHOWUSER": "Visa användare {{value}}"
|
"SHOWUSER": "Visa användare {{value}}"
|
||||||
},
|
},
|
||||||
"DOWNLOAD": "Ladda ner"
|
"DOWNLOAD": "Ladda ner",
|
||||||
|
"APPLY": "Tillämpa"
|
||||||
},
|
},
|
||||||
"MEMBERROLES": {
|
"MEMBERROLES": {
|
||||||
"IAM_OWNER": "Har kontroll över hela instansen, inklusive alla organisationer",
|
"IAM_OWNER": "Har kontroll över hela instansen, inklusive alla organisationer",
|
||||||
|
@@ -498,7 +498,8 @@
|
|||||||
"TABLE": {
|
"TABLE": {
|
||||||
"SHOWUSER": "Show user {{value}}"
|
"SHOWUSER": "Show user {{value}}"
|
||||||
},
|
},
|
||||||
"DOWNLOAD": "下载"
|
"DOWNLOAD": "下载",
|
||||||
|
"APPLY": "申请"
|
||||||
},
|
},
|
||||||
"MEMBERROLES": {
|
"MEMBERROLES": {
|
||||||
"IAM_OWNER": "控制整个实例,包括所有组织",
|
"IAM_OWNER": "控制整个实例,包括所有组织",
|
||||||
|
Reference in New Issue
Block a user