Describe the bug
When clicking approve in approve modal, the page refreshes, and the modal reopens in a crashed state.
To Reproduce
Steps to reproduce the behavior:
Create a travel authorization.
Fill it in.
Generate an estimate.
Submit it to yourself as the supervisor.
In the to drop down nav go to the "Manger View".
In the top left widget, click on your new travel approval request.
Scroll to the button and approve the travel request.
Expected behavior
Modal closes after clicking approve.
Screenshots
Additional context
The "Approve" button click in web/src/modules/travel-authorizations/components/manage-travel-authorization-details-page/ApproveTravelRequestDialogButton.vue triggers the global isLoading state of useTravelAuthorization to toggle. This triggers a page refresh in web/src/modules/travel-authorizations/layouts/ManageTravelAuthorizationLayout.vue.
This is caused by use of global state in useTravelAuthorization.
Implementation
Replace page overlay with page loader to avoid Vue excessive render changes 3x+ screen size.
Drop global use file helper and make all use files local by default. Current user is still global as it is a special case.
I haven't noticed anything breaking as a result of switching back to non-global use files.
Screenshots
N/A as weird UI bug not doesn't happen.
Testing Instructions
Create a travel authorization.
Fill it in.
Generate an estimate.
Submit it to yourself as the supervisor.
In the to drop down nav go to the "Manger View".
In the top left widget, click on your new travel approval request.
Scroll to the button and approve the travel request.
Go back to the travel authorization under "My Travel Authorizations" then picking it from the list.
Fixes https://github.com/icefoganalytics/travel-authorization/issues/176
Relates to:
Context
Describe the bug When clicking approve in approve modal, the page refreshes, and the modal reopens in a crashed state.
To Reproduce Steps to reproduce the behavior:
Expected behavior Modal closes after clicking approve.
Screenshots
Additional context The "Approve" button click in
web/src/modules/travel-authorizations/components/manage-travel-authorization-details-page/ApproveTravelRequestDialogButton.vue
triggers the globalisLoading
state ofuseTravelAuthorization
to toggle. This triggers a page refresh inweb/src/modules/travel-authorizations/layouts/ManageTravelAuthorizationLayout.vue
.This is caused by use of global state in
useTravelAuthorization
.Implementation
Replace page overlay with page loader to avoid Vue excessive render changes 3x+ screen size. Drop global use file helper and make all use files local by default. Current user is still global as it is a special case.
I haven't noticed anything breaking as a result of switching back to non-global use files.
Screenshots
N/A as weird UI bug not doesn't happen.
Testing Instructions