send empty variant prop

This commit is contained in:
2025-11-12 09:14:51 +03:00
parent 73c9d1f743
commit 79af5c3604

View File

@@ -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 };
} }