diff --git a/apps/web/components/booking/AvailableEventLocations.tsx b/apps/web/components/booking/AvailableEventLocations.tsx index e2be596bde..9a75762d65 100644 --- a/apps/web/components/booking/AvailableEventLocations.tsx +++ b/apps/web/components/booking/AvailableEventLocations.tsx @@ -1,9 +1,10 @@ import { getEventLocationType, locationKeyToString } from "@calcom/app-store/locations"; +import { classNames } from "@calcom/lib"; import { Props } from "./pages/AvailabilityPage"; export function AvailableEventLocations({ locations }: { locations: Props["eventType"]["locations"] }) { - return ( + return locations.length ? (

@@ -14,10 +15,13 @@ export function AvailableEventLocations({ locations }: { locations: Props["event return null; } return ( - + {`${eventLocationType.label} {locationKeyToString(location)} @@ -27,5 +31,7 @@ export function AvailableEventLocations({ locations }: { locations: Props["event

+ ) : ( + <> ); } diff --git a/apps/web/components/booking/pages/AvailabilityPage.tsx b/apps/web/components/booking/pages/AvailabilityPage.tsx index e876e118cf..59b024a460 100644 --- a/apps/web/components/booking/pages/AvailabilityPage.tsx +++ b/apps/web/components/booking/pages/AvailabilityPage.tsx @@ -239,15 +239,15 @@ function TimezoneDropdown({ }; return ( - - -

- + + +

+ {timeZone} {isTimeOptionsOpen ? ( - + ) : ( - + )}

@@ -379,10 +379,7 @@ const AvailabilityPage = ({ profile, eventType }: Props) => { shouldAlignCentrally ? "mx-auto" : "", isEmbed ? classNames(maxWidth) - : classNames( - "transition-max-width dark:bg- mx-auto my-0 duration-500 ease-in-out md:my-24", - maxWidth - ) + : classNames("transition-max-width mx-auto my-0 duration-500 ease-in-out md:my-24", maxWidth) )}>
{
{eventType?.description && ( -
+
- +
)} {eventType?.requiresConfirmation && ( -

- +

+ {t("requires_confirmation")}

)}

- + {eventType.length} {t("minutes")}

{eventType.price > 0 && ( -
- +
+ {
{eventType?.description && ( -
+
- +
)} {eventType?.requiresConfirmation && ( -
+
@@ -527,13 +524,13 @@ const AvailabilityPage = ({ profile, eventType }: Props) => {
)} -

- +

+ {eventType.length} {t("minutes")}

{!rescheduleUid && eventType.recurringEvent && ( -
- +
+

{getRecurringFreq({ t, recurringEvent: eventType.recurringEvent })} @@ -542,13 +539,13 @@ const AvailabilityPage = ({ profile, eventType }: Props) => { type="number" min="1" max={eventType.recurringEvent.count} - className="w-15 dark:text-darkgray-600 h-7 rounded-sm border-gray-300 bg-white text-sm text-gray-600 [appearance:textfield] ltr:mr-2 rtl:ml-2 dark:border-gray-500 dark:bg-gray-600" + className="w-15 dark:bg-darkgray-200 h-7 rounded-sm border-gray-300 bg-white text-sm font-medium [appearance:textfield] ltr:mr-2 rtl:ml-2 dark:border-gray-500" defaultValue={eventType.recurringEvent.count} onChange={(event) => { setRecurringEventCount(parseInt(event?.target.value)); }} /> -

+

{t("occurrence", { count: recurringEventCount, })} @@ -557,7 +554,7 @@ const AvailabilityPage = ({ profile, eventType }: Props) => {

)} {eventType.price > 0 && ( -

+

-

+

{profile.name}

-

+

{eventType.title}

{!!eventType.seatsPerTimeSlot && ( @@ -496,83 +498,89 @@ const BookingPage = ({

)} {eventType?.description && ( -

- - {eventType.description} -

+
+
+ +
+ +
)} {eventType?.requiresConfirmation && ( -

- +

+
+ +
{t("requires_confirmation")} -

+
)} -

- - {eventType.length} {t("minutes")} -

- {eventType.price > 0 && ( -

- - - - +

+

+ + {eventType.length} {t("minutes")}

- )} - {!rescheduleUid && eventType.recurringEvent?.freq && recurringEventCount && ( -
- -

- {getEveryFreqFor({ - t, - recurringEvent: eventType.recurringEvent, - recurringCount: recurringEventCount, - })} + {eventType.price > 0 && ( +

+ + + +

+ )} + {!rescheduleUid && eventType.recurringEvent?.freq && recurringEventCount && ( +
+ +

+ {getEveryFreqFor({ + t, + recurringEvent: eventType.recurringEvent, + recurringCount: recurringEventCount, + })} +

+
+ )} +
+ +
+ {(rescheduleUid || !eventType.recurringEvent?.freq) && + parseDate(dayjs(date).tz(timeZone()), i18n)} + {!rescheduleUid && + eventType.recurringEvent?.freq && + recurringStrings.slice(0, 5).map((aDate, key) =>

{aDate}

)} + {!rescheduleUid && eventType.recurringEvent?.freq && recurringStrings.length > 5 && ( +
+ ( +

{aDate}

+ ))}> +

+ {t("plus_more", { count: recurringStrings.length - 5 })} +

+
+
+ )} +
- )} -
- -
- {(rescheduleUid || !eventType.recurringEvent?.freq) && - parseDate(dayjs(date).tz(timeZone()), i18n)} - {!rescheduleUid && - eventType.recurringEvent?.freq && - recurringStrings.slice(0, 5).map((aDate, key) =>

{aDate}

)} - {!rescheduleUid && eventType.recurringEvent?.freq && recurringStrings.length > 5 && ( -
- ( -

{aDate}

- ))}> -

- {t("plus_more", { count: recurringStrings.length - 5 })} -

-
-
- )} -
+ {eventTypeDetail.isWeb3Active && eventType.metadata.smartContractAddress && ( +

+ {t("requires_ownership_of_a_token") + " " + eventType.metadata.smartContractAddress} +

+ )} + {booking?.startTime && rescheduleUid && ( +
+

+ {t("former_time")} +

+

+ + {typeof booking.startTime === "string" && parseDate(dayjs(booking.startTime), i18n)} +

+
+ )}
- {eventTypeDetail.isWeb3Active && eventType.metadata.smartContractAddress && ( -

- {t("requires_ownership_of_a_token") + " " + eventType.metadata.smartContractAddress} -

- )} - {booking?.startTime && rescheduleUid && ( -
-

- {t("former_time")} -

-

- - {typeof booking.startTime === "string" && parseDate(dayjs(booking.startTime), i18n)} -

-
- )}