Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IA-3364 user history front end #1615

Merged
merged 46 commits into from
Sep 13, 2024
Merged

IA-3364 user history front end #1615

merged 46 commits into from
Sep 13, 2024

Conversation

quang-le
Copy link
Member

@quang-le quang-le commented Sep 9, 2024

Explain what problem this PR is resolving

Related JIRA tickets : IA-3364

Self proofreading checklist

  • Did I use eslint and black formatters
  • Is my code clear enough and well documented
  • Are my typescript files well typed
  • New translations have been added or updated if new strings have been introduced in the frontend
  • My migrations file are included
  • Are there enough tests
  • Documentation has been included (for new feature)

Doc

Changes

  • Add sub menu to "users" menu entry.
  • Use `USERS_ADMIN" permission to control access
  • List view:
    • Call userlogs api
    • Populate table
    • Filters:
      • users
      • modification date
      • location: filters on past and new org units
  • Details view:
    • Use table subComponent to expand the view under the current row
    • call logs api to get data
    • Duplicate all logs related components and adapt them for users

How to test

  • Go to users > management
  • create a user
  • update a user
  • update multiple users by selecting them via the table. IMPORTANT: you need an active worker for this part
  • create multiple users via csv

Go to users > history:

  • All creations and updates should appear in the table
  • Test out all the filters
  • Expand logs to compare before and after views.

Print screen / video

Uploading Screen Recording 2024-09-09 at 17.08.00.mov…

Notes

Merges into #1614

- fix default pageSize
- remove sort on columns with list values
- Add UserHistoryLogDetails, UserLogCompare, UserLogValueWithErrorBoundary, UserLogValue
- All are derived from the existing Log components which are specific to org units and repurposed for users
- Add translations
@quang-le quang-le marked this pull request as draft September 9, 2024 10:59
@quang-le quang-le changed the title Ia 3364 user history front end IA-3364 user history front end Sep 9, 2024
@quang-le quang-le marked this pull request as ready for review September 9, 2024 15:09
- Update WarningModal o make it reusable
- Add WarningModal if user updates existing phone number
- handle all warning cases in one modal
@beygorghor beygorghor self-requested a review September 11, 2024 11:12
Copy link
Collaborator

@beygorghor beygorghor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Screenshot 2024-09-11 at 13 24 57

@beygorghor
Copy link
Collaborator

We can also probably only display when password has been changed also:

Screenshot 2024-09-11 at 13 32 40

@quang-le
Copy link
Member Author

Screenshot 2024-09-11 at 13 24 57

Showing errors in phone number field is a bit out of scope for this PR in my opinion. Anyway, it would require using the exact same validation list as the backend. I didn't use it in the PhoneNumber component, because it's not always reliable (I managed to invalidate a valid belgian number when testing) and I didn't want to exclude valid phone numbers.

- update menu and base urtl to highlight current menu location
- update related test plus a hardcoded url in WFP
- invalidate usersHistoryList queryKey when saving a user
@quang-le quang-le requested a review from beygorghor September 12, 2024 14:08
- don't show password updated unless it's True
@quang-le quang-le added the release Should be released in production at next deploy label Sep 12, 2024
Base automatically changed from IA-3402_add_user_history_api to main September 13, 2024 09:38
@quang-le quang-le merged commit 07e541e into main Sep 13, 2024
3 checks passed
@quang-le quang-le deleted the IA-3364_user_history_front-end branch September 13, 2024 09:43
@kemar kemar removed the release Should be released in production at next deploy label Oct 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants