Skip to content

Commit

Permalink
cr2
Browse files Browse the repository at this point in the history
  • Loading branch information
OmerGery committed Jan 23, 2024
1 parent 7505e92 commit cdb8558
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,11 @@ const RideButtons = ({
const [passengersCounterError, setPassengersCounterError] = useState(false);
const firstDate = () => moment(ride?.scheduledTo || undefined).add(ride?.scheduledTo ? 0 : (minMinutesBeforeFutureRide || 0) + 1, 'minutes').toDate();
const [tempSelectedDate, setTempSelectedDate] = useState(firstDate());
const paymentMethodNotAllowedOnService = !businessAccountId
&& chosenService && ride?.paymentMethodId
&& !chosenService.allowedPaymentMethods.includes(getPaymentMethod(ride.paymentMethodId))
&& serviceEstimations?.length > 0;
const ridePaymentId = ride?.paymentMethodId;
const selectedRequiredFields = chosenService && ridePaymentId && serviceEstimations?.length > 0;
const paymentMethodNotAllowedOnService = !businessAccountId && selectedRequiredFields
&& !chosenService.allowedPaymentMethods.includes(getPaymentMethod(ridePaymentId));


const checkFutureRidesSetting = async () => {
const futureRidesEnabled = await getSettingByKey(
Expand Down

0 comments on commit cdb8558

Please sign in to comment.