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:
1 parent
706d7dff42
commit
5dff1c6df0
21 files changed
+225
-65
No files matched your search
@@ -1,13 +1,14 @@
|
||||
"use client";
|
||||
|
||||
import { CreateANewLicenseKeyForm } from "@calcom/features/ee/deployment/licensekey/CreateLicenseKeyForm";
|
||||
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
||||
import { WizardLayout, Meta } from "@calcom/ui";
|
||||
import { Meta } from "@calcom/ui";
|
||||
|
||||
import { getServerSideProps } from "@lib/settings/license-keys/new/getServerSideProps";
|
||||
import { getServerSideProps } from "@lib/settings/license-key/new/getServerSideProps";
|
||||
|
||||
import PageWrapper from "@components/PageWrapper";
|
||||
|
||||
import CreateANewLicenseKeyForm, { LayoutWrapper } from "~/settings/license-key/new/new-view";
|
||||
|
||||
const CreateNewLicenseKeyPage = () => {
|
||||
const { t } = useLocale();
|
||||
return (
|
||||
@@ -17,13 +18,6 @@ const CreateNewLicenseKeyPage = () => {
|
||||
</>
|
||||
);
|
||||
};
|
||||
const LayoutWrapper = (page: React.ReactElement) => {
|
||||
return (
|
||||
<WizardLayout currentStep={1} maxSteps={2}>
|
||||
{page}
|
||||
</WizardLayout>
|
||||
);
|
||||
};
|
||||
|
||||
CreateNewLicenseKeyPage.getLayout = LayoutWrapper;
|
||||
CreateNewLicenseKeyPage.PageWrapper = PageWrapper;
|
||||
|
||||
@@ -1,9 +1,24 @@
|
||||
import OrgAttributesEditPage from "@calcom/ee/organizations/pages/settings/attributes/attributes-edit-view";
|
||||
"use client";
|
||||
|
||||
import OrgAttributesEditPage, {
|
||||
getLayout,
|
||||
} from "@calcom/ee/organizations/pages/settings/attributes/attributes-edit-view";
|
||||
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
||||
import { Meta } from "@calcom/ui";
|
||||
|
||||
import type { CalPageWrapper } from "@components/PageWrapper";
|
||||
import PageWrapper from "@components/PageWrapper";
|
||||
|
||||
const Page = OrgAttributesEditPage as CalPageWrapper;
|
||||
const Page = () => {
|
||||
const { t } = useLocale();
|
||||
return (
|
||||
<>
|
||||
<Meta title="Attribute" description={t("edit_attribute_description")} />
|
||||
<OrgAttributesEditPage />
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
Page.getLayout = getLayout;
|
||||
Page.PageWrapper = PageWrapper;
|
||||
|
||||
export default Page;
|
||||
@@ -1,9 +1,20 @@
|
||||
import OrgAttributesCreatePage from "@calcom/ee/organizations/pages/settings/attributes/attributes-create-view";
|
||||
import OrgAttributesCreatePage, {
|
||||
getLayout,
|
||||
} from "@calcom/ee/organizations/pages/settings/attributes/attributes-create-view";
|
||||
import { Meta } from "@calcom/ui";
|
||||
|
||||
import type { CalPageWrapper } from "@components/PageWrapper";
|
||||
import PageWrapper from "@components/PageWrapper";
|
||||
|
||||
const Page = OrgAttributesCreatePage as CalPageWrapper;
|
||||
const Page = () => {
|
||||
return (
|
||||
<>
|
||||
<Meta title="Attribute" description="Create an attribute for your team members" />
|
||||
<OrgAttributesCreatePage />
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
Page.getLayout = getLayout;
|
||||
Page.PageWrapper = PageWrapper;
|
||||
|
||||
export default Page;
|
||||
@@ -1,9 +1,21 @@
|
||||
import OrgSettingsAttributesPage from "@calcom/ee/organizations/pages/settings/attributes/attributes-list-view";
|
||||
import OrgSettingsAttributesPage, {
|
||||
getLayout,
|
||||
} from "@calcom/ee/organizations/pages/settings/attributes/attributes-list-view";
|
||||
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
||||
import { Meta } from "@calcom/ui";
|
||||
|
||||
import type { CalPageWrapper } from "@components/PageWrapper";
|
||||
import PageWrapper from "@components/PageWrapper";
|
||||
|
||||
const Page = OrgSettingsAttributesPage as CalPageWrapper;
|
||||
const Page = () => {
|
||||
const { t } = useLocale();
|
||||
return (
|
||||
<>
|
||||
<Meta title={t("attributes")} description={t("attribute_meta_description")} />
|
||||
<OrgSettingsAttributesPage />
|
||||
</>
|
||||
);
|
||||
};
|
||||
Page.getLayout = getLayout;
|
||||
Page.PageWrapper = PageWrapper;
|
||||
|
||||
export default Page;
|
||||
@@ -1,9 +1,22 @@
|
||||
"use client";
|
||||
|
||||
import DirectorySyncTeamView from "@calcom/features/ee/dsync/page/team-dsync-view";
|
||||
import { getLayout } from "@calcom/features/settings/layouts/SettingsLayout";
|
||||
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
||||
import { Meta } from "@calcom/ui";
|
||||
|
||||
import type { CalPageWrapper } from "@components/PageWrapper";
|
||||
import PageWrapper from "@components/PageWrapper";
|
||||
|
||||
const Page = DirectorySyncTeamView as CalPageWrapper;
|
||||
const Page = () => {
|
||||
const { t } = useLocale();
|
||||
return (
|
||||
<>
|
||||
<Meta title={t("directory_sync")} description={t("directory_sync_description")} />
|
||||
<DirectorySyncTeamView />
|
||||
</>
|
||||
);
|
||||
};
|
||||
Page.getLayout = getLayout;
|
||||
Page.PageWrapper = PageWrapper;
|
||||
|
||||
export default Page;
|
||||
@@ -1,9 +1,27 @@
|
||||
"use client";
|
||||
|
||||
import PrivacyView from "@calcom/features/ee/organizations/pages/settings/privacy";
|
||||
import { getLayout } from "@calcom/features/settings/layouts/SettingsLayout";
|
||||
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
||||
import { Meta } from "@calcom/ui";
|
||||
|
||||
import type { CalPageWrapper } from "@components/PageWrapper";
|
||||
import PageWrapper from "@components/PageWrapper";
|
||||
|
||||
const Page = PrivacyView as CalPageWrapper;
|
||||
const Page = () => {
|
||||
const { t } = useLocale();
|
||||
return (
|
||||
<>
|
||||
<Meta
|
||||
borderInShellHeader={false}
|
||||
title={t("privacy")}
|
||||
description={t("privacy_organization_description")}
|
||||
/>
|
||||
<PrivacyView />
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
Page.getLayout = getLayout;
|
||||
Page.PageWrapper = PageWrapper;
|
||||
|
||||
export default Page;
|
||||
Reference in new issue
Block a user