diff --git a/apps/web/playwright/availability.e2e.ts b/apps/web/playwright/availability.e2e.ts index 4bebb0f0d81d92..9610dbf12573e3 100644 --- a/apps/web/playwright/availability.e2e.ts +++ b/apps/web/playwright/availability.e2e.ts @@ -28,6 +28,7 @@ test.describe("Availablity tests", () => { await page.locator('[data-testid="day"][data-disabled="false"]').nth(0).click(); await page.locator('[data-testid="date-override-mark-unavailable"]').click(); await page.locator('[data-testid="add-override-submit-btn"]').click(); + await page.locator('[data-testid="add-override-close-btn"]').click(); await expect(page.locator('[data-testid="date-overrides-list"] > li')).toHaveCount(1); await page.locator('[form="availability-form"][type="submit"]').click(); }); diff --git a/packages/features/schedules/components/DateOverrideInputDialog.tsx b/packages/features/schedules/components/DateOverrideInputDialog.tsx index 9695398b4b67f4..bc6841bf45fc1b 100644 --- a/packages/features/schedules/components/DateOverrideInputDialog.tsx +++ b/packages/features/schedules/components/DateOverrideInputDialog.tsx @@ -1,12 +1,13 @@ import { useState, useEffect, useMemo } from "react"; import { useForm } from "react-hook-form"; -import dayjs, { Dayjs } from "@calcom/dayjs"; +import type { Dayjs } from "@calcom/dayjs"; +import dayjs from "@calcom/dayjs"; import { classNames } from "@calcom/lib"; import { daysInMonth, yyyymmdd } from "@calcom/lib/date-fns"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import useMediaQuery from "@calcom/lib/hooks/useMediaQuery"; -import { WorkingHours } from "@calcom/types/schedule"; +import type { WorkingHours } from "@calcom/types/schedule"; import { Dialog, DialogContent, @@ -19,7 +20,8 @@ import { } from "@calcom/ui"; import DatePicker from "../../calendars/DatePicker"; -import { DayRanges, TimeRange } from "./Schedule"; +import type { TimeRange } from "./Schedule"; +import { DayRanges } from "./Schedule"; const ALL_DAY_RANGE = { start: new Date(dayjs.utc().hour(0).minute(0).second(0).format()), @@ -113,7 +115,6 @@ const DateOverrideForm = ({ end: date.hour(item.end.getHours()).minute(item.end.getMinutes()).toDate(), })) ); - onClose(); }} className="space-y-4 sm:flex sm:space-x-4">