icefoganalytics / travel-authorization

0 stars 0 forks source link

Wire Pre-Approved Travel to Travel Details #180

Closed klondikemarlen closed 2 months ago

klondikemarlen commented 2 months ago

Fixes https://github.com/icefoganalytics/travel-authorization/issues/169

Relates to:

Context

In the Approval Region of the travel details tab (https://travel-auth-dev.ynet.gov.yk.ca/my-travel-requests/78/details) can you wire the Pre-approved Travel request drop down to show Approved preapproved travel for a user based on department.

image

Implementation

Rename preapprovedTravelers to travel_authorization_pre_approval_profiles to better reflects the mix of user and user-group information.

Screenshots

Edit view of multiple options for pre-approval profile selection image

Read-only view of pre-approval profile reference 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. Select "PreApproved" from the top nav drop down.
  5. Click the "Add new travel" button to begin adding a new pre-approval.
  6. Set a start date in the future, and add a few travelers.
  7. After creating the pre-approval, select it via the checkbox, then click the "Submit selected travel" button.
  8. Click "submit" in the modal.
  9. Now go to the "Submissions" tab, and click "Approve" on the thing you just submitted.
  10. Type in an approver and approval date.
  11. Upload some random PDF to simulate a signed document.
  12. Change the status to "approve"
  13. Click the "save" button.
  14. Next go to the "My Travel Requests" via the top drop down nav.
  15. Create a new travel authorization.
  16. Fill in all the details.
  17. Check that you have some entries in the "pre-approved travel for (if applicable)" selector. Pick an option.
  18. Submit the travel authorization to yourself.
  19. After the submission, check that the "pre-approved travel for (if applicable)" field is filled in correctly.