feat(api): add staff order detail and compliance eligibility
This commit is contained in:
@@ -32,6 +32,7 @@ Important consequences:
|
||||
- `POST /staff/shifts/:shiftId/apply` must send the `roleId` from that response.
|
||||
- `GET /staff/orders/available` returns grouped order opportunities for atomic booking.
|
||||
- `POST /staff/orders/:orderId/book` must send the `roleId` from that response.
|
||||
- if order booking returns `422`, use `details.blockers` to explain why the worker is not eligible
|
||||
- `GET /client/shifts/scheduled` is the canonical timeline/read model for the client app.
|
||||
- `GET /client/orders/view` is a deprecated compatibility alias.
|
||||
- `POST /client/orders/:orderId/edit` and `POST /client/orders/:orderId/cancel` only affect future shifts.
|
||||
@@ -180,14 +181,17 @@ Rapid-order flow:
|
||||
### Find shifts
|
||||
|
||||
- `GET /staff/orders/available`
|
||||
- `GET /staff/orders/:orderId`
|
||||
- `POST /staff/orders/:orderId/book`
|
||||
- `GET /staff/shifts/open`
|
||||
- `POST /staff/shifts/:shiftId/apply`
|
||||
|
||||
Rule:
|
||||
|
||||
- send the `roleId` from the order-available response when booking an order
|
||||
- use `GET /staff/orders/:orderId` as the source of truth for the order details page
|
||||
- send the `roleId` from the order-detail response when booking an order
|
||||
- this `roleId` is the role catalog id for grouped order booking
|
||||
- if booking fails with `422`, render `details.blockers` and keep the worker on the review screen
|
||||
- send the `roleId` from the open-shifts response only when applying to one shift
|
||||
- that route still uses the concrete `shift_roles.id`
|
||||
|
||||
|
||||
Reference in New Issue
Block a user