Story #106 Update Event Signup to Support Signup using a Code | User and Technical Documentation - cseseniordesign/reservations GitHub Wiki

End User Documentation

Dev Testing Instructions

  1. Make sure you are on the most recent version of the dev-add-code-to-event branch.
  2. Start your dev environment and log in with development2 so you have all permissions.
  3. Navigate to the Admin -> Events page
  4. Create a new event from a preset. Ensure that there is now an input field to enter a code. Enter a code, set the event to a time later today, then save it.
  5. Create another new event and set it for another time later today but don't give it a code.
  6. Go to Manage Your Studio -> Trainings.
    • Sign up for the event without the code and ensure it just signs you up without asking for a code.
    • Sign up for the event with the code and ensure it prompts you to enter a code. If you enter the wrong code it should not let you sign up.
  7. Go to Manage Your Studio and remove yourself from the signup lists for the event. Repeat step 6 on the Manage Your Studio -> Event Calendar page.
  8. 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

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

Technical Documentation

models/event.rb

  • Added event_code to the set_data method.

new_schema.sql

  • Added the alter table script to add the event_code column to the event table.

routes/events.rb

  • Added logic to validate the code if required in the /events/:event_id/sign_up_as_non_member/? and /events/:event_id/sign_up/? post methods.

routes/tools.rb

  • Added logic to validate the code if required in the /tools/trainings/sign_up/:event_id/? post method.

routes/workshops.rb

  • Added logic to validate the code if required in the /workshops/sign_up/:event_id/? post method.

views/admin/new_event.erb

  • Added input field to enter a code required to signup.

views/event_details.erb

  • Added HTML code for a modal to prompt the code.
  • Added a javascript function to set the modal form action link based on the signup button clicked and updated the buttons to call this function if event_code is not null.

views/event_listing_table.erb

  • Added HTML code for a modal to prompt the code.
  • Added a javascript function to set the modal form action link based on the signup button clicked and updated the buttons to call this function if event_code is not null.