feat: update Office365 getMainTimeZone to handle new Graph API format and convert Windows timezones to IANA (#23763)
* feat: update Office365 getMainTimeZone to handle new Graph API format and convert Windows timezones to IANA - Handle new Graph API response format with 'value' field containing Windows timezone names - Add windows-iana dependency for timezone conversion from Windows to IANA format - Maintain backward compatibility with legacy direct string response format - Add proper error handling with fallback to original timezone name if conversion fails - Log conversion details for debugging and monitoring Co-Authored-By: morgan@cal.com <morgan@cal.com> * fix: example app select default value * fixup! fix: example app select default value * fix: preserve legacy string timezone behavior, only convert new object format - Address GitHub comments from supalarry about behavior change concerns - Preserve original behavior: return legacy string responses as-is without conversion - Only convert Windows timezones from new Graph API object format - Add explanatory comments about API format evolution - Restructure conditional logic to handle formats independently Co-Authored-By: morgan@cal.com <morgan@cal.com> * trigger CI with ready-for-e2e label Co-Authored-By: morgan@cal.com <morgan@cal.com> --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: morgan@cal.com <morgan@cal.com> Co-authored-by: Morgan <33722304+ThyMinimalDev@users.noreply.github.com>
This commit is contained in:
co-authored by
morgan@cal.com <morgan@cal.com>
morgan@cal.com <morgan@cal.com>
Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
morgan@cal.com <morgan@cal.com>
Morgan
parent
fc159fb9ea
commit
6f5b8ead75
@@ -73,7 +73,7 @@ export default function App({ Component, pageProps }: AppProps) {
|
||||
}
|
||||
}, []);
|
||||
useEffect(() => {
|
||||
if (!!selectedUser) {
|
||||
if (selectedUser) {
|
||||
setAccessToken(selectedUser.accessToken);
|
||||
setUserEmail(selectedUser.email);
|
||||
setUsername(selectedUser.username);
|
||||
@@ -83,13 +83,15 @@ export default function App({ Component, pageProps }: AppProps) {
|
||||
return (
|
||||
<div className={`${poppins.className} text-black`}>
|
||||
{options.length > 0 && (
|
||||
<Select defaultValue={selectedUser} onChange={setSelectedUser} options={options} />
|
||||
<Select
|
||||
defaultValue={options.find((opt: TUser | null) => opt?.email.includes("lauris"))}
|
||||
onChange={(opt: TUser | null) => setSelectedUser(opt)}
|
||||
options={options}
|
||||
/>
|
||||
)}
|
||||
<CalProvider
|
||||
accessToken={accessToken}
|
||||
// eslint-disable-next-line turbo/no-undeclared-env-vars
|
||||
clientId={process.env.NEXT_PUBLIC_X_CAL_ID ?? ""}
|
||||
// eslint-disable-next-line turbo/no-undeclared-env-vars
|
||||
options={{ apiUrl: process.env.NEXT_PUBLIC_CALCOM_API_URL ?? "", refreshUrl: "/api/refresh" }}>
|
||||
{email ? (
|
||||
<>
|
||||
|
||||
Reference in New Issue
Block a user