Story #71 Add UI for entering vehicle information - cseseniordesign/reservations GitHub Wiki

End User Documentation

Dev Testing Instructions

  1. Make sure you are on the most recent version of the dev-vehicle-information branch.
  2. Start your dev environment and log in with development2 so you have all permissions.
  3. Navigate to the My Account page
  4. You should notice that there is now an Update Vehicle Information section. If the user has vehicles then a table should show up with a row for each vehicle. If the user has no vehicles then there should be no table. Ensure there is a button to add a new vehicle unless there are already 3 vehicles connected to the account.
  5. Ensure that you can add, update, and delete vehicles. When adding or updating vehicles the save should not work if you don't fill out all of the required fields.
  6. Ensure there are no errors in the console throughout your testing and that the page is responsive on all screen sizes.

Production Testing Instructions

  1. Go to https://innovationstudio-manager.unl.edu/login/ and log in with any account.
  2. Follow steps 3 and up from the dev testing instructions above.

Technical Documentation

models/vehicle.rb

  • Added this new model to represent the vehicles table.

routes/admin/events.rb

  • Added a null check to fix a bug when creating an event from the agenda page.

routes/auth.rb

  • Passed a list of the user's vehicles to the view.

routes/vehicles.rb

  • Added this new controller that handles all of the GET and POST actions for adding, updating, and deleting vehicles.

views/me.erb

  • Added a Update Vehicle Information section to the My Account page. This page will show a table of the user's vehicles if they have any. If there are no vehicles for the user then no table will show. A button to add a new vehicle will display until the user has 3 vehicles added. The table shows the vehicles information and has buttons to edit or delete each vehicle.

views/new_vehicle.erb

  • Added this new view which contains a form for entering vehicle information. This view is used when adding and editing a vehicle.