fix bottom sheets height

This commit is contained in:
2025-10-15 21:50:15 +03:00
parent c53cd31063
commit 1c509d915d
7 changed files with 29 additions and 15 deletions

View File

@@ -1,7 +1,7 @@
import { Button, Input } from "antd";
import { ProBottomSheet } from "components/ProBottomSheet/ProBottomSheet.tsx";
import { useEffect, useState } from "react";
import { useTranslation } from "react-i18next";
import { ProBottomSheet } from "components/ProBottomSheet/ProBottomSheet.tsx";
const { TextArea } = Input;
@@ -42,7 +42,7 @@ export function BottomSheet({
title={t("cart.specialRequest")}
showCloseButton={false}
initialSnap={1}
height={"40vh"}
height={370}
snapPoints={["30vh"]}
>
<div className="space-y-4">

View File

@@ -24,7 +24,7 @@ export function BottomSheet({
title={t("cart.selectTimeEstimate")}
showCloseButton={true}
initialSnap={1}
height={"510px"}
height={510}
snapPoints={["65vh"]}
>
<Content onSave={onSave} initialDate={initialDate} onClose={onClose} />

View File

@@ -11,10 +11,18 @@ export default function useOrder() {
const { id } = useParams();
const restaurantID = localStorage.getItem("restaurantID");
const { mobilenumber, user_uuid } = JSON.parse(
localStorage.getItem("customer") || "{}"
localStorage.getItem("customer") || "{}",
) as Customer;
const { items, coupon, tip, tables, specialRequest, phone } =
useAppSelector(selectCart);
const {
items,
coupon,
tip,
tables,
specialRequest,
phone,
estimateTime,
officeDetails,
} = useAppSelector(selectCart);
const [createOrder] = useCreateOrderMutation();
@@ -33,18 +41,20 @@ export default function useOrder() {
items: items.map((i) => ({
...i,
qty: i.quantity,
extras: i.extras || [],
extrasgroup: i.extrasgroup || [],
})),
office_no: "",
office_no: officeDetails?.officeNo || "",
vatvalue: 0,
discountGiftCode: "",
paymentType: "cod",
uuid: user_uuid,
pickup_comments: "",
pickup_time: "",
pickup_time: estimateTime,
delivery_pickup_interval: "",
orderPrice: items.reduce(
(acc, item) => acc + item.price * item.quantity,
0
0,
),
useWallet: 0,
tip,
@@ -59,13 +69,16 @@ export default function useOrder() {
}, [
createOrder,
mobilenumber,
phone,
coupon,
specialRequest,
tables,
id,
restaurantID,
items,
officeDetails?.officeNo,
user_uuid,
estimateTime,
tip,
dispatch,
router,