From 689170ebce109d9a4749ce6736a11aa62f772791 Mon Sep 17 00:00:00 2001 From: mouazkh Date: Tue, 21 Jul 2026 10:36:05 +0300 Subject: [PATCH] fixed the app dialog --- app/reservations/page.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/reservations/page.js b/app/reservations/page.js index 5fed7a3..aa35e43 100644 --- a/app/reservations/page.js +++ b/app/reservations/page.js @@ -687,10 +687,11 @@ function PaymentDialog({ const amount = reservation.depositAmount || reservation.totalPrice || 0; const currencySign = reservation.currencySign || t("sypSymbol"); const selectedMethod = paymentMethods?.find( - (m) => (m?.id ?? m?.name) === selectedPayment, + (m) => String(m?.id ?? m?.name) === String(selectedPayment) ); const isHaram = selectedMethod?.name?.toLowerCase?.() === "haram"; - const canPay = payingId !== reservation.id && (!isHaram || !!receiptImage); + const hasSelectedMethod = !!selectedMethod; + const canPay = payingId !== reservation.id && hasSelectedMethod && (!isHaram || !!receiptImage); return ( <>