cart & checkout: apply validation based on required inputs in each service & add phone input in checkout page

This commit is contained in:
2025-10-14 23:25:08 +03:00
parent af27d1e509
commit b88cc28c89
13 changed files with 186 additions and 113 deletions

View File

@@ -13,14 +13,14 @@ export default function useOrder() {
const { mobilenumber, user_uuid } = JSON.parse(
localStorage.getItem("customer") || "{}"
) as Customer;
const { items, coupon, tip, tables, specialRequest } =
const { items, coupon, tip, tables, specialRequest, phone } =
useAppSelector(selectCart);
const [createOrder] = useCreateOrderMutation();
const handleCreateOrder = useCallback(() => {
createOrder({
phone: mobilenumber,
phone: mobilenumber || phone,
couponID: coupon,
discountAmount: 0,
comment: specialRequest,