Story #64 Reduce Member Table Load Time, Story #68 Remove expiration status from studio status in edit user | User and Technical Documentation - cseseniordesign/reservations GitHub Wiki
End User Documentation
Dev Testing Instructions
Make sure you are on the most recent version of the dev-reduce-member-table-loading-time branch.
Start your dev environment and log in with development2 so you have all permissions.
Navigate to the Admin -> Users page
Ensure that when the page loads no users show and you just see the search options.
Complete some searches and make sure the users that meet the search criteria show. If you search without entering any search filters you should see all users.
Ensure sorting still works.
Ensure the "no users meet this search criteria" message shows if you search for users with criteria that no users meet.
Search for users with first name "development"
Click edit on any of the development users
Ensure that you now see a dropdown for "email preference" instead of "studio status". The email preference dropdown should have options for opt-in and opt-out.
Modify the email preferences and save the user. Ensure the database updates the user's space_status accordingly based on the selected email preference and the user's expiration date.
Ensure there are no errors in the console throughout your testing, the page is still responsive on all screen sizes, and everything is readable in dark and light mode.
Follow steps 3 and up from the dev testing instructions above.
Technical Documentation
routes/admin/users.rb
Added logic to only pull in and filter users if params > 0. params will only = 0 if the page is initially loading
views/admin/edit_user.erb
Replaced the studio status dropdown with an email preferences dropdown which has options for opt-in and opt-out.
views/admin/users.erb
Added a check to only show the "no users meet this search criteria" message if params > 0. This way it does not show on initial page load when the page shows no users by default.