Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: settings/teams and settings/billing - remove pages router and use app router #16751

Merged
merged 24 commits into from
Dec 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
443537a
remove pages router and use app router
hbjORbj Sep 20, 2024
513cebc
revert yarn.lock
hbjORbj Sep 23, 2024
1e4421b
Merge branch 'main' into chore/remove-pages-router-settings-teams
hbjORbj Sep 23, 2024
7744657
remove line break from yarn lock
hbjORbj Sep 23, 2024
41a4103
Merge branch 'main' into chore/remove-pages-router-settings-teams
hbjORbj Sep 23, 2024
36d74f2
Add booking limits page to app dir
hbjORbj Sep 23, 2024
26fea01
revert yarn.lock
hbjORbj Sep 24, 2024
b88bdea
do not render bookingLimits from pages router
hbjORbj Sep 24, 2024
a2225d3
Merge remote-tracking branch 'origin/main' into chore/remove-pages-ro…
hbjORbj Sep 24, 2024
ababdb4
Merge branch 'main' into chore/remove-pages-router-settings-teams
hbjORbj Oct 6, 2024
35cbb1d
Merge branch 'main' into chore/remove-pages-router-settings-teams
hbjORbj Oct 21, 2024
3875ba1
Merge remote-tracking branch 'origin/main'
hbjORbj Nov 26, 2024
892cf25
clean up code
hbjORbj Nov 26, 2024
a3a9734
remove isAppDir
hbjORbj Nov 26, 2024
80eaae9
Merge remote-tracking branch 'origin/main' into chore/remove-pages-ro…
hbjORbj Dec 2, 2024
0a6426b
revert unneeded change
hbjORbj Dec 2, 2024
ced226f
Merge branch 'main' into chore/remove-pages-router-settings-teams
hbjORbj Dec 2, 2024
f39231e
Merge branch 'main' into chore/remove-pages-router-settings-teams
hbjORbj Dec 3, 2024
bd09a43
add layout to billing page
hbjORbj Dec 4, 2024
1b9e748
remove files not needed
hbjORbj Dec 4, 2024
c48717c
rename imports
hbjORbj Dec 4, 2024
fc2165f
remove APP_ROUTER_SETTINGS_DEVELOPER
hbjORbj Dec 4, 2024
d52e6b1
Merge branch 'main' into chore/remove-pages-router-settings-teams
hbjORbj Dec 4, 2024
593d2bf
remove layout
hbjORbj Dec 4, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,6 @@ APP_ROUTER_APPS_CATEGORIES_CATEGORY_ENABLED=0
APP_ROUTER_BOOKING_ENABLED=0
APP_ROUTER_BOOKINGS_STATUS_ENABLED=0
APP_ROUTER_WORKFLOWS_ENABLED=0
APP_ROUTER_SETTINGS_TEAMS_ENABLED=0
APP_ROUTER_GETTING_STARTED_STEP_ENABLED=0
APP_ROUTER_APPS_ENABLED=0
APP_ROUTER_VIDEO_ENABLED=0
Expand Down
1 change: 0 additions & 1 deletion apps/web/abTest/middlewareFactory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ const ROUTES: [URLPattern, boolean][] = [
["/auth/platform/:path*", process.env.APP_ROUTER_AUTH_PLATFORM_ENABLED === "1"] as const,
["/auth/oauth2/:path*", process.env.APP_ROUTER_AUTH_OAUTH2_ENABLED === "1"] as const,
["/workflows/:path*", process.env.APP_ROUTER_WORKFLOWS_ENABLED === "1"] as const,
["/settings/teams/:path*", process.env.APP_ROUTER_SETTINGS_TEAMS_ENABLED === "1"] as const,
["/getting-started/:step", process.env.APP_ROUTER_GETTING_STARTED_STEP_ENABLED === "1"] as const,
["/apps", process.env.APP_ROUTER_APPS_ENABLED === "1"] as const,
["/bookings/:status", process.env.APP_ROUTER_BOOKINGS_STATUS_ENABLED === "1"] as const,
Expand Down
5 changes: 0 additions & 5 deletions apps/web/app/future/settings/(settings)/layout.tsx

This file was deleted.

This file was deleted.

21 changes: 0 additions & 21 deletions apps/web/app/future/settings/platform/new/page.tsx

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

16 changes: 0 additions & 16 deletions apps/web/app/future/settings/platform/page.tsx

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@ export const generateMetadata = async () =>
);

const Page = async () => {
// FIXME: Refactor me once next-auth endpoint is migrated to App Router
const session = await getServerSessionForAppDir();

const t = await getFixedT(session?.user.locale || "en");

return (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import BillingPage, { generateMetadata } from "app/future/settings/(settings)/billing/page";
import BillingPage, { generateMetadata } from "app/settings/(settings-layout)/billing/page";

export { generateMetadata };

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const Page = async () => {
title={t("booking_appearance")}
description={t("appearance_team_description")}
borderInShellHeader={false}>
<LegacyPage isAppDir={true} />
<LegacyPage />
</SettingsHeader>
);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const Page = async () => {
title={t("booking_appearance")}
description={t("appearance_team_description")}
borderInShellHeader={false}>
<LegacyPage isAppDir={true} />
<LegacyPage />
</SettingsHeader>
);
};
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import BillingPage, { generateMetadata } from "app/settings/(settings-layout)/billing/page";

export { generateMetadata };
export default BillingPage;
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import { _generateMetadata, getFixedT } from "app/_utils";

import { getServerSessionForAppDir } from "@calcom/features/auth/lib/get-server-session-for-app-dir";
import TeamBookingLimitsView from "@calcom/features/ee/teams/pages/team-booking-limits-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")
);

const Page = async () => {
const session = await getServerSessionForAppDir();
const t = await getFixedT(session?.user.locale || "en");

return (
<SettingsHeader
title={t("booking_limits")}
description={t("booking_limits_team_description")}
borderInShellHeader={false}>
<TeamBookingLimitsView />
</SettingsHeader>
);
};

export default Page;
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const Page = async () => {

return (
<SettingsHeader title={t("team_members")} description={t("members_team_description")}>
<LegacyPage isAppDir={true} />
<LegacyPage />
</SettingsHeader>
);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const Page = async () => {
title={t("profile")}
description={t("profile_team_description")}
borderInShellHeader={true}>
<LegacyPage isAppDir={true} />
<LegacyPage />
</SettingsHeader>
);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const Page = async () => {

return (
<SettingsHeader title={t("teams")} description={t("create_manage_teams_collaborative")}>
<LegacyPage isAppDir={true} />
<LegacyPage />
</SettingsHeader>
);
};
Expand Down
1 change: 0 additions & 1 deletion apps/web/middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,6 @@ export const config = {
"/workflows/:path*",
"/future/workflows/:path*",
"/settings/teams/:path*",
"/future/settings/teams/:path*",
"/getting-started/:step/",
"/future/getting-started/:step/",
"/apps",
Expand Down
23 changes: 0 additions & 23 deletions apps/web/pages/settings/billing/index.tsx

This file was deleted.

11 changes: 0 additions & 11 deletions apps/web/pages/settings/teams/[id]/appearance.tsx

This file was deleted.

3 changes: 0 additions & 3 deletions apps/web/pages/settings/teams/[id]/billing.tsx

This file was deleted.

24 changes: 0 additions & 24 deletions apps/web/pages/settings/teams/[id]/bookingLimits.tsx

This file was deleted.

27 changes: 0 additions & 27 deletions apps/web/pages/settings/teams/[id]/event-type.tsx

This file was deleted.

11 changes: 0 additions & 11 deletions apps/web/pages/settings/teams/[id]/members.tsx

This file was deleted.

27 changes: 0 additions & 27 deletions apps/web/pages/settings/teams/[id]/onboard-members.tsx

This file was deleted.

11 changes: 0 additions & 11 deletions apps/web/pages/settings/teams/[id]/profile.tsx

This file was deleted.

11 changes: 0 additions & 11 deletions apps/web/pages/settings/teams/index.tsx

This file was deleted.

Loading
Loading