send pick up type
This commit is contained in:
@@ -3,7 +3,11 @@ import useFormInstance from "antd/es/form/hooks/useFormInstance";
|
||||
import ProInputCard from "components/ProInputCard/ProInputCard.tsx";
|
||||
import ProRatioGroups from "components/ProRatioGroups/ProRatioGroups.tsx";
|
||||
import dayjs from "dayjs";
|
||||
import { updatePickupDate, updatePickupTime } from "features/order/orderSlice";
|
||||
import {
|
||||
updatePickupDate,
|
||||
updatePickupTime,
|
||||
updatePickUpType,
|
||||
} from "features/order/orderSlice";
|
||||
import useBreakPoint from "hooks/useBreakPoint.ts";
|
||||
import { BottomSheet } from "pages/cart/components/timeEstimate/BottomSheet.tsx";
|
||||
import { Dialog } from "pages/cart/components/timeEstimate/Dialog.tsx";
|
||||
@@ -53,9 +57,11 @@ export default function TimeEstimateCard() {
|
||||
dayjs().format(SERVER_DATE_FORMAT),
|
||||
dayjs().format(UI_TIME_FORMAT),
|
||||
);
|
||||
dispatch(updatePickUpType("now"));
|
||||
} else {
|
||||
setEstimateWay(value);
|
||||
setIsEstimateTimeOpen(true);
|
||||
dispatch(updatePickUpType(""));
|
||||
}
|
||||
}}
|
||||
/>
|
||||
|
||||
@@ -39,6 +39,7 @@ export default function useOrder() {
|
||||
plateCar,
|
||||
pickupTime,
|
||||
pickupDate,
|
||||
pickupType,
|
||||
} = useAppSelector(selectCart);
|
||||
const highestLoyaltyItem = useAppSelector(selectHighestPricedLoyaltyItem);
|
||||
const { useLoyaltyPoints } = useAppSelector(selectCart);
|
||||
@@ -88,6 +89,7 @@ export default function useOrder() {
|
||||
pickup_time: pickupTime,
|
||||
pickup_date: pickupDate,
|
||||
car_plate: plateCar,
|
||||
pickupTimeType: pickupType,
|
||||
delivery_pickup_interval: "",
|
||||
orderPrice: orderPrice,
|
||||
use_loylaty: useLoyaltyPoints && highestLoyaltyItem ? 1 : 0,
|
||||
|
||||
Reference in New Issue
Block a user