diff --git a/src/components/Icons/order/RateIcon.tsx b/src/components/Icons/order/RateIcon.tsx
index e8137a9..bcedfea 100644
--- a/src/components/Icons/order/RateIcon.tsx
+++ b/src/components/Icons/order/RateIcon.tsx
@@ -17,7 +17,7 @@ const RateIcon = ({ className, onClick }: RateIconType) => {
{
-
+
@@ -167,7 +167,7 @@ export default function OrderSummary() {
/>
)}
- {orderType !== OrderType.Redeem && (
+ {orderType !== OrderType.Redeem && (
{t("cart.otherTaxes")}
diff --git a/src/features/order/orderSlice.ts b/src/features/order/orderSlice.ts
index ae57e43..bfb95a8 100644
--- a/src/features/order/orderSlice.ts
+++ b/src/features/order/orderSlice.ts
@@ -702,7 +702,8 @@ const orderSlice = createSlice({
}
},
updateOrder(state, action: PayloadAction) {
- state.order = { ...state.order, ...action.payload };
+ state.order = { ...(state.order || {}), ...action.payload };
+
if (typeof window !== "undefined") {
localStorage.setItem(
CART_STORAGE_KEYS.ORDER,
diff --git a/src/pages/checkout/hooks/useOrder.ts b/src/pages/checkout/hooks/useOrder.ts
index 5de57d0..e175d8a 100644
--- a/src/pages/checkout/hooks/useOrder.ts
+++ b/src/pages/checkout/hooks/useOrder.ts
@@ -44,7 +44,7 @@ export default function useOrder() {
giftDetails,
order,
restaurant,
- } = useAppSelector(selectCart);
+ } = useAppSelector((state) => state.order);
const highestLoyaltyItem = useAppSelector(selectHighestPricedLoyaltyItem);
const { useLoyaltyPoints } = useAppSelector(selectCart);
@@ -54,8 +54,6 @@ export default function useOrder() {
const [createOrder] = useCreateOrderMutation();
- console.log(order);
-
const getDeliveryMethod = useCallback(() => {
if (orderType === OrderType.Delivery) return 1;
if (orderType === OrderType.Pickup) return 2;
@@ -77,6 +75,8 @@ export default function useOrder() {
duration: 0,
});
+ console.log(order?.roomNumber);
+
createOrder({
phone: mobilenumber || phone || giftDetails?.senderPhone,
comment: specialRequest,
@@ -204,6 +204,14 @@ export default function useOrder() {
location?.lat,
location?.lng,
location?.address,
+ order,
+ pickupTime,
+ pickupDate,
+ plateCar,
+ pickupType,
+ discountAmount,
+ subtotal,
+ restaurant,
t,
navigate,
subdomain,