zitadel/console
Miguel Cabrerizo 728158298d
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.

![Captura desde 2024-06-23
14-02-30](https://github.com/zitadel/zitadel/assets/30386061/fdfa8353-04c6-4892-bd39-aa75dd4d2049)

- 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
2024-06-28 13:04:05 +00:00
..
src fix(console): filters on user's list ignored if you go back from user details (#8180) 2024-06-28 13:04:05 +00:00
.editorconfig feat(console): integrate frontend (#95) 2020-05-13 14:41:43 +02:00
.eslintrc.js fix(console): update eslint, redirect user without roles, private labeling save and icon (#4459) 2022-09-29 05:25:57 +00:00
.gitignore chore(console): buf stub build (#5215) 2023-02-17 14:09:11 +00:00
.prettierignore chore(e2e): formatting with prettier (#4385) 2022-09-19 19:49:46 +02:00
.prettierrc fix(console): use authService for auth user page (#5233) 2023-02-27 12:03:44 +01:00
angular.json refactor: copy only required frameworks icons from docs in console (#7538) 2024-03-11 08:33:05 +00:00
buf.gen.yaml chore(console): buf stub build (#5215) 2023-02-17 14:09:11 +00:00
karma.conf.js feat(console): integrate frontend (#95) 2020-05-13 14:41:43 +02:00
ngsw-config.json fix: update assets in ngsw-config.json (#1027) 2020-11-27 16:32:14 +01:00
package.json feat(console): integrate app (#7417) 2024-02-28 16:52:21 +00:00
prebuild.development.js chore(dev): fix fetching http env json (#5921) 2023-05-24 13:07:55 +00:00
README.md docs(contributing): remove guides folder (#4603) 2022-10-24 08:43:24 +02:00
tsconfig.app.json fix(console): angular 15 (#4809) 2023-01-11 13:23:16 +00:00
tsconfig.json feat(console): integrate app (#7417) 2024-02-28 16:52:21 +00:00
tsconfig.spec.json chore(console): dependency update (#5653) 2023-04-18 15:42:29 +02:00
yarn.lock feat: provide option to limit (T)OTP checks (#7693) 2024-04-10 09:14:55 +00:00

Console

This project was generated with Angular CLI version 8.3.20.

Development server

Run ng serve for a dev server. Navigate to http://localhost:4200/. The app will automatically reload if you change any of the source files.

Code scaffolding

Run ng generate component component-name to generate a new component. You can also use ng generate directive|pipe|service|class|guard|interface|enum|module.

Build

Run ng build to build the project. The build artifacts will be stored in the dist/ directory. Use the --prod flag for a production build.

Running unit tests

Run ng test to execute the unit tests via Karma.

Running end-to-end tests

Please refer to the contributing guide

Further help

To get more help on the Angular CLI use ng help or go check out the Angular CLI README.