feat: batch material override — apply to all lines in an order at once
- POST /orders/{id}/batch-material-override endpoint
- Dropdown above the lines table: "Apply to all lines…"
- Options: clear all overrides, or select a library material
- Updates all order lines in one request
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -244,6 +244,14 @@ export async function dispatchLineRender(orderId: string, lineId: string) {
|
||||
return res.data
|
||||
}
|
||||
|
||||
export async function batchMaterialOverride(orderId: string, materialOverride: string | null) {
|
||||
const res = await api.post<{ updated: number; material_override: string | null }>(
|
||||
`/orders/${orderId}/batch-material-override`,
|
||||
{ material_override: materialOverride }
|
||||
)
|
||||
return res.data
|
||||
}
|
||||
|
||||
export async function patchOrderLine(orderId: string, lineId: string, data: { material_override?: string | null }) {
|
||||
const res = await api.patch<{ updated: boolean; line_id: string }>(
|
||||
`/orders/${orderId}/lines/${lineId}`,
|
||||
|
||||
Reference in New Issue
Block a user