fix: refresh slots on timezone change for booker timezone restrictions#26026
fix: refresh slots on timezone change for booker timezone restrictions#26026hackice20 wants to merge 38 commits intocalcom:mainfrom
Conversation
|
@hackice20 is attempting to deploy a commit to the cal Team on Vercel. A member of the Team first needs to authorize it. |
|
Hello @dhairyashiil can you please review my PR , thanking you in anticipation :) |
packages/features/bookings/Booker/components/hooks/useTimezoneChangeDetection.ts
Outdated
Show resolved
Hide resolved
|
Hey @Ryukemeister ,Thanks for the suggestion! Refactored to use |
|
Hi @hackice20 |
thanks |
|
I'm working on this |
Ryukemeister
left a comment
There was a problem hiding this comment.
hi @hackice20, I saw another PR being created that was being referenced as a fix for this PR. i'm a bit confused, do you know what that is about? is it an edge case that we might be missing here or is it something different altogether? can you please work with @MaheshX18 to get this resolved, thank you!
I'll read the code understand what this is about and get this resolved. NO Worries. |
|
@Ryukemeister Mahesh's PR works on query level and has complete coverage of booker, platform, embed, etc. |
|
@hackice20 Type checks still failing |
|
Types are still failing @hackice20 |
|
Hey @hackice20 I haven't been able to spare time to look at this yet, but I wanted to let you know this isn't forgotten. I just need to find time to look into this further 🙏 |
|
can we please check run ci one more time please @alishaz-polymath |
|
Hello @alishaz-polymath sorry to bother you again and again, was looking if // Dynamic group events don't have restriction schedules configured
restrictionScheduleId: null,
useBookerTimezone: false,in the |
|
Tests still failing, I'm taking it forward here: #27491 Thank you for your PR and efforts 🙏 |
What does this PR do?
Refreshes available slots when booker changes timezone on events with restriction schedules that use booker's timezone.
Previously slots weren't refreshing because conversion was client-side only. Now we detect timezone changes and refetch slots when needed.
Only refreshes when all conditions are met:
Timezone changed
Event has
restrictionScheduleIdEvent has
useBookerTimezone: trueNo unnecessary API calls for regular events.
Visual Demo (For contributors especially)
Video Demo (if applicable):
perfect-video.mp4
Mandatory Tasks (DO NOT REMOVE)
How should this be tested?
Checklist