From 7dac01acb7b9b1da0656a2b3cb3d95e5f5e74b03 Mon Sep 17 00:00:00 2001 From: shawn Date: Tue, 29 Sep 2026 14:07:12 +1000 Subject: [PATCH] fix: restrict order quantity edits to pending orders --- apps/api/src/orders/order-status.ts | 2 +- apps/web/src/orders/order-items-panel.tsx | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/apps/api/src/orders/order-status.ts b/apps/api/src/orders/order-status.ts index 51ae089..2272249 100644 --- a/apps/api/src/orders/order-status.ts +++ b/apps/api/src/orders/order-status.ts @@ -1,7 +1,7 @@ import type { OrderStatus } from "@orderops/shared/order-status"; export function canEditOrderItems(status: OrderStatus) { - return status === "pending" || status === "processing"; + return status === "pending"; } export function canEditShippingAddress(status: OrderStatus) { diff --git a/apps/web/src/orders/order-items-panel.tsx b/apps/web/src/orders/order-items-panel.tsx index fb2a99b..97a947b 100644 --- a/apps/web/src/orders/order-items-panel.tsx +++ b/apps/web/src/orders/order-items-panel.tsx @@ -51,7 +51,11 @@ export function OrderItemsPanel({ order, onUpdateQuantity }: OrderItemsPanelProp
{item.sku}
Available: {item.availableQuantity}
- + {order.status === "pending" ? ( + + ) : ( +
Quantity: {item.quantity}
+ )} ))} -- 2.54.0