alextselegidis/easyappointments

Booking first screen may crash JS

Thomas-git opened this issue · 6 comments

How to reproduce:
Use dev version (stable release is not affected)
Add 4 or more services to one provider.
Go to booking page
Select service1 then service2, then service3 then service4. Go back to service one (yes you are a very fussy customer).

It makes JS hang, the page become unusable and you have to reload page. Tested on chrome and firefox. Mobil and desktop, same issue.

I'd be more that happy to solve this but I don't know where to look at in the first place.

It seems to happen only when the last service is selected. What script is call on service selection?

Hello!

This could be because each service change will trigger an HTTP request to fetch availability.

In any case the script that has this logic is frontend_book.js

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

Hello!

Are there any error messages related to this problem?

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

No error message. I didn't had time to spend on this. Maybe next week. My first thought is to add a debounce on the fetch request. But maybe you’ve already done this. I still have to look at the code.

There were some updates lately in the booking screen. Can you please check with the latest 1.5.0-alpha.1 release and see if this is still an issue?

Closing due to inactivity, feel free to post more info so that we can pick this up again.

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