redeem: initial commit

This commit is contained in:
2026-01-08 23:26:45 +03:00
parent ebe9928091
commit 6271c14eff
26 changed files with 1577 additions and 491 deletions

View File

@@ -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 />