fix(dashboard): few admin bug fixes (#11655)

**What**
- OE id bug
- prevent canceling shipped/delivered fulfillment

---

CLOSES CMRC-935
CLOSES CMRC-938
This commit is contained in:
Frane Polić
2025-02-28 10:13:47 +01:00
committed by GitHub
parent de0798dbed
commit 4b7c6d7dd9
2 changed files with 5 additions and 2 deletions

View File

@@ -131,7 +131,7 @@ export const useCancelOrderEdit = (
})
queryClient.invalidateQueries({
queryKey: ordersQueryKeys.lineItems(id),
queryKey: ordersQueryKeys.lineItems(orderId),
})
options?.onSuccess?.(data, variables, context)
},

View File

@@ -347,7 +347,10 @@ const Fulfillment = ({
label: t("actions.cancel"),
icon: <XCircle />,
onClick: handleCancel,
disabled: !!fulfillment.canceled_at,
disabled:
!!fulfillment.canceled_at ||
!!fulfillment.shipped_at ||
!!fulfillment.delivered_at,
},
],
},