feat(phase7.4): order rejection + resubmit flow

- Migration 053: rejection_reason TEXT NULL on orders table
- POST /api/orders/{id}/reject (PM+): sets rejected status, cancels
  active renders, stores reason, notifies creator, broadcasts WS event
- POST /api/orders/{id}/resubmit (creator or PM+): resets to draft,
  clears rejection fields, notifies PMs
- OrderDetail: Reject button (PM+) + inline modal with reason textarea
  and notify-client checkbox; Resubmit button; rejection reason amber
  alert box shown below header when order is rejected
- Orders Kanban: rejection_reason shown as red italic note on card
- Order interface: rejected_at, rejection_reason fields

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-08 20:37:05 +01:00
parent 596360e507
commit 1cc10d4bbb
7 changed files with 334 additions and 4 deletions
+6 -1
View File
@@ -711,7 +711,12 @@ function KanbanCard({
{rp && rp.total > 0 && (
<RenderProgressBar progress={rp} />
)}
{order.notes && !rp && (
{order.status === 'rejected' && order.rejection_reason && (
<p className="mt-2 text-xs text-red-500 italic truncate" title={order.rejection_reason}>
{order.rejection_reason}
</p>
)}
{order.notes && !rp && order.status !== 'rejected' && (
<p className="mt-2 text-xs text-content-muted truncate">{order.notes}</p>
)}
<div className="mt-2 flex items-center justify-end opacity-0 group-hover:opacity-100 transition-opacity">