send empty variant prop
This commit is contained in:
@@ -72,7 +72,7 @@ export default function useOrder() {
|
|||||||
extras: i.extras?.map((e) => e.id) || [],
|
extras: i.extras?.map((e) => e.id) || [],
|
||||||
extrasgroup: i.extrasgroup || [],
|
extrasgroup: i.extrasgroup || [],
|
||||||
order_item_comment: i.comment || "",
|
order_item_comment: i.comment || "",
|
||||||
variant: i.variant?.id,
|
variant: i.variant?.id || "",
|
||||||
})),
|
})),
|
||||||
office_no: officeDetails?.officeNo || "",
|
office_no: officeDetails?.officeNo || "",
|
||||||
vatvalue: 0,
|
vatvalue: 0,
|
||||||
@@ -126,6 +126,41 @@ export default function useOrder() {
|
|||||||
.catch((error: any) => {
|
.catch((error: any) => {
|
||||||
console.error("Create Order failed:", error);
|
console.error("Create Order failed:", error);
|
||||||
});
|
});
|
||||||
}, [createOrder, mobilenumber, phone, giftDetails?.senderPhone, giftDetails?.receiverName, giftDetails?.receiverPhone, giftDetails?.message, giftDetails?.isSecret, giftDetails?.senderEmail, giftDetails?.senderName, specialRequest, getDeliveryMethod, tables, orderType, restaurantID, items, officeDetails?.officeNo, discount.isDiscount, discount.isGift, discount.value, coupon, user_uuid, estimateTime, orderPrice, useLoyaltyPoints, highestLoyaltyItem, tip, location?.lat, location?.lng, location?.address, t, navigate, subdomain, dispatch]);
|
}, [
|
||||||
|
createOrder,
|
||||||
|
mobilenumber,
|
||||||
|
phone,
|
||||||
|
giftDetails?.senderPhone,
|
||||||
|
giftDetails?.receiverName,
|
||||||
|
giftDetails?.receiverPhone,
|
||||||
|
giftDetails?.message,
|
||||||
|
giftDetails?.isSecret,
|
||||||
|
giftDetails?.senderEmail,
|
||||||
|
giftDetails?.senderName,
|
||||||
|
specialRequest,
|
||||||
|
getDeliveryMethod,
|
||||||
|
tables,
|
||||||
|
orderType,
|
||||||
|
restaurantID,
|
||||||
|
items,
|
||||||
|
officeDetails?.officeNo,
|
||||||
|
discount.isDiscount,
|
||||||
|
discount.isGift,
|
||||||
|
discount.value,
|
||||||
|
coupon,
|
||||||
|
user_uuid,
|
||||||
|
estimateTime,
|
||||||
|
orderPrice,
|
||||||
|
useLoyaltyPoints,
|
||||||
|
highestLoyaltyItem,
|
||||||
|
tip,
|
||||||
|
location?.lat,
|
||||||
|
location?.lng,
|
||||||
|
location?.address,
|
||||||
|
t,
|
||||||
|
navigate,
|
||||||
|
subdomain,
|
||||||
|
dispatch,
|
||||||
|
]);
|
||||||
return { handleCreateOrder };
|
return { handleCreateOrder };
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user