This PR adds a new route and view for Work Order Inventory Item editing. The existing AddInventoryItemFields was adapted as an edit form, and I introduced new logic based on the what parameters are available in the parent component of AddInventoryItemFields and EditInventoryItemFields to switch what request to use on submit, what text to show in the view, and which child form component to render.
I also fixed some inconsistent references to workOrderId in props in the WorkOrderDetails component.
Closes https://github.com/cityofaustin/atd-data-tech/issues/1215
This PR adds a new route and view for Work Order Inventory Item editing. The existing
AddInventoryItemFields
was adapted as an edit form, and I introduced new logic based on the what parameters are available in the parent component ofAddInventoryItemFields
andEditInventoryItemFields
to switch what request to use on submit, what text to show in the view, and which child form component to render.I also fixed some inconsistent references to
workOrderId
in props in theWorkOrderDetails
component.Accordion before edit
Editing
Edited
Accordion after edit