diff --git a/apps/web/app/(use-page-wrapper)/apps/page.tsx b/apps/web/app/(use-page-wrapper)/apps/page.tsx
index 5a5a74cdee..0117c797c9 100644
--- a/apps/web/app/(use-page-wrapper)/apps/page.tsx
+++ b/apps/web/app/(use-page-wrapper)/apps/page.tsx
@@ -1,5 +1,5 @@
import { withAppDirSsr } from "app/WithAppDirSsr";
-import { PageProps } from "app/_types";
+import type { PageProps } from "app/_types";
import { _generateMetadata } from "app/_utils";
import { cookies, headers } from "next/headers";
diff --git a/apps/web/app/(use-page-wrapper)/signup/page.tsx b/apps/web/app/(use-page-wrapper)/signup/page.tsx
index 64005a84f8..afbb38cc80 100644
--- a/apps/web/app/(use-page-wrapper)/signup/page.tsx
+++ b/apps/web/app/(use-page-wrapper)/signup/page.tsx
@@ -1,7 +1,6 @@
import { withAppDirSsr } from "app/WithAppDirSsr";
-import { PageProps } from "app/_types";
+import type { PageProps } from "app/_types";
import { _generateMetadata } from "app/_utils";
-import { WithLayout } from "app/layoutHOC";
import { cookies, headers } from "next/headers";
import { buildLegacyCtx } from "@lib/buildLegacyCtx";
diff --git a/apps/web/app/(use-page-wrapper)/video/meeting-ended/[uid]/page.tsx b/apps/web/app/(use-page-wrapper)/video/meeting-ended/[uid]/page.tsx
index 106a64803d..89d44c95ff 100644
--- a/apps/web/app/(use-page-wrapper)/video/meeting-ended/[uid]/page.tsx
+++ b/apps/web/app/(use-page-wrapper)/video/meeting-ended/[uid]/page.tsx
@@ -1,5 +1,5 @@
import { withAppDirSsr } from "app/WithAppDirSsr";
-import { PageProps as ServerPageProps } from "app/_types";
+import type { PageProps as ServerPageProps } from "app/_types";
import { _generateMetadata } from "app/_utils";
import { cookies, headers } from "next/headers";
diff --git a/apps/web/app/settings/(settings-layout)/teams/[id]/bookingLimits/page.tsx b/apps/web/app/settings/(settings-layout)/teams/[id]/settings/page.tsx
similarity index 57%
rename from apps/web/app/settings/(settings-layout)/teams/[id]/bookingLimits/page.tsx
rename to apps/web/app/settings/(settings-layout)/teams/[id]/settings/page.tsx
index a79b3db1d0..1582b116b7 100644
--- a/apps/web/app/settings/(settings-layout)/teams/[id]/bookingLimits/page.tsx
+++ b/apps/web/app/settings/(settings-layout)/teams/[id]/settings/page.tsx
@@ -1,23 +1,22 @@
import { _generateMetadata, getTranslate } from "app/_utils";
-import TeamBookingLimitsView from "@calcom/features/ee/teams/pages/team-booking-limits-view";
+import TeamSettingsView from "@calcom/features/ee/teams/pages/team-settings-view";
import SettingsHeader from "@calcom/features/settings/appDir/SettingsHeader";
export const generateMetadata = async () =>
await _generateMetadata(
- (t) => t("booking_limits"),
- (t) => t("booking_limits_team_description")
+ (t) => t("settings"),
+ (t) => t("team_settings_description")
);
const Page = async () => {
const t = await getTranslate();
-
return (
-
+
);
};
diff --git a/apps/web/components/booking/CancelBooking.tsx b/apps/web/components/booking/CancelBooking.tsx
index 7c3021a3a9..63e57532d0 100644
--- a/apps/web/components/booking/CancelBooking.tsx
+++ b/apps/web/components/booking/CancelBooking.tsx
@@ -5,7 +5,63 @@ import { useLocale } from "@calcom/lib/hooks/useLocale";
import { useRefreshData } from "@calcom/lib/hooks/useRefreshData";
import { collectPageParameters, telemetryEventTypes, useTelemetry } from "@calcom/lib/telemetry";
import type { RecurringEvent } from "@calcom/types/Calendar";
-import { Button, Icon, Label, TextArea } from "@calcom/ui";
+import { Button, Icon, Label, TextArea, Select } from "@calcom/ui";
+
+interface InternalNotePresetsSelectProps {
+ internalNotePresets: { id: number; name: string }[];
+ onPresetSelect: (
+ option: {
+ value: number | string;
+ label: string;
+ } | null
+ ) => void;
+}
+
+const InternalNotePresetsSelect = ({
+ internalNotePresets,
+ onPresetSelect,
+}: InternalNotePresetsSelectProps) => {
+ const { t } = useLocale();
+ const [showOtherInput, setShowOtherInput] = useState(false);
+
+ if (!internalNotePresets?.length) {
+ return null;
+ }
+
+ const handleSelectChange = (option: { value: number | string; label: string } | null) => {
+ if (option?.value === "other") {
+ setShowOtherInput(true);
+ } else {
+ setShowOtherInput(false);
+ onPresetSelect && onPresetSelect(option);
+ }
+ };
+
+ return (
+
+
+
+ );
+};
type Props = {
booking: {
@@ -19,6 +75,7 @@ type Props = {
};
recurringEvent: RecurringEvent | null;
team?: string | null;
+ teamId?: number;
setIsCancellationMode: (value: boolean) => void;
theme: string | null;
allRemainingBookings: boolean;
@@ -34,17 +91,25 @@ type Props = {
eventType: unknown;
};
isHost: boolean;
+ internalNotePresets: { id: number; name: string; cancellationReason: string | null }[];
};
export default function CancelBooking(props: Props) {
const [cancellationReason, setCancellationReason] = useState("");
const { t } = useLocale();
const refreshData = useRefreshData();
- const { booking, allRemainingBookings, seatReferenceUid, bookingCancelledEventProps, currentUserEmail } =
- props;
+ const {
+ booking,
+ allRemainingBookings,
+ seatReferenceUid,
+ bookingCancelledEventProps,
+ currentUserEmail,
+ teamId,
+ } = props;
const [loading, setLoading] = useState(false);
const telemetry = useTelemetry();
const [error, setError] = useState(booking ? null : t("booking_already_cancelled"));
+ const [internalNote, setInternalNote] = useState<{ id: number; name: string } | null>(null);
const cancelBookingRef = useCallback((node: HTMLTextAreaElement) => {
if (node !== null) {
@@ -71,7 +136,31 @@ export default function CancelBooking(props: Props) {
)}
{!error && (
+ {props.isHost && teamId && (
+ <>
+
{
+ if (!option) return;
+
+ if (option.value === "other") {
+ setInternalNote({ id: -1, name: option.label });
+ } else {
+ const foundInternalNote = props.internalNotePresets.find(
+ (preset) => preset.id === Number(option.value)
+ );
+ if (foundInternalNote) {
+ setInternalNote(foundInternalNote);
+ setCancellationReason(foundInternalNote.cancellationReason || "");
+ }
+ }
+ }}
+ />
+ >
+ )}
+
+