feat: per-order-line material override — override materials for individual renders

- Add `material_override` nullable column on OrderLine (DB migration)
- Line override takes priority over OutputType override
- PATCH /orders/{id}/lines/{id} endpoint to update material_override
- Inline dropdown on each order line in the OrderDetail page
- Amber background when override is active
- Same output type, different material per line — no need to create a new output type

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-14 14:33:00 +01:00
parent 7e57dba085
commit 9d6def84c1
7 changed files with 115 additions and 7 deletions
+10
View File
@@ -55,6 +55,7 @@ export interface OrderLine {
render_log: RenderLog | null
render_started_at: string | null
render_completed_at: string | null
material_override: string | null
notes: string | null
created_at: string
updated_at: string
@@ -66,6 +67,7 @@ export interface OrderLineCreate {
render_position_id?: string | null
global_render_position_id?: string | null
gewuenschte_bildnummer?: string | null
material_override?: string | null
notes?: string | null
}
@@ -242,6 +244,14 @@ export async function dispatchLineRender(orderId: string, lineId: string) {
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}`,
data
)
return res.data
}
export async function cancelOrderRenders(orderId: string) {
const res = await api.post<{ cancelled: number; order_status: string; errors: string[] | null }>(
`/orders/${orderId}/cancel-renders`