Purpose: Implement endpoint that provides the information to start the Receiving flow. This information includes at least:
- total number of pieces
- number of expected pieces
- Id's of the expected pieces so that UI can indicate which piece exactly we are about to receive
- create a new schema in acq-models for the entry endpoint response that defines required information
- Implement GET /orders/order-lines/<id>/pieces endpoint that returns information to start the Receiving flow
The flow would be something like this:
- open the orders app, search/filter - a list of orders appears (GET /orders)
- select an order - order details appears (GET /orders/<id>)
- select the "receive" button in the details pane - the receiving modal comes up and displays receiving info
- for each po_line.... (GET /orders/order-lines/<id>/pieces) - based on mocks we want to see expected & received.
- details are entered, e.g. number of each po_line to receive, notes, etc.
- form is submitted - "Update Item Details" modal is displayed
- item details are entered, e.g. barcode, location, status, etc.
- form is submitted (POST /orders/<id>/receive)
- Receiving History is displayed (GET /orders/receiving_history -> purchase_order_id == <order id>)
- the schema for a new endpoint is created
- new entry endpoint is implemented
- unit tests are updated
- api tests are updated
Spike Acceptance Criteria
- All open questions have been answered
- follow-on user stories have been created to track the implementation
- appropriate links have been added to these stories (back to here, and possibly to other stories)