fix: refresh slots on timezone change for booker timezone restrictions (#27491)
* fix: refresh slots on timezone change for booker timezone restrictions * refactor: use useMemo for timezone change detection * revert: remove unnecessary formatting changes * feat: add timezone refresh for platform components Add timezone change detection and slot refresh to BookerPlatformWrapper and EventTypeCalendarViewComponent to handle restriction schedules with useBookerTimezone enabled. * refactor: extract timezone slot refresh logic into reusable hook * Update packages/platform/atoms/calendar-view/EventTypeCalendarViewComponent.tsx Co-authored-by: Syed Ali Shahbaz <[email protected]> * Update packages/platform/atoms/calendar-view/EventTypeCalendarViewComponent.tsx Co-authored-by: Syed Ali Shahbaz <[email protected]> * fix * fix: prevent unnecessary getSchedule calls when useBookerTimezone is disabled * fix: add timezone fields to BookerEvent type * fix: add missing properties to BookerEvent and BookerEventProfile types * trying to fix type errors * Add restrictionScheduleId and useBookerTimezone fields * fix: correct import path for useBookerTime hook Co-Authored-By: [email protected] <[email protected]> * fix: explicitly include restrictionScheduleId and useBookerTimezone in getPublicEvent return Co-Authored-By: [email protected] <[email protected]> * chore: trigger fresh CI build Co-Authored-By: [email protected] <[email protected]> * fix: cast event.data to BookerEvent for timezone fields access Co-Authored-By: [email protected] <[email protected]> * refactor: address review feedback for timezone slot refresh Co-Authored-By: [email protected] <[email protected]> * refactor: add explicit return type to event handler to ensure type propagation Co-Authored-By: [email protected] <[email protected]> * refactor: extract useStableTimezone hook and remove dead timezone detection code Co-Authored-By: [email protected] <[email protected]> --------- Co-authored-by: hackice20 <[email protected]> Co-authored-by: Yash <[email protected]> Co-authored-by: Morgan <[email protected]> Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
9 files changed
+140
-22
No files matched your search
@@ -1,3 +1,4 @@
|
||||
import type { PublicEventType } from "@calcom/features/eventtypes/lib/getPublicEvent";
|
||||
import { EventRepository } from "@calcom/features/eventtypes/repositories/EventRepository";
|
||||
|
||||
import type { TEventInputSchema } from "./event.schema";
|
||||
@@ -7,7 +8,7 @@ interface EventHandlerOptions {
|
||||
userId?: number;
|
||||
}
|
||||
|
||||
export const eventHandler = async ({ input, userId }: EventHandlerOptions) => {
|
||||
export const eventHandler = async ({ input, userId }: EventHandlerOptions): Promise<PublicEventType> => {
|
||||
return await EventRepository.getPublicEvent(input, userId);
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user