Story #123 Update attending checkbox to automatically authorize tools for attendees (single session), and add tool reservation to preset event - cseseniordesign/reservations GitHub Wiki

End User Documentation

Dev Testing Instructions

  1. Ensure you are on the most recent version of the dev-add-preset-reservations-and-complete-attendance-checkbox branch.
  2. Start your dev environment and log in with development2 so you have all permissions.
  3. After login in with an admin account, navigate to the Events tab under Admin.
  4. From the toolbox, click the Event Presets button, then create a new preset by clicking the "+ new preset" button.
  5. Select both from the tool authorization and reservation lists and save the new preset.
  6. Edit the created preset by changing both tool authorization and reservation lists.
  7. Navigate to the Events page and create a new event from the newly created preset.
  8. Ensure that all reservation/authorization tools included in the preset are chosen by default on the new event page. Confirm that the checkbox next to tool reservation/authorization is checked to preserve the selected list.
  9. Click on the event title to check the selected tools are saved.
  10. Login from another account and sign up for the newly created event.
  11. Login back to the admin account and navigate to the Events tab under Admin.
  12. Access the event signups list from the signups column.
  13. Take attendance on this page and save it. All tool permissions gained from this event will be deleted when unchecking a checked checkbox.
  14. Ensure that the attended member gets all tool permissions of all authorization tools selected in that event without interfering with pre-existing tool permissions.

Production Testing Instructions

  1. Go to https://innovationstudio-manager.unl.edu/home/
  2. Log in as an admin user, then Follow steps 3-14 from the dev testing instructions above.

Technical Documentation

models/preset_event.rb

  • adding relationship of type "has_many" to preset_events_has_resource_reservations.
  • adding get_resource_reservations_ids, has_reservation, and has_tool_reservation methods.

models/preset_events_has_resource_reservation.rb

  • created a new class named PresetEventsHasResourceReservation connected to preset_events and resources tables.

routes/admin/events.rb

1- Changes within the POST /admin/events/:event_id/signup_list/? action: - Authorizing event attended members on event authorization tools instead of reservation tools. 2- Changes within the POST /admin/events/create/? action: - fixing checkbox is checked without tool selection bug. 3- Changes within the GET /admin/events/presets/create/? action: - passing reservable tools to the admin/new_preset_event.erb file.

4- Changes within the POST /admin/events/presets/create/? action: - saving added reservation tools to a preset event.

5- Changes within the GET /admin/events/presets/:preset_id/edit/? action: - passing reservable tools to the admin/new_preset_event.erb file.

6- Changes within the POST /admin/events/presets/:preset_id/edit/? action: - saving updated reservation tools to a preset event.

7- Changes within the POST /admin/events/presets/:preset_id/delete/? action: - Remove reservation records in the database connected to the deleted preset event.

new_schema.sql

  • Included SQL script to create the preset_events_has_resource_reservations table.

views/admin/new_event.erb

  • added reservation tool list with a checkbox.
  • Implemented The logic for pre-selecting the reservation tools checkbox.
  • Implemented the logic to pre-select the list of reservation tools.

views/admin/new_preset_event.erb

  • Adding reservation tools list.

views/admin/signup_list.erb

  • Adding logic to displaying the page when no one signup to the event yet.