first commit
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
import { type Params } from "app/_types";
|
||||
import { _generateMetadata } from "app/_utils";
|
||||
import { WithLayout } from "app/layoutHOC";
|
||||
import { z } from "zod";
|
||||
|
||||
import Page from "@calcom/features/ee/users/pages/users-edit-view";
|
||||
import { getLayout } from "@calcom/features/settings/layouts/SettingsLayoutAppDir";
|
||||
|
||||
const userIdSchema = z.object({ id: z.coerce.number() });
|
||||
|
||||
export const generateMetadata = async ({ params }: { params: Params }) => {
|
||||
const input = userIdSchema.safeParse(params);
|
||||
if (!input.success) {
|
||||
return await _generateMetadata(
|
||||
() => "",
|
||||
() => "Here you can edit a current user."
|
||||
);
|
||||
}
|
||||
|
||||
const userId = input.data.id;
|
||||
const { trpc } = await import("@calcom/trpc");
|
||||
const [data] = trpc.viewer.users.get.useSuspenseQuery({ userId });
|
||||
const { user } = data;
|
||||
const title = `Editing user: ${user.username}`;
|
||||
|
||||
return await _generateMetadata(
|
||||
() => title,
|
||||
() => "Here you can edit a current user."
|
||||
);
|
||||
};
|
||||
|
||||
export default WithLayout({ getLayout, Page })<"P">;
|
||||
13
calcom/apps/web/app/future/settings/admin/users/add/page.tsx
Normal file
13
calcom/apps/web/app/future/settings/admin/users/add/page.tsx
Normal file
@@ -0,0 +1,13 @@
|
||||
import { _generateMetadata } from "app/_utils";
|
||||
import { WithLayout } from "app/layoutHOC";
|
||||
|
||||
import Page from "@calcom/features/ee/users/pages/users-add-view";
|
||||
import { getLayout } from "@calcom/features/settings/layouts/SettingsLayoutAppDir";
|
||||
|
||||
export const generateMetadata = async () =>
|
||||
await _generateMetadata(
|
||||
() => "Add new user",
|
||||
() => "Here you can add a new user."
|
||||
);
|
||||
|
||||
export default WithLayout({ getLayout, Page })<"P">;
|
||||
13
calcom/apps/web/app/future/settings/admin/users/page.tsx
Normal file
13
calcom/apps/web/app/future/settings/admin/users/page.tsx
Normal file
@@ -0,0 +1,13 @@
|
||||
import { _generateMetadata } from "app/_utils";
|
||||
import { WithLayout } from "app/layoutHOC";
|
||||
|
||||
import Page from "@calcom/features/ee/users/pages/users-listing-view";
|
||||
import { getLayout } from "@calcom/features/settings/layouts/SettingsLayoutAppDir";
|
||||
|
||||
export const generateMetadata = async () =>
|
||||
await _generateMetadata(
|
||||
() => "Users",
|
||||
() => "A list of all the users in your account including their name, title, email and role."
|
||||
);
|
||||
|
||||
export default WithLayout({ getLayout, Page })<"P">;
|
||||
Reference in New Issue
Block a user