fixed the app dialog
All checks were successful
Build frontend / build (push) Successful in 1m49s

This commit is contained in:
mouazkh
2026-07-21 10:36:05 +03:00
parent 46ecf74572
commit 689170ebce

View File

@ -687,10 +687,11 @@ function PaymentDialog({
const amount = reservation.depositAmount || reservation.totalPrice || 0; const amount = reservation.depositAmount || reservation.totalPrice || 0;
const currencySign = reservation.currencySign || t("sypSymbol"); const currencySign = reservation.currencySign || t("sypSymbol");
const selectedMethod = paymentMethods?.find( 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 isHaram = selectedMethod?.name?.toLowerCase?.() === "haram";
const canPay = payingId !== reservation.id && (!isHaram || !!receiptImage); const hasSelectedMethod = !!selectedMethod;
const canPay = payingId !== reservation.id && hasSelectedMethod && (!isHaram || !!receiptImage);
return ( return (
<> <>