From 9ffa4b84772ffe2b75e067c811da09b1f35b97df Mon Sep 17 00:00:00 2001 From: Anik Dhabal Babu <81948346+anikdhabal@users.noreply.github.com> Date: Thu, 1 Aug 2024 00:35:20 +0530 Subject: [PATCH] fix: meeting link is not updated and broken ui in edit location dialog (#15503) * fix: meeting link is not updated * fix: broken ui in edit location dialog * Update editLocation.handler.ts --------- Co-authored-by: Keith Williams --- apps/web/components/dialog/EditLocationDialog.tsx | 2 +- apps/web/playwright/manage-booking-questions.e2e.ts | 4 ++++ .../server/routers/viewer/bookings/editLocation.handler.ts | 6 ++++++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/apps/web/components/dialog/EditLocationDialog.tsx b/apps/web/components/dialog/EditLocationDialog.tsx index 1c52f5d018..989bd71ac7 100644 --- a/apps/web/components/dialog/EditLocationDialog.tsx +++ b/apps/web/components/dialog/EditLocationDialog.tsx @@ -261,7 +261,7 @@ export const EditLocationDialog = (props: ISetLocationDialog) => { {booking && ( <>

{t("current_location")}:

-

+

{getHumanReadableLocationValue(booking.location, t)}

diff --git a/apps/web/playwright/manage-booking-questions.e2e.ts b/apps/web/playwright/manage-booking-questions.e2e.ts index 12e3a624e9..99bdf898ca 100644 --- a/apps/web/playwright/manage-booking-questions.e2e.ts +++ b/apps/web/playwright/manage-booking-questions.e2e.ts @@ -832,6 +832,8 @@ test.describe("Text area min and max characters text", () => { // wait until the button with data-testid="time" is visible await page.locator('[data-testid="time"]').isVisible(); + await page.getByTestId("incrementMonth").click(); + // Get first button with data-testid="time" const timeButton = page.locator('[data-testid="time"]').first(); await timeButton.click(); @@ -845,6 +847,8 @@ test.describe("Text area min and max characters text", () => { // Get button with data-testid="confirm-book-button" const submitForm = async () => await page.locator('[data-testid="confirm-book-button"]').click(); + await page.fill('[name="name"]', "Booker"); + await page.fill('[name="email"]', "booker@example.com"); await textAreaWithoutMinMax.fill("1234567890"); await textAreaWithMin5.fill("1234"); await textAreaWithMax10.fill("12345678901"); diff --git a/packages/trpc/server/routers/viewer/bookings/editLocation.handler.ts b/packages/trpc/server/routers/viewer/bookings/editLocation.handler.ts index 636f49a35f..b7684b7f20 100644 --- a/packages/trpc/server/routers/viewer/bookings/editLocation.handler.ts +++ b/packages/trpc/server/routers/viewer/bookings/editLocation.handler.ts @@ -118,6 +118,12 @@ export const editLocationHandler = async ({ ctx, input }: EditLocationOptions) = }, data: { location, + metadata: location.startsWith("http") + ? { + ...(typeof booking.metadata === "object" ? booking.metadata : {}), + videoCallUrl: location, + } + : {}, references: { create: updatedResult.referencesToCreate, },