diff --git a/packages/admin-next/dashboard/src/routes/orders/order-detail/components/order-summary-section/order-summary-section.tsx b/packages/admin-next/dashboard/src/routes/orders/order-detail/components/order-summary-section/order-summary-section.tsx index 1d0db20711..fad330a254 100644 --- a/packages/admin-next/dashboard/src/routes/orders/order-detail/components/order-summary-section/order-summary-section.tsx +++ b/packages/admin-next/dashboard/src/routes/orders/order-detail/components/order-summary-section/order-summary-section.tsx @@ -44,6 +44,7 @@ import { getStylizedAmount, } from "../../../../../lib/money-amount-helpers" import { getTotalCaptured } from "../../../../../lib/payment.ts" +import { getReturnableQuantity } from "../../../../../lib/rma.ts" type OrderSummarySectionProps = { order: AdminOrder @@ -147,6 +148,11 @@ const Header = ({ }) => { const { t } = useTranslation() + // is ture if there is no shipped items ATM + const shouldDisableReturn = order.items.every( + (i) => !(getReturnableQuantity(i) > 0) + ) + return (