feat: Admin V2 users domain (#6844)

This commit is contained in:
Oli Juhl
2024-04-01 15:03:48 +02:00
committed by GitHub
parent 585818eaf8
commit 9fdced2c27
18 changed files with 818 additions and 1 deletions
@@ -7,6 +7,7 @@ import { Outlet } from "react-router-dom"
import { Spinner } from "@medusajs/icons"
import { ErrorBoundary } from "../../components/error/error-boundary"
import { useV2Session } from "../../lib/api-v2"
import { UserDTO } from "@medusajs/types"
import { SearchProvider } from "../search-provider"
import { SidebarProvider } from "../sidebar-provider"
@@ -139,6 +140,38 @@ export const v2Routes: RouteObject[] = [
},
],
},
{
path: "users",
element: <Outlet />,
handle: {
crumb: () => "Users",
},
children: [
{
path: "",
lazy: () => import("../../v2-routes/users/user-list"),
children: [
{
path: "invite",
lazy: () => import("../../v2-routes/users/user-invite"),
},
],
},
{
path: ":id",
lazy: () => import("../../v2-routes/users/user-detail"),
handle: {
crumb: (data: { user: UserDTO }) => data.user.email,
},
children: [
{
path: "edit",
lazy: () => import("../../v2-routes/users/user-edit"),
},
],
},
],
},
],
},
],