diff --git a/apps/web/app/insights/virtual-queues/page.tsx b/apps/web/app/insights/virtual-queues/page.tsx new file mode 100644 index 0000000000..073f205f09 --- /dev/null +++ b/apps/web/app/insights/virtual-queues/page.tsx @@ -0,0 +1,17 @@ +import { withAppDirSsr } from "app/WithAppDirSsr"; +import { _generateMetadata } from "app/_utils"; +import { WithLayout } from "app/layoutHOC"; + +import { getServerSideProps } from "@lib/insights/getServerSideProps"; + +import InsightsVirtualQueuesPage from "~/insights/insights-virtual-queues-view"; + +export const generateMetadata = async () => + await _generateMetadata( + (t) => t("insights"), + (t) => t("insights_subtitle") + ); + +const getData = withAppDirSsr(getServerSideProps); + +export default WithLayout({ getLayout: null, getData, Page: InsightsVirtualQueuesPage }); diff --git a/apps/web/modules/apps/installation/[[...step]]/step-view.tsx b/apps/web/modules/apps/installation/[[...step]]/step-view.tsx index 6691621cbc..d5937d3251 100644 --- a/apps/web/modules/apps/installation/[[...step]]/step-view.tsx +++ b/apps/web/modules/apps/installation/[[...step]]/step-view.tsx @@ -18,6 +18,7 @@ import { WEBAPP_URL } from "@calcom/lib/constants"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import type { Team } from "@calcom/prisma/client"; import type { eventTypeBookingFields } from "@calcom/prisma/zod-utils"; +import { eventTypeMetaDataSchemaWithTypedApps } from "@calcom/prisma/zod-utils"; import type { EventTypeMetaDataSchema } from "@calcom/prisma/zod-utils"; import { trpc } from "@calcom/trpc/react"; import type { AppMeta } from "@calcom/types/App"; @@ -243,15 +244,20 @@ const OnboardingPage = ({ const promises = group.eventTypes .filter((eventType) => eventType.selected) .map((value: TEventType) => { - // Prevent two payment apps to be enabled - // Ok to cast type here because this metadata will be updated as the event type metadata - if ( - checkForMultiplePaymentApps(value.metadata as z.infer) - ) - throw new Error(t("event_setup_multiple_payment_apps_error")); - if (value.metadata?.apps?.stripe?.paymentOption === "HOLD" && value.seatsPerTimeSlot) { - throw new Error(t("seats_and_no_show_fee_error")); + if (value.metadata) { + const metadata = eventTypeMetaDataSchemaWithTypedApps.parse(value.metadata); + // Prevent two payment apps to be enabled + // Ok to cast type here because this metadata will be updated as the event type metadata + if (checkForMultiplePaymentApps(metadata)) + throw new Error(t("event_setup_multiple_payment_apps_error")); + if ( + value.metadata?.apps?.stripe?.paymentOption === "HOLD" && + value.seatsPerTimeSlot + ) { + throw new Error(t("seats_and_no_show_fee_error")); + } } + let updateObject: TUpdateObject = { id: value.id }; if (isConferencing) { updateObject = { diff --git a/apps/web/modules/bookings/views/bookings-single-view.tsx b/apps/web/modules/bookings/views/bookings-single-view.tsx index c6e45ca79d..f1a190dbc5 100644 --- a/apps/web/modules/bookings/views/bookings-single-view.tsx +++ b/apps/web/modules/bookings/views/bookings-single-view.tsx @@ -48,7 +48,7 @@ import { getEveryFreqFor } from "@calcom/lib/recurringStrings"; import { getIs24hClockFromLocalStorage, isBrowserLocale24h } from "@calcom/lib/timeFormat"; import { localStorage } from "@calcom/lib/webstorage"; import { BookingStatus, SchedulingType } from "@calcom/prisma/enums"; -import { bookingMetadataSchema } from "@calcom/prisma/zod-utils"; +import { bookingMetadataSchema, eventTypeMetaDataSchemaWithTypedApps } from "@calcom/prisma/zod-utils"; import { trpc } from "@calcom/trpc/react"; import { Alert, @@ -61,6 +61,7 @@ import { showToast, EmptyScreen, Icon, + HeadSeo, } from "@calcom/ui"; import CancelBooking from "@calcom/web/components/booking/CancelBooking"; import EventReservationSchema from "@calcom/web/components/schemas/EventReservationSchema"; @@ -229,7 +230,13 @@ export default function Success(props: PageProps) { t, }; - const giphyAppData = getEventTypeAppData(eventType, "giphy"); + const giphyAppData = getEventTypeAppData( + { + ...eventType, + metadata: eventTypeMetaDataSchemaWithTypedApps.parse(eventType.metadata), + }, + "giphy" + ); const giphyImage = giphyAppData?.thankYouPage; const isRoundRobin = eventType.schedulingType === SchedulingType.ROUND_ROBIN; @@ -433,7 +440,10 @@ export default function Success(props: PageProps) { )} - + +
( + routingForms && routingForms.length > 0 ? routingForms[0] : undefined + ); + + if (routingForms && !selectedForm && routingForms.length > 0) { + setSelectedForm(routingForms[0]); + } + + return ( + + +