icefoganalytics / travel-authorization

0 stars 0 forks source link

Approve Button on Ta No Screen Change #159

Closed klondikemarlen closed 8 months ago

klondikemarlen commented 8 months ago

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

Context

When I approve a TA (eg. hit the Approve Button navigating to the TA from the manager view page). There is a pop-up saying that the approval was complete shows up. But I still have access to the approve and decline buttons. These should no longer be available and the approval should be written to the audit table above.

image

Implementation

Enable reactivity between approve/deny buttons and TravelAuthorizationActionLogsTable with standard pattern of exposing "refresh" and emiting updates. Upgrade useTravelAuthorization pattern to use reactive props. Lock approve/deny buttons after use.

Screenshots

Before approval image

After approval -> buttons disabled 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 new Travel Authorization via the call-to-action button.
  6. Fill in the Details section and Generate the estimates.
  7. Submit the travel authorization to yourself.
  8. Go to the Manager View page and click on the record in the Pending Approvals table.
  9. Click the approve or deny button at the bottom.
  10. Note that the action log table gets updated, and the buttons are now disabled.