enhance bottom sheets styles
This commit is contained in:
@@ -122,6 +122,8 @@
|
|||||||
"carbs": "الكربوهيدرات",
|
"carbs": "الكربوهيدرات",
|
||||||
"fat": "الدهون",
|
"fat": "الدهون",
|
||||||
"viewCart": "عرض السلة",
|
"viewCart": "عرض السلة",
|
||||||
|
"pay": "الدفع",
|
||||||
|
"payDescription": "الدفع",
|
||||||
"rating": "التقييم ",
|
"rating": "التقييم ",
|
||||||
"loyaltyPoints": "نقاط الولاء",
|
"loyaltyPoints": "نقاط الولاء",
|
||||||
"loyaltyDescription": "اشترى {{value}} وجبات واحصل على وجبة مجانية",
|
"loyaltyDescription": "اشترى {{value}} وجبات واحصل على وجبة مجانية",
|
||||||
@@ -419,6 +421,7 @@
|
|||||||
"yourAmount": "مبلغك",
|
"yourAmount": "مبلغك",
|
||||||
"selectedTotal": "المجموع المحدد",
|
"selectedTotal": "المجموع المحدد",
|
||||||
"splitBillAmount": "مبلغ تقسيم الفاتورة",
|
"splitBillAmount": "مبلغ تقسيم الفاتورة",
|
||||||
"removeSplitWay": "إزالة طريقة التقسيم"
|
"removeSplitWay": "إزالة طريقة التقسيم",
|
||||||
|
"amount": "المبلغ"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -168,7 +168,9 @@
|
|||||||
"joinUs": "Join us",
|
"joinUs": "Join us",
|
||||||
"joinUsDescription": "to earn loyalty points",
|
"joinUsDescription": "to earn loyalty points",
|
||||||
"openingHours": "Opening Hours: {{openingTime}} - {{closingTime}}",
|
"openingHours": "Opening Hours: {{openingTime}} - {{closingTime}}",
|
||||||
"restaurantIsClosed": "Restaurant is closed"
|
"restaurantIsClosed": "Restaurant is closed",
|
||||||
|
"pay": "Pay",
|
||||||
|
"payDescription": "Pay for your order"
|
||||||
},
|
},
|
||||||
"cart": {
|
"cart": {
|
||||||
"title": "Cart",
|
"title": "Cart",
|
||||||
@@ -431,6 +433,7 @@
|
|||||||
"yourAmount": "Your Amount",
|
"yourAmount": "Your Amount",
|
||||||
"selectedTotal": "Selected Total",
|
"selectedTotal": "Selected Total",
|
||||||
"splitBillAmount": "Split Bill Amount",
|
"splitBillAmount": "Split Bill Amount",
|
||||||
"removeSplitWay": "Remove Split Way"
|
"removeSplitWay": "Remove Split Way",
|
||||||
|
"amount": "Amount"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ export function MenuFooter() {
|
|||||||
margin: "0 10px",
|
margin: "0 10px",
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t("menu.viewCart")}
|
{ orderType === OrderType.Pay ? t("menu.pay") : t("menu.viewCart")}
|
||||||
</ProText>
|
</ProText>
|
||||||
<span
|
<span
|
||||||
style={{
|
style={{
|
||||||
|
|||||||
@@ -51,13 +51,6 @@ export function EqualltyChoiceBottomSheet({
|
|||||||
return 0;
|
return 0;
|
||||||
}, [grandTotal, totalPeople, payFor]);
|
}, [grandTotal, totalPeople, payFor]);
|
||||||
|
|
||||||
// Update splitBillAmount when values change
|
|
||||||
useEffect(() => {
|
|
||||||
if (isOpen && splitAmount > 0) {
|
|
||||||
dispatch(updateSplitBillAmount(splitAmount));
|
|
||||||
}
|
|
||||||
}, [isOpen, splitAmount, dispatch]);
|
|
||||||
|
|
||||||
const handleSave = () => {
|
const handleSave = () => {
|
||||||
dispatch(updateSplitBillAmount(splitAmount));
|
dispatch(updateSplitBillAmount(splitAmount));
|
||||||
onClose();
|
onClose();
|
||||||
@@ -69,6 +62,8 @@ export function EqualltyChoiceBottomSheet({
|
|||||||
onClose();
|
onClose();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
console.log(grandTotal);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<ProBottomSheet
|
<ProBottomSheet
|
||||||
isOpen={isOpen}
|
isOpen={isOpen}
|
||||||
@@ -76,8 +71,8 @@ export function EqualltyChoiceBottomSheet({
|
|||||||
title={t("splitBill.divideTheBillEqually")}
|
title={t("splitBill.divideTheBillEqually")}
|
||||||
showCloseButton={true}
|
showCloseButton={true}
|
||||||
initialSnap={1}
|
initialSnap={1}
|
||||||
height={600}
|
height={810}
|
||||||
snapPoints={[600]}
|
snapPoints={[810]}
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
style={{
|
style={{
|
||||||
|
|||||||
@@ -72,16 +72,18 @@ export function PayForYourItemsChoiceBottomSheet({
|
|||||||
title={t("splitBill.payForYourItems")}
|
title={t("splitBill.payForYourItems")}
|
||||||
showCloseButton={true}
|
showCloseButton={true}
|
||||||
initialSnap={1}
|
initialSnap={1}
|
||||||
height={515}
|
height={745}
|
||||||
snapPoints={[515]}
|
snapPoints={[745]}
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
style={{
|
style={{
|
||||||
padding: "0 20px",
|
padding: "0 20px",
|
||||||
|
margin: "20px 0",
|
||||||
display: "flex",
|
display: "flex",
|
||||||
flexDirection: "column",
|
flexDirection: "column",
|
||||||
gap: 12,
|
gap: 12,
|
||||||
maxHeight: "500px",
|
maxHeight: "455px",
|
||||||
|
minHeight: "455px",
|
||||||
overflowY: "auto",
|
overflowY: "auto",
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
@@ -161,51 +163,47 @@ export function PayForYourItemsChoiceBottomSheet({
|
|||||||
);
|
);
|
||||||
})
|
})
|
||||||
)}
|
)}
|
||||||
|
</div>
|
||||||
{selectedTotal > 0 && (
|
<div
|
||||||
<div
|
style={{
|
||||||
style={{
|
padding: 16,
|
||||||
padding: 16,
|
backgroundColor: "rgba(255, 183, 0, 0.08)",
|
||||||
backgroundColor: "rgba(255, 183, 0, 0.08)",
|
borderRadius: 8,
|
||||||
borderRadius: 8,
|
marginTop: 8,
|
||||||
marginTop: 8,
|
}}
|
||||||
}}
|
>
|
||||||
>
|
|
||||||
<div
|
|
||||||
style={{
|
|
||||||
display: "flex",
|
|
||||||
justifyContent: "space-between",
|
|
||||||
alignItems: "center",
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<ProText style={{ fontSize: 16, fontWeight: 600 }}>
|
|
||||||
{t("splitBill.selectedTotal")}:
|
|
||||||
</ProText>
|
|
||||||
<ArabicPrice price={selectedTotal} />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
|
|
||||||
<div
|
<div
|
||||||
style={{
|
style={{
|
||||||
display: "flex",
|
display: "flex",
|
||||||
gap: 12,
|
justifyContent: "space-between",
|
||||||
marginTop: 20,
|
alignItems: "center",
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Button style={{ flex: 1 }} onClick={handleRemoveSplitWay}>
|
<ProText style={{ fontSize: 16, fontWeight: 600 }}>
|
||||||
{t("splitBill.removeSplitWay")}
|
{t("splitBill.selectedTotal")}:
|
||||||
</Button>
|
</ProText>
|
||||||
<Button
|
<ArabicPrice price={selectedTotal} />
|
||||||
type="primary"
|
|
||||||
style={{ flex: 1, boxShadow: "none" }}
|
|
||||||
onClick={handleSave}
|
|
||||||
disabled={selectedTotal === 0}
|
|
||||||
>
|
|
||||||
{t("cart.save")}
|
|
||||||
</Button>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div
|
||||||
|
style={{
|
||||||
|
display: "flex",
|
||||||
|
gap: 12,
|
||||||
|
marginTop: 20,
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<Button style={{ flex: 1 }} onClick={handleRemoveSplitWay}>
|
||||||
|
{t("splitBill.removeSplitWay")}
|
||||||
|
</Button>
|
||||||
|
<Button
|
||||||
|
type="primary"
|
||||||
|
style={{ flex: 1, boxShadow: "none" }}
|
||||||
|
onClick={handleSave}
|
||||||
|
disabled={selectedTotal === 0}
|
||||||
|
>
|
||||||
|
{t("cart.save")}
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
</ProBottomSheet>
|
</ProBottomSheet>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user