In this pr we allow people with access to the usersTable to see if a certain user is suspended or not. If the person with access to a table is an admin, they also have access to a "Suspend" and a "Restore" button that changes that row's user's suspend value
Screenshots
This is the usersTable while I'm logged into an admin account
Dependencies
PR #63 and PR #59 must be merged before this PR since this PR uses the suspend endpoints and suspend fields in the user object from those PRs respectively.
Future Possibilities
This is the first frontend part of the suspend EPIC, the issue following this will add a modal for confirming a suspension or restoration of a user
Navigate to usersTable (go to Admin dropdown on navbar then click on "Users"
Check if you can see the "Suspend" and "Restore" buttons and play around with them, to see the "Suspended" field with an updated value, you will need to refresh the page to rerender the table. Additionally, if you use this on another app with existing members, the "Suspended" field will return null since those users were created before the suspended field was added. Simply click on one of the buttons to update their "Suspended" field.
Tests
Made tests for usersUtils.js and expanded existing tests and well as making new ones in UsersTable.test.js to cover the correct rendering of the new columns in the table as well as ensuring the buttons function correctly on click.
This PR has a bug in it, in the sense that it does not properly handle the React Query key so that the page refreshes. I'll merge it anyway, but you should mention this in the release notes.
Overview
In this pr we allow people with access to the usersTable to see if a certain user is suspended or not. If the person with access to a table is an admin, they also have access to a "Suspend" and a "Restore" button that changes that row's user's suspend value
Screenshots
This is the usersTable while I'm logged into an admin account
Dependencies
PR #63 and PR #59 must be merged before this PR since this PR uses the suspend endpoints and suspend fields in the user object from those PRs respectively.
Future Possibilities
This is the first frontend part of the suspend EPIC, the issue following this will add a modal for confirming a suspension or restoration of a user
Validation
Tests
Made tests for
usersUtils.js
and expanded existing tests and well as making new ones inUsersTable.test.js
to cover the correct rendering of the new columns in the table as well as ensuring the buttons function correctly on click.Linked Issues
Closes #42