From 2462e8e597cb62e8240c992f626314b8c50b33cd Mon Sep 17 00:00:00 2001 From: Joe Au-Yeung <65426560+joeauyeung@users.noreply.github.com> Date: Wed, 8 Feb 2023 16:13:10 -0500 Subject: [PATCH] Small UI fixes for seats & destination calendars (#6859) * Do not add former time for events on seats * Default display destination calendar * Add seats badge to event type item * Add string * Actively watch seats enabled option for requires confirmation * Only show former time when there is a rescheduleUid --- .../components/booking/pages/BookingPage.tsx | 2 +- .../components/eventtype/EventAdvancedTab.tsx | 2 +- apps/web/public/static/locales/en/common.json | 3 ++- .../calendars/DestinationCalendarSelector.tsx | 8 +++++-- .../components/EventTypeDescription.tsx | 18 ++++++++++++++- packages/features/tips/Tips.tsx | 2 +- packages/trpc/server/routers/viewer.tsx | 23 +++++++++++++++++-- .../trpc/server/routers/viewer/bookings.tsx | 2 +- .../trpc/server/routers/viewer/eventTypes.tsx | 1 + 9 files changed, 51 insertions(+), 10 deletions(-) diff --git a/apps/web/components/booking/pages/BookingPage.tsx b/apps/web/components/booking/pages/BookingPage.tsx index eaf35347d5..88039a5eb1 100644 --- a/apps/web/components/booking/pages/BookingPage.tsx +++ b/apps/web/components/booking/pages/BookingPage.tsx @@ -167,7 +167,7 @@ const BookingPage = ({ isSuccessBookingPage: true, email: bookingForm.getValues("email"), eventTypeSlug: eventType.slug, - formerTime: booking?.startTime.toString(), + ...(rescheduleUid && booking?.startTime && { formerTime: booking.startTime.toString() }), }, }); }, diff --git a/apps/web/components/eventtype/EventAdvancedTab.tsx b/apps/web/components/eventtype/EventAdvancedTab.tsx index 4088a0f922..07b1488fdd 100644 --- a/apps/web/components/eventtype/EventAdvancedTab.tsx +++ b/apps/web/components/eventtype/EventAdvancedTab.tsx @@ -74,7 +74,7 @@ export const EventAdvancedTab = ({ eventType, team }: Pick { formMethods.getValues("customInputs").splice(index, 1); diff --git a/apps/web/public/static/locales/en/common.json b/apps/web/public/static/locales/en/common.json index aa2134801e..82cdda6505 100644 --- a/apps/web/public/static/locales/en/common.json +++ b/apps/web/public/static/locales/en/common.json @@ -1588,5 +1588,6 @@ "meetings_are_better_with_the_right": "Meetings are better with the right team members there. Invite them now.", "create_a_one_one_template": "Create a one-one one template for an event type and distribute it to multiple members.", "collective_or_roundrobin": "Collective or round-robin", - "book_your_team_members": "Book your team members together with collective events or cycle through to get the right person with round-robin." + "book_your_team_members": "Book your team members together with collective events or cycle through to get the right person with round-robin.", + "event_type_seats": "{{numberOfSeats}} seats" } diff --git a/packages/features/calendars/DestinationCalendarSelector.tsx b/packages/features/calendars/DestinationCalendarSelector.tsx index d2fb3570fd..7b05f36bc1 100644 --- a/packages/features/calendars/DestinationCalendarSelector.tsx +++ b/packages/features/calendars/DestinationCalendarSelector.tsx @@ -121,6 +121,8 @@ const DestinationCalendarSelector = ({ // be used when no destination calendar is selected. const primaryCalendar = query.data.destinationCalendarEmail; + const queryDestinationCalendar = query.data.destinationCalendar; + return (