icefoganalytics / travel-authorization

0 stars 0 forks source link

Part 3: Wire Travel Desk Request Tab #185

Closed klondikemarlen closed 2 months ago

klondikemarlen commented 2 months ago

Relates to:

Context

Using the existing Travel Desk forms (https://github.com/ytgov/travel-authorization/tree/main/web/src/modules/travelDesk) rewire the travel desk request to exist in the travel desk tab of the travel auth.

Travel Desk forms should be created anytime a user is traveling by air.

image

Implementation

Concerns

Note that all times pick for rental cars are treated as UTC times, rather than local times. The end user should be made aware of this, or have the opportunity to enter times in location local time.

Screenshots

Showing Rental Car Request section now working image

Rental Car creation modal image

Rental Car edit modal image

Bunch of fields with failed validation triggered by trying to add before filling in said fields.

Note that some of the field error info is covered; this is due to use of custom styling compressing component spacing. I've avoided making any styling tweaks beyond what is required for this code to work. image

Testing Instructions

  1. Run the test suite via dev test (or dev test_api)
  2. Boot the app via dev up
  3. Log in to the app at http://localhost:8080
  4. Go to the "My Travel Requests" page via the top drop down nav.
  5. Create a travel authorization.
  6. In the details section, select at least one travel method with "aircraft" type.
  7. Generate the travel estimate.
  8. Submit the travel authorization to yourself as the supervisor.
  9. Go to Manger View page accessible via the drop down nav.
  10. Click on the new request from the "Pending Approvals" panel in the top left.
  11. Scroll to the bottom and approve the request.
  12. Go back to the "My Travel Requests" page, and find your new travel request in the table.
  13. Click on the Submit Travel Desk Request button to go to the Request tab.
  14. Add a single flight via the "Add flight" dialog.
  15. Scroll down to the Rental Car Request and add a Rental Car.
  16. Check that the Pick-up/Drop-off match flights is disabled (because you only have a single flight).
  17. Check that the city selector works correctly.
  18. Check that the Pick-up Location selector "other" option opens a new field for "other".
  19. Check that changing the Vehicle Type from "compact" opens a "reason for change" field.
  20. Check that picking "Same Drop-off location" -> "no" opens up some more selectors.
  21. Check that "Drop-off Location" -> "other" opens a new selector.
  22. Check that all input fields show up as required when expected to be required. (using standard Vuetify logic now).
  23. Check that clicking the "Add" button triggers form validation.
  24. Check that you can add the rental car request.
  25. Go back to the "Flight Request" section and add a second flight.
  26. Go back to the "Rental Car Request" section and add a second rental car.
  27. Check that the Pick-up/Drop-off match flights is available (because you now have two flights), and that picking "Yes" pulls the dates from your flight dates.
  28. Add the second rental car request.
  29. Check that you can edit a rental car request.
  30. Check that you can delete the rental car request.
  31. Check that when creating a car rental toggling the "Same Drop-off location?" clears the various drop off location fields.
  32. Check that when editing a car rental toggling the "Same Drop-off location?" clears the various drop off location fields.
  33. Check that when editing/creating toggling "vehicle type" from "compact" clears the "reason for change" input.
  34. Check that when editing/creating toggling "pick up location" from "other" clears the "pick up location other" input.
  35. Check that when editing/creating toggling "drop off location" from "other" clears the "drop off location other" input.

Note that the Hotel Request and below do not work yet.