chore: App router migration - /attributes, /privacy, /dsync, /license-key under /settings route group (#16406)

* migrate license-key/new

* migrate settings/org/dsync

* migrate settings/org/privacy

* migrate org attributes

* remove res in getServerSideProps

* Fix SettingsLayoutAppDir

* fix attributes pages

* fix

* fix
This commit is contained in:
Benny Joo authored and GitHub committed 2024-09-09 17:19:12 -07:00
1 parent 706d7dff42
commit 5dff1c6df0
21 files changed
+225 -65

No files matched your search

@@ -0,0 +1,11 @@
import { _generateMetadata } from "app/_utils";
import Page from "@calcom/ee/organizations/pages/settings/attributes/attributes-edit-view";
export const generateMetadata = async () =>
await _generateMetadata(
() => "Attribute",
(t) => t("edit_attribute_description")
);
export default Page;
@@ -0,0 +1,11 @@
import { _generateMetadata } from "app/_utils";
import Page from "@calcom/ee/organizations/pages/settings/attributes/attributes-create-view";
export const generateMetadata = async () =>
await _generateMetadata(
() => "Attribute",
() => "Create an attribute for your team members"
);
export default Page;
@@ -0,0 +1,11 @@
import { _generateMetadata } from "app/_utils";
import Page from "@calcom/ee/organizations/pages/settings/attributes/attributes-list-view";
export const generateMetadata = async () =>
await _generateMetadata(
(t) => t("attributes"),
(t) => t("attribute_meta_description")
);
export default Page;
@@ -0,0 +1,25 @@
import { _generateMetadata, getFixedT } from "app/_utils";
import { getServerSession } from "next-auth";
import { AUTH_OPTIONS } from "@calcom/features/auth/lib/next-auth-options";
import DirectorySyncTeamView from "@calcom/features/ee/dsync/page/team-dsync-view";
import SettingsHeader from "@calcom/features/settings/appDir/SettingsHeader";
export const generateMetadata = async () =>
await _generateMetadata(
(t) => t("directory_sync"),
(t) => t("directory_sync_description")
);
const Page = async () => {
const session = await getServerSession(AUTH_OPTIONS);
const t = await getFixedT(session?.user.locale || "en");
return (
<SettingsHeader title={t("directory_sync")} description={t("directory_sync_description")}>
<DirectorySyncTeamView />
</SettingsHeader>
);
};
export default Page;
@@ -0,0 +1,25 @@
import { _generateMetadata, getFixedT } from "app/_utils";
import { getServerSession } from "next-auth";
import { AUTH_OPTIONS } from "@calcom/features/auth/lib/next-auth-options";
import PrivacyView from "@calcom/features/ee/organizations/pages/settings/privacy";
import SettingsHeader from "@calcom/features/settings/appDir/SettingsHeader";
export const generateMetadata = async () =>
await _generateMetadata(
(t) => t("privacy"),
(t) => t("privacy_organization_description")
);
const Page = async () => {
const session = await getServerSession(AUTH_OPTIONS);
const t = await getFixedT(session?.user.locale || "en");
return (
<SettingsHeader title={t("privacy")} description={t("privacy_organization_description")}>
<PrivacyView />
</SettingsHeader>
);
};
export default Page;
@@ -0,0 +1,21 @@
import { withAppDirSsr } from "app/WithAppDirSsr";
import { _generateMetadata } from "app/_utils";
import { WithLayout } from "app/layoutHOC";
import type { inferSSRProps } from "@calcom/types/inferSSRProps";
import { getServerSideProps } from "@lib/settings/license-key/new/getServerSideProps";
import CreateANewLicenseKeyForm, { LayoutWrapper } from "~/settings/license-key/new/new-view";
export const generateMetadata = async () =>
await _generateMetadata(
(t) => t("set_up_your_organization"),
(t) => t("organizations_description")
);
export default WithLayout({
Page: CreateANewLicenseKeyForm,
getLayout: LayoutWrapper,
getData: withAppDirSsr<inferSSRProps<typeof getServerSideProps>>(getServerSideProps),
});