feat: Add filter to the consumers list #52
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Added an input field to filter consumers in the respective screen, a functionally everyone at my team greatly need :)
The filter is implemented as an anguler filter for the
ng-repeat
onconsumerList
, and it's filtering bydisplayText
to avoid making things complicated.Example
Before filter:
![image](https://private-user-images.githubusercontent.com/5982436/296979880-4807f501-542e-489c-a040-190609db56fd.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk1NDc4MDgsIm5iZiI6MTczOTU0NzUwOCwicGF0aCI6Ii81OTgyNDM2LzI5Njk3OTg4MC00ODA3ZjUwMS01NDJlLTQ4OWMtYTA0MC0xOTA2MDlkYjU2ZmQucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIxNCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMTRUMTUzODI4WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9YzA5ZDU5NjA1ZjU1M2ExMzAyYWZjNmQ2ZGMxODg0YTIzMzA0NjdiNzZkZmU4MjEyYjFiOWJhYmZkZTRjYTljZSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.7u2GbFViMFzaaZGbD1zGduyuitF0qXcLOM845a_3C0E)
![image](https://private-user-images.githubusercontent.com/5982436/296979691-54b46b9a-d260-480d-b224-ab5205e834ae.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk1NDc4MDgsIm5iZiI6MTczOTU0NzUwOCwicGF0aCI6Ii81OTgyNDM2LzI5Njk3OTY5MS01NGI0NmI5YS1kMjYwLTQ4MGQtYjIyNC1hYjUyMDVlODM0YWUucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIxNCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMTRUMTUzODI4WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9YTExYWYzNDNjNTE0ZGNjMDM2M2JkMDgzNzRhNDU5MTE2YWUxYzUyNjQ1ODNhMzJmMmE2ZTlhN2NlNmY1Nzc5NSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.IR619JLoryX_tWEz6gaMYDAV9v7XghrEZfBMnzBw8Ow)
After filter:
Notes
Most of the code changes were done by Prettier. I've made sure that I pass lint, but if something goes against the coding style let me know and I'll redo the PR to only include the changes I made without any formatting.