Story #53 Update "attending" checkbox to update database - cseseniordesign/reservations GitHub Wiki

End User Documentation

Dev Testing Instructions

  1. Make sure you are on the most recent version of the dev-update-attending-checkbox-to-update-DB branch.
  2. Start your dev environment and log in with development2 so you have all permissions.
  3. Navigate to the Admin -> Event page
  4. Create a new Event and reserve tools for the event
  5. Login with multiple accounts and signup for the event that you created (event_signups table in the DB has these new records and attended value =0)
  6. Login with development2 and navigate to Admin -> Event page again
  7. Select the signup list under the Signups column
  8. Check the attended members and click save signup list (DB: event_signups table - attended column value = 1, resource_authorizations table added new records )
  9. repeat step 7 and uncheck the checked boxes to reverse the behavior in step 8

Production Testing Instructions

  1. Go to https://innovationstudio-manager.unl.edu/login/ and log in with an account that has elevated permissions to view the Admin -> Event page.
  2. Follow steps 3 and up from the dev testing instructions above.

Technical Documentation

routes/admin/events.rb

  • Changes within the post /admin/events/:event_id/signup_list/? route:
    • Added logic to add the tool permission same as the reserved tools for the event to the checked-off member and set the attended value to one.
    • Added logic to remove the given tool permission from this event when unchecking a checked member and resetting the attended value to zero.

views/admin/signup_list.erb

  • Added an explanatory header above the table
  • Added a form with submit button
  • Added logic to check the checkbox of the saved attended member