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

"slotTimeInMinutes" might not be set correctly #338

Open
tobias74 opened this issue Apr 16, 2024 · 0 comments
Open

"slotTimeInMinutes" might not be set correctly #338

tobias74 opened this issue Apr 16, 2024 · 0 comments

Comments

@tobias74
Copy link
Contributor

return ($availability->slotTimeInMinutes)

The property "slotTimeInMinutes" on Availability which is used in the calculation of getEndTime on the Appointment might not yet have been initialized. The default value for "slotTimeInMinutes" is 10. This default value will then be used to calculate the endTime.

This might lead to bugs which are hard to debug because they only affect "Scopes" which have a "slotTimeInMinutes" different from 10.

There are a few thoughs to concider:

  • Fully initialize the Availability at all times to prevent usage of default values?
  • Remove the default value and make the call to "getEndTime" throw an Exception when called on not fully initialized Availabilities?
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

1 participant