fix: workflow editor Phase 5/6 sign-off — save guard, conflict detection, dispatch pre-check

- Save button disabled for non-admins (canSave prop threaded through
  WorkflowEditor → WorkflowCanvas → WorkflowCanvasToolbar); tooltip
  explains why when hovered
- Optimistic concurrency: migration 072 adds updated_at to
  workflow_definitions; PUT /workflows/:id returns 409 when client sends
  a stale updated_at; frontend shows a specific reload-prompt toast
- _legacy_dispatch now routes through dispatch_order_line_render instead
  of calling render_order_line_task directly, so cancelled/rejected
  order lines are skipped before queueing

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-07-22 11:39:02 +02:00
co-authored by Claude Sonnet 4.6
parent 53b19f2ba1
commit e8b4580608
9 changed files with 71 additions and 10 deletions
+2
View File
@@ -193,6 +193,7 @@ class WorkflowDefinitionUpdate(BaseModel):
name: str | None = None
config: dict | None = None
is_active: bool | None = None
updated_at: datetime | None = None
class WorkflowDefinitionOut(BaseModel):
@@ -207,6 +208,7 @@ class WorkflowDefinitionOut(BaseModel):
)
is_active: bool
created_at: datetime
updated_at: datetime
model_config = {"from_attributes": True}