diff --git a/apps/web/components/booking/pages/AvailabilityPage.tsx b/apps/web/components/booking/pages/AvailabilityPage.tsx index d4d1dca257..3d1bcd814a 100644 --- a/apps/web/components/booking/pages/AvailabilityPage.tsx +++ b/apps/web/components/booking/pages/AvailabilityPage.tsx @@ -52,6 +52,9 @@ export const locationKeyToString = (location: LocationObject, t: TFunction) => { case LocationType.InPerson: return location.address || "In Person"; // If disabled address won't exist on the object case LocationType.Link: + case LocationType.Ping: + case LocationType.Riverside: + case LocationType.Whereby: return location.link || "Link"; // If disabled link won't exist on the object case LocationType.Phone: return t("your_number"); diff --git a/apps/web/components/booking/pages/BookingPage.tsx b/apps/web/components/booking/pages/BookingPage.tsx index 438f0b3ccf..b45083bed8 100644 --- a/apps/web/components/booking/pages/BookingPage.tsx +++ b/apps/web/components/booking/pages/BookingPage.tsx @@ -334,6 +334,9 @@ const BookingPage = ({ case LocationType.Whereby: { return locationInfo(locationType)?.link || ""; } + case LocationType.Ping: { + return locationInfo(locationType)?.link || ""; + } // Catches all other location types, such as Google Meet, Zoom etc. default: return selectedLocation || ""; diff --git a/apps/web/components/dialog/EditLocationDialog.tsx b/apps/web/components/dialog/EditLocationDialog.tsx index 98a82fb7fa..f86b41f15d 100644 --- a/apps/web/components/dialog/EditLocationDialog.tsx +++ b/apps/web/components/dialog/EditLocationDialog.tsx @@ -85,6 +85,11 @@ export const EditLocationDialog = (props: ISetLocationDialog) => { .string() .regex(/^http(s)?:\/\/(www\.)?around.co\/[a-zA-Z0-9]*/) .optional() + : selection?.value === LocationType.Ping + ? z + .string() + .regex(/^http(s)?:\/\/(www\.)?ping.gg\/call\/[a-zA-Z0-9]*/) + .optional() : selection?.value === LocationType.Riverside ? z .string() @@ -324,6 +329,54 @@ export const EditLocationDialog = (props: ISetLocationDialog) => { )} + ) : selectedLocation === LocationType.Ping ? ( + <> +
+ +
+ location.type === LocationType.Ping + )?.address + : undefined + } + /> +
+ {!booking && ( +
+ ( + location.type === LocationType.Ping) + ?.displayLocationPublicly + : undefined + } + description={t("display_location_label")} + onChange={(e) => + locationFormMethods.setValue("displayLocationPublicly", e.target.checked) + } + informationIconText={t("display_location_info_badge")} + /> + )} + /> +
+ )} +
+ ) : selectedLocation === LocationType.Riverside ? ( <>
@@ -416,7 +469,8 @@ export const EditLocationDialog = (props: ISetLocationDialog) => { newLocation === LocationType.Link || newLocation === LocationType.Whereby || newLocation === LocationType.Around || - newLocation === LocationType.Riverside + newLocation === LocationType.Riverside || + newLocation === LocationType.Ping ) { details = { link: values.locationLink, displayLocationPublicly }; } diff --git a/apps/web/pages/event-types/[type].tsx b/apps/web/pages/event-types/[type].tsx index 008a3c4940..adee1ee3be 100644 --- a/apps/web/pages/event-types/[type].tsx +++ b/apps/web/pages/event-types/[type].tsx @@ -474,7 +474,8 @@ const EventTypePage = (props: inferSSRProps) => { newLocationType === LocationType.UserPhone || newLocationType === LocationType.Whereby || newLocationType === LocationType.Around || - newLocationType === LocationType.Riverside + newLocationType === LocationType.Riverside || + newLocationType === LocationType.Ping ) { openLocationModal(newLocationType); } else { @@ -485,6 +486,8 @@ const EventTypePage = (props: inferSSRProps) => { />
)} + + {/* TODO: all of this should be generated from the App Store */} {formMethods.getValues("locations").length > 0 && (