This PR addresses the problem of users not being redirected to the Work Order Details view after adding or editing an inventory item. In order to solve this, I changed the views render to keep all inventory item transactions within the accordion on the Work Order Details view. The view that renders within the accordion tab is now controlled by state in the WorkOrderDetails component. After completing the add or edit form, the view rendered is switched back to the inventory table and data is refetched to update the records in the view.
This also address the issue with users not returning to the Work Order Details view with the same accordion open that was open when they initiated an item add or edit. Since all transactions are handled in the Work Orders view, the accordion never closes during view the table, adding items, or editing items.
I added cancel buttons to the "Add" and "Edit" forms so that the user isn't trapped in these views, and I also updated the "Cancel" confirmation "Yes" and "No" buttons to take half of the width of the view each.
Closes https://github.com/cityofaustin/atd-data-tech/issues/1230 Closes https://github.com/cityofaustin/atd-data-tech/issues/1231
This PR addresses the problem of users not being redirected to the Work Order Details view after adding or editing an inventory item. In order to solve this, I changed the views render to keep all inventory item transactions within the accordion on the Work Order Details view. The view that renders within the accordion tab is now controlled by state in the
WorkOrderDetails
component. After completing the add or edit form, the view rendered is switched back to the inventory table and data is refetched to update the records in the view.This also address the issue with users not returning to the Work Order Details view with the same accordion open that was open when they initiated an item add or edit. Since all transactions are handled in the Work Orders view, the accordion never closes during view the table, adding items, or editing items.
I added cancel buttons to the "Add" and "Edit" forms so that the user isn't trapped in these views, and I also updated the "Cancel" confirmation "Yes" and "No" buttons to take half of the width of the view each.
Add form in accordion
Edit form in accordion
New cancel confirmation button widths