Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.5.0-dev.4 invalid or no date selected if the first provider in the booking page has no availability times #1389

Closed
KRUAndu opened this issue Jul 15, 2023 · 5 comments

Comments

@KRUAndu
Copy link

KRUAndu commented Jul 15, 2023

Issue

When selecting a service but the first provider in the list has no available times, selecting a second provider does not trigger an event to select the first available date in calendar and gives incorrect availability hours.

This issue does not happen when "Any Provider" is enabled, but this might maybe the cause of one or more people having available times in for the current month.

This might be a niche problem but could affect others in some scenarios. I found this when trying to make a user that pretty much forces a person to "Select a service" and "Select a provider (if no other providers are available for the service)". Should I create a feature request for this?

To recreate:

  1. Have two providers ready, where the first one does not have any and the second one has available times for the current month.
  2. Assign all services for the user that has no available times.
  3. Assign a service for the user that has available times for the current month.
  4. The frontend booking page must preselect the user with no available times. (add ! or 1 to the beginning of the first name to make it come first in the Provider list).
  5. If all prerequisites are met, then all you have to do now to recreate the problem is to select a service and a provider with available times.

Result:

This should show the issue where no date is selected in the calendar but its giving me availability times (later found it to be the current date which is not an available DateTime):
image

Going to the submit page shows that the start date is 15/07/2023 which is not even an available date for that provider. Confirming the appointment thankfully results in an error but people might not select a valid date as they might have the assumption that the first available date is selected.
image

@KRUAndu KRUAndu changed the title 1.5.0-dev.4 invalid or no date selected w/o Any Provider enabled 1.5.0-dev.4 invalid or no date selected if the first provider in the booking page have no availability times Jul 15, 2023
@KRUAndu KRUAndu changed the title 1.5.0-dev.4 invalid or no date selected if the first provider in the booking page have no availability times 1.5.0-dev.4 invalid or no date selected if the first provider in the booking page has no availability times Jul 15, 2023
@alextselegidis
Copy link
Owner

Hello!

Thanks for posting this ticket.

This is already fixed on develop with the addition of this feature:

#1204

Alex Tselegidis, Easy!Appointments Creator
Need a customization? Get a free quote!

@KRUAndu
Copy link
Author

KRUAndu commented Jul 17, 2023

@alextselegidis I just built the latest nightly and seems #1204 or something else caused a new problem. If you select the service/provider and they have available times, the first available date is selected and works as expected. But now if I go back and select another provider who is unavailable for the current month (not changing the service here), then I am still provided with the previous providers available times. Confirming the appointment still thankfully fails.

@alextselegidis
Copy link
Owner

Hello!

Do you get a JS error or similar?

I tried to reproduce this but I was always getting the right results.

Alex Tselegidis, Easy!Appointments Creator
Need a customization? Get a free quote!

@KRUAndu
Copy link
Author

KRUAndu commented Jul 18, 2023

Hi,

There does not seem to be any major JS errors in the console, only one deprecation warning for moment.min.js. No errors came up when building with "npm run build". As I am not a PHP/JS developer I can't pinpoint these exact issues here in code.

I did make a E!A 1.3.1 SQL database clone and migrate to 1.4.0 ... 1.4.3 to then 1.5-dev.3, the usual SQL upgrades and haven't done any clean database testing, but I'm quite sure these issues might not be due to the database. I can however check these bugs with a clean database later.

Speaking of JS errors, changing the month in the calendar does however give a deprecation warning I also saw with dev3 and dev4 releases and caused some issues with Safari (iOS):
image
image

I also found some other problems, one of them is the new "is_month_unavailable" that you've added in #1204, the frontend does not seem to know what to do with that response and does not mark days as unavailable at all. I really don't want to clutter this issue any further, so if there is something else I find, I'll be sure to open an issue if there seems to be one.

@alextselegidis
Copy link
Owner

Hello!

I just found and fixed this error with this commit:

0fdb1ff

You may check again and let us know in case you experience other similar errors.

Alex Tselegidis, Easy!Appointments Creator
Need a customization? Get a free quote!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants