Advanced date override handling and timezone compatibility improvements#6
Advanced date override handling and timezone compatibility improvements#6ShashankFC wants to merge 1 commit into
Conversation
* fix date override for fixed round robin + time zone in date override * check if slot is within working hours of fixed hosts * add test for date override in different time zone * fix date overrides for not fixed hosts (round robin) * code clean up * fix added test * use the correct timezone of user for date overrides --------- Co-authored-by: CarinaWolli <wollencarina@gmail.com>
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3ef328421f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (dateOverrideExist) { | ||
| return true; |
There was a problem hiding this comment.
Keep busy checks for date overrides
In checkIfIsAvailable, the early return true when dateOverrideExist is set means any slot that falls on a date override skips the busy evaluation entirely. That makes it possible to return availability even when the host has calendar conflicts/bookings in busy on that override date, leading to double-booking. The busy check should still run after confirming the slot is within the override window.
Useful? React with 👍 / 👎.
| const start = slotStartTime.hour() * 60 + slotStartTime.minute(); | ||
| const end = slotStartTime.hour() * 60 + slotStartTime.minute(); | ||
| if (start < workingHour.startTime || end > workingHour.endTime) { | ||
| return true; |
There was a problem hiding this comment.
Treat split working hours as valid ranges
The predicate inside workingHours.find returns true whenever the slot is outside the current range (lines 141–144), so any non-matching range will cause the slot to be rejected even if another range on the same day contains it. For users with split working hours (e.g., 09:00–12:00 and 13:00–17:00), this makes all slots disappear. The check should instead allow the slot if it fits at least one working-hours interval.
Useful? React with 👍 / 👎.
Test 7nn---nReplicated from ai-code-review-evaluation/cal.com-cursor#7