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

Issue with Calendar Availability for Services with Dual Customer Support #1384

Closed
ERSDIGITAL opened this issue Jul 8, 2023 · 4 comments
Closed

Comments

@ERSDIGITAL
Copy link

'DATE(start_datetime)' => $date,

I wanted to bring your attention to an issue we are currently facing regarding the calendar availability for services with dual customer support.

Upon investigation, it appears that the problem lies within the code snippet located in the file: easyappointments/application/libraries/Availability.php, specifically in the consider_multiple_attendants function. On line 346, the query being executed consistently returns an empty result. Consequently, this condition restricts the retrieval of calendar unavailability.

To resolve this issue, I suggest removing the aforementioned date condition from the code. By doing so, we should be able to retrieve the necessary unavailability data from the calendar, thus rectifying the problem.

If you require any further information or assistance in addressing this matter, please don't hesitate to reach out. Thank you for your attention to this issue, and I look forward to your prompt response.

Please: read the email on the forum with the subject: Issue with Calendar Availability for Services with Dual Customer Support

Best regards,
Eduardo R.
From BRAZIL

V

@alextselegidis
Copy link
Owner

Hello!

Thanks for posting this.

To resolve this issue, I suggest removing the aforementioned date condition from the code. By doing so, we should be able to retrieve the necessary unavailability data from the calendar, thus rectifying the problem.

Unfortunately this is not possible, because there may be thousands of unavailability records in the DB that would introduce a performance bottleneck.

The condition is actually right, but there is one case this might not work: If the unavailability event spans through multiple days.

Is this the case for you?

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

@ERSDIGITAL
Copy link
Author

Hello, Dear Alex!

T hanks for the answer

Yes, this is my case. I came across a specific scenario related to the issue. To illustrate, I considered a provider on vacation, which in Brazil can last up to 30 consecutive days.

And yes, I agree, this change would introduce a performance bottleneck, causing another issues.

Therefore, I propose an alternative solution to handle the condition, as described in the following line:
'DATE(end_datetime) >=' => $date,

By adopting this modification, we would ensure that the query does not include previous unavailability and would only cover the valid ones. I performed tests with this approach and confirmed that the query was successful, functioning as expected.

I'm looking forward to your comments and opinions regarding this proposal. I'm available to discuss any additional aspect related to the subject.

Best regards,
Eduardo R.
From BRAZIL

@alextselegidis
Copy link
Owner

Hello!

I checked the latest develop code and this particular check was changed.

You can download the latest 1.5 dev package (currently 1.5.0-dev.4) from the website and give it a try.

Let us know if this still makes problems for you.

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

@alextselegidis
Copy link
Owner

Closing this due to inactivity

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