From d2a16ab01e4adb24d9a118e0cf8020c2e767eabe Mon Sep 17 00:00:00 2001 From: CarinaWolli Date: Wed, 8 Jun 2022 08:52:36 +0200 Subject: [PATCH] add all missing information to mobile view --- .../booking/pages/AvailabilityPage.tsx | 63 ++++++++++++++++--- 1 file changed, 54 insertions(+), 9 deletions(-) diff --git a/apps/web/components/booking/pages/AvailabilityPage.tsx b/apps/web/components/booking/pages/AvailabilityPage.tsx index 8d54dd5ed0806a..0f6ed009b428c4 100644 --- a/apps/web/components/booking/pages/AvailabilityPage.tsx +++ b/apps/web/components/booking/pages/AvailabilityPage.tsx @@ -260,12 +260,6 @@ const AvailabilityPage = ({ profile, plan, eventType, workingHours, previousPage {eventType.description}

)} - {eventType.locations.length === 1 && ( -

- - {locationKeyToString(eventType.locations[0], t)} -

- )} {eventType.locations.length === 1 && (

{Object.values(AppStoreLocationType).includes( @@ -279,10 +273,59 @@ const AvailabilityPage = ({ profile, plan, eventType, workingHours, previousPage {locationKeyToString(eventType.locations[0], t)}

)} + {eventType.locations.length > 1 && ( +
+
+ +
+

+ {eventType.locations.map((el, i, arr) => { + return ( + + {locationKeyToString(el, t)}{" "} + {arr.length - 1 !== i && ( + {t("or_lowercase")} + )} + + ); + })} +

+
+ )}

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

+ {!rescheduleUid && eventType.recurringEvent?.count && eventType.recurringEvent?.freq && ( +
+ +

+ {t("every_for_freq", { + freq: t( + `${RRuleFrequency[eventType.recurringEvent.freq].toString().toLowerCase()}` + ), + })} +

+ { + setRecurringEventCount(parseInt(event?.target.value)); + }} + /> +

+ {t( + `${RRuleFrequency[eventType.recurringEvent.freq].toString().toLowerCase()}`, + { + count: recurringEventCount, + } + )} +

+
+ )} {eventType.price > 0 && (
@@ -295,6 +338,8 @@ const AvailabilityPage = ({ profile, plan, eventType, workingHours, previousPage
)} + +
{booking?.startTime && rescheduleUid && (
@@ -356,7 +401,7 @@ const AvailabilityPage = ({ profile, plan, eventType, workingHours, previousPage
)} {eventType.locations.length === 1 && ( -

+

{Object.values(AppStoreLocationType).includes( eventType.locations[0].type as unknown as AppStoreLocationType ) ? ( @@ -369,7 +414,7 @@ const AvailabilityPage = ({ profile, plan, eventType, workingHours, previousPage

)} {eventType.locations.length > 1 && ( -
+