feat: Support cross-midnight working hours and appointments#1833
Open
gabor-h wants to merge 1 commit into
Open
feat: Support cross-midnight working hours and appointments#1833gabor-h wants to merge 1 commit into
gabor-h wants to merge 1 commit into
Conversation
Owner
|
Hello! Thanks for providing this PR. I will have to take a closer look and write back with more info.
|
|
Any update on this? It'd be lovely to have! :) |
Owner
|
Hello! There were recent updates in the source that made this PR conflicting. If possible, please update the solution accordingly.
|
Author
|
I'll look into it in a bit! |
Allow working plans with end time before start time (e.g., 18:00-02:00) for businesses operating evening/night shifts. Key changes: - Detect cross-midnight periods by checking if end <= start time - Add +1 day to end times when working hours cross midnight - Handle breaks within cross-midnight periods correctly (e.g., break at 01:00 when shift starts at 18:00) - Split multi-day appointments in calendar views for proper display - Remove validation that blocked cross-midnight configurations in working plan exceptions Calendar displays appointments spanning midnight as two connected blocks (one ending at midnight, one starting at midnight) while storing them as a single appointment in the database. Fixes alextselegidis#1432 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
f2241df to
d9f2c6a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
Details
Calendar displays appointments spanning midnight as two connected blocks (one ending at midnight, one starting at midnight) while storing them as a single appointment in the database.
Files Changed
application/libraries/Availability.php- Cross-midnight period calculationsapplication/models/Providers_model.php- Removed start > end validationassets/js/utils/calendar_default_view.js- Split multi-day events for displayassets/js/utils/calendar_table_view.js- Split multi-day events for displayTest Plan
Fixes #1432