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
- Ensure you are on the most recent version of the
dev-add-preset-reservations-and-complete-attendance-checkbox
branch. - Start your dev environment and log in with development2 so you have all permissions.
- After login in with an admin account, navigate to the Events tab under Admin.
- From the toolbox, click the Event Presets button, then create a new preset by clicking the "+ new preset" button.
- Select both from the tool authorization and reservation lists and save the new preset.
- Edit the created preset by changing both tool authorization and reservation lists.
- Navigate to the Events page and create a new event from the newly created preset.
- 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.
- Click on the event title to check the selected tools are saved.
- Login from another account and sign up for the newly created event.
- Login back to the admin account and navigate to the Events tab under Admin.
- Access the event signups list from the signups column.
- Take attendance on this page and save it. All tool permissions gained from this event will be deleted when unchecking a checked checkbox.
- 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
- Go to https://innovationstudio-manager.unl.edu/home/
- 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.