feat(api): add staff order detail and compliance eligibility
This commit is contained in:
@@ -23,7 +23,7 @@ Supporting docs:
|
||||
- Send `Idempotency-Key` on every write route.
|
||||
- Treat `order`, `shift`, `shiftRole`, and `assignment` as different objects.
|
||||
- For staff shift applications, `roleId` must come from the response of `GET /staff/shifts/open`.
|
||||
- For staff order booking, `roleId` must come from the response of `GET /staff/orders/available`.
|
||||
- For staff order booking, `roleId` must come from the response of `GET /staff/orders/:orderId`.
|
||||
- Treat API timestamp fields as UTC and convert them to local time in the app.
|
||||
|
||||
## 2) What is implemented now
|
||||
@@ -235,14 +235,17 @@ Important:
|
||||
### 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:
|
||||
|
||||
- use `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
|
||||
- use `roleId` from the order-detail response when booking an order
|
||||
- that `roleId` is the role catalog id for the grouped order booking flow
|
||||
- if order booking returns `422`, render `details.blockers` and keep the worker on the order details page
|
||||
- use `roleId` from the open-shifts response only for shift-level apply
|
||||
- that `roleId` is the concrete `shift_roles.id`
|
||||
|
||||
@@ -260,6 +263,7 @@ Rule:
|
||||
|
||||
Staff shift detail and list rules:
|
||||
|
||||
- `GET /staff/orders/:orderId` returns the worker booking detail contract with `schedule`, `location`, `pay`, `staffing`, `managers`, and `eligibility`
|
||||
- assigned shifts include `clientName`, `hourlyRate`, `totalRate`, `startTime`, `endTime`
|
||||
- shift detail includes `clientName`, `latitude`, `longitude`, `hourlyRate`, `totalRate`
|
||||
- completed shifts include `date`, `clientName`, `startTime`, `endTime`, `hourlyRate`, `totalRate`
|
||||
|
||||
Reference in New Issue
Block a user