diff --git a/apps/web/components/eventtype/EventSetupTab.tsx b/apps/web/components/eventtype/EventSetupTab.tsx index c19ac33475..5783a5a829 100644 --- a/apps/web/components/eventtype/EventSetupTab.tsx +++ b/apps/web/components/eventtype/EventSetupTab.tsx @@ -34,6 +34,16 @@ const getLocationFromType = ( } }; +const getDefaultLocationValue = (options: EventTypeSetupProps["locationOptions"], type: string) => { + for (const locationType of options) { + for (const location of locationType.options) { + if (location.value === type && location.disabled === false) { + return location; + } + } + } +}; + export const EventSetupTab = ( props: Pick ) => { @@ -138,7 +148,8 @@ export const EventSetupTab = ( return true; }); - const defaultValue = locationOptions.find((item) => item.label === "video")?.options; + const defaultValue = getDefaultLocationValue(locationOptions, "integrations:daily"); + return (
{validLocations.length === 0 && ( diff --git a/apps/web/pages/availability/[schedule].tsx b/apps/web/pages/availability/[schedule].tsx index 84a4337bf7..a2c13c5f21 100644 --- a/apps/web/pages/availability/[schedule].tsx +++ b/apps/web/pages/availability/[schedule].tsx @@ -51,7 +51,7 @@ const DateOverride = ({ workingHours }: { workingHours: WorkingHours[] }) => { }); const { t } = useLocale(); return ( -
+

{t("date_overrides")}{" "} @@ -60,8 +60,8 @@ const DateOverride = ({ workingHours }: { workingHours: WorkingHours[] }) => {

-

{t("date_overrides_subtitle")}

-
+

{t("date_overrides_subtitle")}

+
yyyymmdd(field.ranges[0].start))} remove={remove} @@ -148,7 +148,7 @@ export default function Availability({ schedule }: { schedule: number }) { ) } CTA={ -
+
-
-
- {typeof me.data?.weekStart === "string" && ( - - )} + className="flex flex-col sm:mx-0 xl:flex-row xl:space-x-6"> +
+
+
+ {typeof me.data?.weekStart === "string" && ( + + )} +
+
+
+ {data?.workingHours && }
- {data?.workingHours && }
-
-
+
+
-
+

{t("something_doesnt_look_right")}

diff --git a/packages/features/schedules/components/Schedule.tsx b/packages/features/schedules/components/Schedule.tsx index 0050f9c934..8fa50cf52d 100644 --- a/packages/features/schedules/components/Schedule.tsx +++ b/packages/features/schedules/components/Schedule.tsx @@ -51,9 +51,9 @@ const ScheduleDay = ({ const watchDayRange = watch(name); return ( -
+
{/* Label & switch container */} -
+
@@ -77,7 +75,7 @@ const ScheduleDay = ({ {watchDayRange ? (
- {!!watchDayRange.length &&
{CopyButton}
} + {!!watchDayRange.length &&
{CopyButton}
}
) : ( @@ -142,7 +140,7 @@ const Schedule = < const { i18n } = useLocale(); return ( -
+
{/* First iterate for each day */} {weekdayNames(i18n.language, weekStart, "long").map((weekday, num) => { const weekdayIndex = (num + weekStart) % 7; @@ -179,7 +177,7 @@ export const DayRanges = ({
{fields.map((field, index: number) => ( -
+
} /> {index === 0 && (