diff --git a/src/components/admin/store/PickupOrdersPrepareDisplay/index.tsx b/src/components/admin/store/PickupOrdersPrepareDisplay/index.tsx
index 723a2d13..000b5f8b 100644
--- a/src/components/admin/store/PickupOrdersPrepareDisplay/index.tsx
+++ b/src/components/admin/store/PickupOrdersPrepareDisplay/index.tsx
@@ -14,6 +14,7 @@ import styles from './style.module.scss';
interface PickupOrdersDisplayPrepareProps {
token: string;
+ canFulfill: boolean;
orders: PublicOrderWithItems[];
onOrderUpdate: (orders: PublicOrderWithItems[]) => void;
}
@@ -26,6 +27,7 @@ const itemToString = (item: PublicOrderItemWithQuantity): string => {
const PickupOrdersPrepareDisplay = ({
token,
+ canFulfill,
orders,
onOrderUpdate,
}: PickupOrdersDisplayPrepareProps) => {
@@ -92,16 +94,17 @@ const PickupOrdersPrepareDisplay = ({
{orders.map(order => {
- const canFulfill =
- order.status === OrderStatus.PLACED ||
- order.status === OrderStatus.PARTIALLY_FULFILLED;
+ const showFulfill =
+ canFulfill &&
+ (order.status === OrderStatus.PLACED ||
+ order.status === OrderStatus.PARTIALLY_FULFILLED);
const itemQuantities = getOrderItemQuantities(order.items);
return (
{`${order.user.firstName} ${order.user.lastName}`}
- {canFulfill && itemQuantities.length > 1 ? (
+ {showFulfill && itemQuantities.length > 1 ? (
|