Story #99 Single button for membership renewing - cseseniordesign/reservations GitHub Wiki
End User Documentation
Dev Testing Instructions
- Make sure you are on the most recent version of the
dev-single-button-for-renewing
branch.
- Start your dev environment.
- Underneath the Admin header click Users.
- Click the edit button next to the user who's expiration date you would like to renew.
- Scroll down to the bottom of the page and click the
Renew Membership
button.
- Validate that the user's expiration date has been updated to be 30 days from the current day.
- Ensure there are no errors in the console throughout your testing and that the page is still responsive on all screen sizes.
Production Testing Instructions
- Go to https://innovationstudio-manager.unl.edu/home/.
- Follow steps 3 and up from the dev testing instructions above.
Technical Documentation
routes/admin/users.rb
- Added new POST method,
/admin/users/:user_id/renew/?
.
- This POST method is extremely similar to the expiration date section of another post method
/admin/users/:user_id/edit/?
.
/admin/users/:user_id/renew/?
gets the user and then sets their expiration date to be 30 days out from the current day.
- The information is saved to the database and the user is redirected to
/admin/users/
.
views/admin/edit_user.erb
- Added a new form which gets the edited user's ID and passes it to the renew POST method.
- Added a submit button for the form which has a label of "Renew Membership".