Order request: Renumber items
Add an action button to Order Request details labeled Renumber items
:
A click should make an API call POST /api/v1/order/{id}/renumber. The API call will return a confirmation (or fail with error), but the UI should reload the list of order items.
Renumbering order items
This is a new API call at POST /api/v1/order/{orderRequestId}/renumber.
A new sequence_number
is (re-)assigned to each item in the order. Items in CANCELED
or SPLIT
state do not have a sequence number.
Renumbering is done by:
- Loading all items in the order according to their current sequence number.
- Renumbered starting from 1, but excluding items that are
CANCELED
orSPLIT
state.