diff --git a/src/components/ActionsButtons/ActionsButtons.module.css b/src/components/ActionsButtons/ActionsButtons.module.css
index bd9be6f..3c278c6 100644
--- a/src/components/ActionsButtons/ActionsButtons.module.css
+++ b/src/components/ActionsButtons/ActionsButtons.module.css
@@ -1,7 +1,7 @@
.quantityControls {
display: flex;
align-items: center;
- background-color: #ffb70014;
+ background-color: var(--background);
border-radius: 888px;
width: fit-content;
}
@@ -15,7 +15,7 @@
.quantityInputContainer {
display: flex;
align-items: center;
- padding: 8px;
+ padding: 0 1px;
border-radius: 888px;
width: 100px;
height: 32px;
@@ -77,10 +77,15 @@
}
.plusIcon {
-margin-bottom: 1px;
+ margin-bottom: 1px;
+ color: var(--secondary-background);
+}
+
+.minusIcon {
+ color: var(--secondary-foreground);
}
.deleteIcon {
position: relative;
right: 1px;
-}
\ No newline at end of file
+}
diff --git a/src/components/ActionsButtons/ActionsButtons.tsx b/src/components/ActionsButtons/ActionsButtons.tsx
index 93f7b2e..da28266 100644
--- a/src/components/ActionsButtons/ActionsButtons.tsx
+++ b/src/components/ActionsButtons/ActionsButtons.tsx
@@ -1,7 +1,6 @@
-import { MinusOutlined } from "@ant-design/icons";
+import { MinusOutlined, PlusOutlined } from "@ant-design/icons";
import { Button, Grid, InputNumber, Popconfirm } from "antd";
import DeleteIcon from "components/Icons/DeleteIcon";
-import PlusIcon from "components/Icons/PlusIcon";
import { useTranslation } from "react-i18next";
import { useAppSelector } from "redux/hooks";
import { colors } from "../../ThemeConstants";
@@ -51,14 +50,19 @@ export default function ActionsButtons({
{quantity > 0 ? (
}
size="small"
onClick={() => setQuantity(Math.max(1, quantity - 1))}
className={styles.quantityButton}
{...(min && { disabled: quantity === min })}
- >
-
-
+ style={{
+ width: 28,
+ height: 28,
+ border: "none",
+ }}
+ />
) : (
}
size="small"
- danger
- icon={ }
- className={styles.removeButton}
+ className={styles.addButton}
+ style={{
+ background: "#FEF2F2",
+ width: 28,
+ height: 28,
+ border: "none",
+ }}
/>
)}
@@ -88,21 +95,27 @@ export default function ActionsButtons({
min={min || 1}
max={max || 100}
value={quantity || 1}
- onChange={(value) => setQuantity(value || 1)}
+ onChange={(value: number | null) => setQuantity(value || 1)}
size="small"
controls={false}
className={styles.quantityInput}
name="id"
/>
}
size="small"
onClick={() => setQuantity(Math.min(100, quantity + 1))}
className={styles.quantityButton}
{...(max && { disabled: quantity >= max })}
- >
-
-
+ style={{
+ backgroundColor: colors.primary,
+ width: 28,
+ height: 28,
+ border: "none",
+ }}
+ />
diff --git a/src/components/CartActionsButtons/CartActionsButtons.module.css b/src/components/CartActionsButtons/CartActionsButtons.module.css
index f42ba7e..3969878 100644
--- a/src/components/CartActionsButtons/CartActionsButtons.module.css
+++ b/src/components/CartActionsButtons/CartActionsButtons.module.css
@@ -56,7 +56,6 @@
position: absolute;
top: 12px;
right: 12px;
- background-color: #ffb70014;
border-radius: 50%;
padding: 8px;
cursor: pointer;
diff --git a/src/components/CartActionsButtons/CartActionsButtons.tsx b/src/components/CartActionsButtons/CartActionsButtons.tsx
index e86fbc1..74392c7 100644
--- a/src/components/CartActionsButtons/CartActionsButtons.tsx
+++ b/src/components/CartActionsButtons/CartActionsButtons.tsx
@@ -46,7 +46,7 @@ export default function CartActionsButtons({ item }: { item: CartItem }) {
{item.quantity > 1 ? (
}
size="small"
onClick={() =>
@@ -76,14 +76,11 @@ export default function CartActionsButtons({ item }: { item: CartItem }) {
placement={isRTL ? "left" : "right"}
styles={{
root: getPopconfirmOverlayStyle(),
- body: {
- padding: isMobile ? "12px" : "16px",
- },
}}
>
}
size="small"
onClick={() =>
@@ -109,7 +106,7 @@ export default function CartActionsButtons({ item }: { item: CartItem }) {
min={1}
max={100}
value={item.quantity || 1}
- onChange={(value: number) =>
+ onChange={(value: number | null) =>
dispatch(
updateQuantity({
id: item.id,
@@ -125,7 +122,7 @@ export default function CartActionsButtons({ item }: { item: CartItem }) {
/>
}
size="small"
onClick={() =>
diff --git a/src/pages/pay/components/splitBill/EqualltyChoiceBottomSheet.tsx b/src/pages/pay/components/splitBill/EqualltyChoiceBottomSheet.tsx
index 863ade8..3b59d4e 100644
--- a/src/pages/pay/components/splitBill/EqualltyChoiceBottomSheet.tsx
+++ b/src/pages/pay/components/splitBill/EqualltyChoiceBottomSheet.tsx
@@ -3,8 +3,8 @@ import { ProBottomSheet } from "components/ProBottomSheet/ProBottomSheet.tsx";
import { useMemo } from "react";
import { useTranslation } from "react-i18next";
-import PeopleIcon from "components/Icons/PeopleIcon";
import ProText from "components/ProText";
+import ArabicPrice from "components/ArabicPrice";
import {
selectCart,
selectGrandTotal,
@@ -14,6 +14,7 @@ import { useAppDispatch, useAppSelector } from "redux/hooks";
import { ProGray1 } from "ThemeConstants";
import PayForActions from "../../../split-bill/components/PayForActions";
import TotalPeopleActions from "../../../split-bill/components/TotalPeopleActions";
+import styles from "./SplitBill.module.css";
interface SplitBillChoiceBottomSheetProps {
isOpen: boolean;
@@ -34,20 +35,23 @@ export function EqualltyChoiceBottomSheet({
}: SplitBillChoiceBottomSheetProps) {
const { t } = useTranslation();
const dispatch = useAppDispatch();
- const { tmp } = useAppSelector(selectCart);
+ const { tmp, splitBillAmount } = useAppSelector(selectCart);
const grandTotal = useAppSelector(selectGrandTotal);
const splitBillTmp = tmp as SplitBillTmp;
const totalPeople = splitBillTmp?.totalPeople || 2;
const payFor = splitBillTmp?.payFor || 1;
- // Calculate split amount
+ // Calculate original total bill (grandTotal already subtracts splitBillAmount)
+ const originalTotalBill = grandTotal + splitBillAmount;
+
+ // Calculate split amount based on original total bill
const splitAmount = useMemo(() => {
if (totalPeople > 0) {
- return (grandTotal / totalPeople) * payFor;
+ return (originalTotalBill / totalPeople) * payFor;
}
return 0;
- }, [grandTotal, totalPeople, payFor]);
+ }, [originalTotalBill, totalPeople, payFor]);
const handleSave = () => {
dispatch(updateSplitBillAmount(splitAmount));
@@ -67,8 +71,11 @@ export function EqualltyChoiceBottomSheet({
title={t("splitBill.divideTheBillEqually")}
showCloseButton={true}
initialSnap={1}
- height={610}
- snapPoints={[610]}
+ height={630}
+ snapPoints={[630]}
+ contentStyle={{
+ padding: 0,
+ }}
>
-
-
-
-
-
-
-
- {t("checkout.totalPeople")}
-
-
-
-
-
-
-
-
-
-
-
-
- {t("checkout.payFor")}
-
-
-
-
-
-
-
{/* Spinner Visualization - Blank Spin Wheel */}
{totalPeople > 0 && (
);
})}
- {/* Center circle to make it look like a blank wheel */}
+ {/* Center circle with total bill amount */}
- {payFor}
+
+
+ {t("splitBill.totalBill")}
+
-
- {t("splitBill.yourAmount")}: {splitAmount.toFixed(2)}
-
)}
-
- {t("splitBill.removeSplitWay")}
+
+
+ {t("checkout.totalPeople")}
+
+
+
+
+
+ {t("checkout.totalPeople")}
+
+
+
+
+
+ {t("checkout.payFor")}
+
+
+
+
+
+ {t("checkout.payFor")}
+
+
+
+
+
+
+
+ {t("splitBill.yourShare")}
+
+
+
+
+
+
+
+ {t("splitBill.removeSplit")}