feat: Internal Notes for bookings (#18804)

* migration + migrate booking limit page to team settings

* new pages

* use settings toggle for displaying content

* get current team presets

* update mutation

* i18n for settings page

* remove redudant await

* cancelation UI for select

* handle other selection

* extract into a util

* inital cancelation reason flow

* fix i18n to be more readable

* add cancel reason logic

* nits

* improve copy

* ensure is teamMember and not isAdmin for getting internalNotes

* improvie spacing between elements

* fix types

* more type fixes

* correct types

* Update packages/features/bookings/lib/handleNewBooking/getEventTypesFromDB.ts

* use input component and remove mb-2 to allign with icon button

* Update packages/trpc/server/routers/viewer/teams/updateInternalNotesPresets.handler.ts

Co-authored-by: Eunjae Lee <[email protected]>

* nits

* type fixs

* fix type

* fix type

* fix nullable option lost in merge

---------

Co-authored-by: Eunjae Lee <[email protected]>
This commit is contained in:
sean-brydonandEunjae Lee authored and GitHub committed 2025-01-24 09:26:52 +00:00
1 parent 1fd4c3fd4c
commit 656d6dc195
22 files changed
+683 -22

No files matched your search

@@ -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";
@@ -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";
@@ -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";
@@ -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 (
<SettingsHeader
title={t("booking_limits")}
description={t("booking_limits_team_description")}
title={t("settings")}
description={t("team_settings_description")}
borderInShellHeader={false}>
<TeamBookingLimitsView />
<TeamSettingsView />
</SettingsHeader>
);
};