redeem: initial commit
This commit is contained in:
@@ -22,17 +22,25 @@ import { useEffect } from "react";
|
||||
import { CarCard } from "./components/CarCard";
|
||||
import { CollectWay } from "./components/CollectWay/CollectWay";
|
||||
import PickupTimeCard from "./components/pickupEstimate/TimeEstimateCard";
|
||||
import VoucherSummary from "pages/redeem/components/VoucherSummary/VoucherSummary";
|
||||
|
||||
export default function CheckoutPage() {
|
||||
const { t } = useTranslation();
|
||||
const [form] = Form.useForm();
|
||||
const { phone, order, orderType, collectionMethod, coupon, customerName } =
|
||||
useAppSelector(selectCart);
|
||||
const {
|
||||
phone,
|
||||
order,
|
||||
orderType,
|
||||
collectionMethod,
|
||||
coupon,
|
||||
customerName,
|
||||
tip,
|
||||
} = useAppSelector(selectCart);
|
||||
const { token } = useAppSelector((state) => state.auth);
|
||||
const dispatch = useAppDispatch();
|
||||
useEffect(() => {
|
||||
form.setFieldsValue({ coupon, collectionMethod, phone, customerName });
|
||||
}, [form, phone, coupon, collectionMethod, customerName]);
|
||||
form.setFieldsValue({ coupon, collectionMethod, phone, customerName, tip });
|
||||
}, [form, phone, coupon, collectionMethod, customerName, tip]);
|
||||
|
||||
return (
|
||||
<>
|
||||
@@ -71,12 +79,13 @@ export default function CheckoutPage() {
|
||||
value={order?.officeNumber}
|
||||
/>
|
||||
)}
|
||||
{orderType === OrderType.Redeem && <VoucherSummary />}
|
||||
{/* {orderType === OrderType.Gift && <GiftCard />} */}
|
||||
{/* <RoomDetails />
|
||||
<OfficeDetails /> */}
|
||||
{/* <GiftDetails /> */}
|
||||
{/* <BriefMenu /> */}
|
||||
<CouponCard />
|
||||
{orderType !== OrderType.Redeem && <CouponCard />}
|
||||
|
||||
{/* Collection Method */}
|
||||
{orderType === OrderType.Pickup && (
|
||||
@@ -114,7 +123,7 @@ export default function CheckoutPage() {
|
||||
)}
|
||||
|
||||
{/* Reward Your Waiter */}
|
||||
<RewardWaiterCard />
|
||||
{orderType !== OrderType.Redeem && <RewardWaiterCard />}
|
||||
<BriefMenuCard />
|
||||
<Ads1 />
|
||||
<OrderSummary />
|
||||
|
||||
Reference in New Issue
Block a user