Go to the "My Travel Requests" page via the top drop down nav.
Add a new travel authorization via the call-to-action button.
Fill in all required fields.
Generate an estimate.
Submit to yourself.
Go to the "Manager View" via the top drop-down nav.
Select your new request in the Pending Approvals widget in the top left of the page.
Scroll down and approve the request.
Go back to the travel request as a user by changing http://localhost:8080/travel-requests/xxx/details/manage to http://localhost:8080/my-travel-requests/xxx/details.
Go to the "Expense" tab.
Prefill your expenses via the call-to-action button. It will now work again.
Fixes https://github.com/icefoganalytics/travel-authorization/issues/174
Relates to:
Context
Unable to execute the prefill function.
Implementation
Can't order by expenses if there aren't any.
Bug introduced in https://github.com/icefoganalytics/travel-authorization/commit/10d40de4269d7b4239becc02bd6938feb99cb62e
Added
required: false
so that Travel authorization can now still be found, even if no estimates are listed.Note that eager loading with a "where" clause switches the query from an outer join to an inner join. See https://sequelize.org/docs/v6/advanced-association-concepts/eager-loading/#eager-loading-filtered-at-the-associated-model-level.
This kind of bug make me think that its time to set up some end-to-end tests?
Screenshots
N/A now prefill works again.
Testing Instructions
dev test
(ordev test_api
)dev up
http://localhost:8080/travel-requests/xxx/details/manage
tohttp://localhost:8080/my-travel-requests/xxx/details
.