New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: timezone display on booking page to reflect event availability timezone #14127
Conversation
@Shaik-Sirajuddin is attempting to deploy a commit to the cal Team on Vercel. A member of the Team first needs to authorize it. |
Graphite Automations"Add consumer team as reviewer" took an action on this PR • (03/18/24)1 reviewer was added to this PR based on Keith Williams's automation. "Add community label" took an action on this PR • (03/18/24)1 label was added to this PR based on Keith Williams's automation. |
Thank you for following the naming conventions! 🙏 Feel free to join our discord and post your PR link. |
📦 Next.js Bundle Analysis for @calcom/webThis analysis was generated by the Next.js Bundle Analysis action. 🤖 This PR introduced no changes to the JavaScript bundle! 🙌 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution @Shaik-Sirajuddin.
I only have one blocking comment to address.
const { data: eventOwnerDefaultShedule } = trpc.viewer.availability.schedule.get.useQuery({ | ||
scheduleId: event?.owner?.defaultScheduleId || undefined, | ||
}); | ||
|
||
useEffect(() => { | ||
if (event && event?.lockTimeZoneToggleOnBookingPage) { | ||
if (event?.schedule?.timeZone) { | ||
setTimezone(event.schedule?.timeZone); | ||
} else if (eventOwnerDefaultShedule) { | ||
setTimezone(eventOwnerDefaultShedule.timeZone); | ||
} | ||
} | ||
}, [event, setTimezone, eventOwnerDefaultShedule]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Blocking: Let's move the logic of getting the owner's timezone to server side
@@ -44,6 +46,20 @@ export const EventMeta = ({ | |||
const isEmbed = useIsEmbed(); | |||
const hideEventTypeDetails = isEmbed ? embedUiConfig.hideEventTypeDetails : false; | |||
|
|||
const { data: eventOwnerDefaultShedule } = trpc.viewer.availability.schedule.get.useQuery({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's fix this typo here as well
const { data: eventOwnerDefaultShedule } = trpc.viewer.availability.schedule.get.useQuery({ | |
const { data: eventOwnerDefaultSchedule } = trpc.viewer.availability.schedule.get.useQuery({ |
Migrated fetching owners default schedule to server side |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Working as expected. Thanks again @Shaik-Sirajuddin!
What does this PR do?
Currently when the "Lock timezone on booking page" feature is enabled for the event ,
the timezone on the booking page locked is based on the timezone of the user accessing the booking page
this pr updates the display of the timezone on the booking page to the same timezone for which the 'availability' settings for that event have been defined.
Fixes #13521
Fix Video
Type of change
Mandatory Tasks