cityofaustin / atd-mobile-signals-work-orders

Mobile Signals Work Orders app using React UI with Knack API
https://mobile-signals.austintexas.io
Other
3 stars 1 forks source link

Create an `Edit Inventory Item` Page/Form #245

Closed mddilley closed 4 years ago

mddilley commented 4 years ago

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 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.

Accordion before edit

image

Editing

image

Edited

image

Accordion after edit

image