chore: removed old booker feature flag (#13040)
Co-authored-by: Omar López <zomars@me.com>
This commit is contained in:
parent
ef7f0e2259
commit
3c6fdfe724
|
@ -16,7 +16,6 @@ import { useBookerStore, useInitializeBookerStore } from "@calcom/features/booki
|
|||
import { useEvent, useScheduleForEvent } from "@calcom/features/bookings/Booker/utils/event";
|
||||
import { useTimePreferences } from "@calcom/features/bookings/lib/timePreferences";
|
||||
import DatePicker from "@calcom/features/calendars/DatePicker";
|
||||
import { useFlagMap } from "@calcom/features/flags/context/provider";
|
||||
import { useNonEmptyScheduleDays } from "@calcom/features/schedules";
|
||||
import { useSlotsForDate } from "@calcom/features/schedules/lib/use-schedule/useSlotsForDate";
|
||||
import { APP_NAME, CAL_URL } from "@calcom/lib/constants";
|
||||
|
@ -515,8 +514,6 @@ const EmbedTypeCodeAndPreviewDialogContent = ({
|
|||
const { goto, removeQueryParams } = useRouterHelpers();
|
||||
const iframeRef = useRef<HTMLIFrameElement>(null);
|
||||
const dialogContentRef = useRef<HTMLDivElement>(null);
|
||||
const flags = useFlagMap();
|
||||
const isBookerLayoutsEnabled = flags["booker-layouts"] === true;
|
||||
const emailContentRef = useRef<HTMLDivElement>(null);
|
||||
const { data } = useSession();
|
||||
const [month, selectedDatesAndTimes] = useBookerStore(
|
||||
|
@ -957,34 +954,32 @@ const EmbedTypeCodeAndPreviewDialogContent = ({
|
|||
</div>
|
||||
</Label>
|
||||
))}
|
||||
{isBookerLayoutsEnabled && (
|
||||
<Label className="mb-6">
|
||||
<div className="mb-2">{t("layout")}</div>
|
||||
<Select
|
||||
className="w-full"
|
||||
defaultValue={layoutOptions[0]}
|
||||
onChange={(option) => {
|
||||
if (!option) {
|
||||
return;
|
||||
}
|
||||
setPreviewState((previewState) => {
|
||||
const config = {
|
||||
...(previewState.floatingPopup.config ?? {}),
|
||||
layout: option.value,
|
||||
};
|
||||
return {
|
||||
...previewState,
|
||||
floatingPopup: {
|
||||
config,
|
||||
},
|
||||
layout: option.value,
|
||||
};
|
||||
});
|
||||
}}
|
||||
options={layoutOptions}
|
||||
/>
|
||||
</Label>
|
||||
)}
|
||||
<Label className="mb-6">
|
||||
<div className="mb-2">{t("layout")}</div>
|
||||
<Select
|
||||
className="w-full"
|
||||
defaultValue={layoutOptions[0]}
|
||||
onChange={(option) => {
|
||||
if (!option) {
|
||||
return;
|
||||
}
|
||||
setPreviewState((previewState) => {
|
||||
const config = {
|
||||
...(previewState.floatingPopup.config ?? {}),
|
||||
layout: option.value,
|
||||
};
|
||||
return {
|
||||
...previewState,
|
||||
floatingPopup: {
|
||||
config,
|
||||
},
|
||||
layout: option.value,
|
||||
};
|
||||
});
|
||||
}}
|
||||
options={layoutOptions}
|
||||
/>
|
||||
</Label>
|
||||
</div>
|
||||
</CollapsibleContent>
|
||||
</Collapsible>
|
||||
|
|
|
@ -12,7 +12,6 @@ export type AppFlags = {
|
|||
"managed-event-types": boolean;
|
||||
organizations: boolean;
|
||||
"email-verification": boolean;
|
||||
"booker-layouts": boolean;
|
||||
"google-workspace-directory": boolean;
|
||||
"disable-signup": boolean;
|
||||
};
|
||||
|
|
|
@ -4,7 +4,6 @@ import Link from "next/link";
|
|||
import { useCallback, useState } from "react";
|
||||
import { Controller, useFormContext } from "react-hook-form";
|
||||
|
||||
import { useFlagMap } from "@calcom/features/flags/context/provider";
|
||||
import { classNames } from "@calcom/lib";
|
||||
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
||||
import { BookerLayouts, defaultBookerLayoutSettings } from "@calcom/prisma/zod-utils";
|
||||
|
@ -53,9 +52,6 @@ export const BookerLayoutSelector = ({
|
|||
// Only fallback if event current does not have any settings, and the fallbackToUserSettings boolean is set.
|
||||
const shouldShowUserSettings = (fallbackToUserSettings && !getValues(name || defaultFieldName)) || false;
|
||||
|
||||
const flags = useFlagMap();
|
||||
if (flags["booker-layouts"] !== true) return null;
|
||||
|
||||
return (
|
||||
<div className={classNames(isOuterBorder && "border-subtle rounded-lg border p-6")}>
|
||||
<div className={classNames(isOuterBorder ? "pb-5" : "border-subtle rounded-t-xl border p-6")}>
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
-- Removes the feature flag for the new booker layouts which is no longer needed
|
||||
DELETE FROM "Feature"
|
||||
WHERE
|
||||
slug = 'booker-layouts';
|
Loading…
Reference in New Issue
Block a user