Advanced date override handling and timezone compatibility improvements#5
Advanced date override handling and timezone compatibility improvements#5zaibkhan 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>
Codoki PR ReviewSummary: Fix override availability logic, honor busy and hours Issues (Critical & High only)
Showing top 1 issues. Critical: 0, High: 1. See inline suggestions for more. Key Feedback (click to expand)
Confidence: 3/5 — Needs work before merge (1 high · status: Requires changes) React with 👍 or 👎 if you found this review useful. |
| ) { | ||
| // slot is not within the date override | ||
| return false; | ||
| } |
There was a problem hiding this comment.
=== always yields false—use .isSame() to compare values; (3) consider aligning working-hours day/minute computations to organizerTimeZone rather than UTC to avoid off-by-one day around midnight and DST.
| } | |
| ```suggestion | |
| // Do not early-return on date overrides; still enforce busy checks. | |
| // Also guard the working-hours check so overrides can supersede working hours. | |
| if (!dateOverrideExist && workingHours.find((workingHour) => { | |
| if (workingHour.days.includes(slotStartTime.day())) { | |
| const start = slotStartTime.hour() * 60 + slotStartTime.minute(); | |
| const end = slotEndTime.hour() * 60 + slotEndTime.minute(); | |
| if (start < workingHour.startTime || end > workingHour.endTime) { | |
| return true; | |
| } | |
| } | |
| })) { | |
| return false; | |
| } |
No description provided.