diff --git a/packages/admin-ui/src/lib/order/src/components/order-detail/order-detail.component.html b/packages/admin-ui/src/lib/order/src/components/order-detail/order-detail.component.html index 0b48d274aa..c66cb6f468 100644 --- a/packages/admin-ui/src/lib/order/src/components/order-detail/order-detail.component.html +++ b/packages/admin-ui/src/lib/order/src/components/order-detail/order-detail.component.html @@ -19,7 +19,7 @@ diff --git a/packages/admin-ui/src/lib/order/src/components/order-detail/order-detail.component.ts b/packages/admin-ui/src/lib/order/src/components/order-detail/order-detail.component.ts index 54e5caa322..e8f3921a45 100644 --- a/packages/admin-ui/src/lib/order/src/components/order-detail/order-detail.component.ts +++ b/packages/admin-ui/src/lib/order/src/components/order-detail/order-detail.component.ts @@ -15,6 +15,7 @@ import { NotificationService, Order, OrderDetail, + OrderLineFragment, ServerConfigService, SortOrder, } from '@vendure/admin-ui/core'; @@ -196,6 +197,16 @@ export class OrderDetailComponent extends BaseDetailComponent [...items, ...line.items], [] as OrderLineFragment['items']) + .every(item => !!item.fulfillment); + return ( + !allItemsFulfilled && + (order.nextStates.includes('Shipped') || order.nextStates.includes('PartiallyShipped')) + ); + } + fulfillOrder() { this.entity$ .pipe(