Split project structure, routing
Signed-off-by: Émile Ré <nemile.re@gmail.com>
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
@import "tailwindcss";
|
||||
@import "./styles/colors.css";
|
||||
@import "./styles/policy-content.css";
|
||||
|
||||
@plugin 'tailwindcss-animate';
|
||||
@plugin "@tailwindcss/typography";
|
||||
|
||||
@@ -8,28 +8,10 @@ import { BrowserRouter, Route, Routes, useLocation } from "react-router";
|
||||
import "./App.css";
|
||||
import "./styles/policy-content.css";
|
||||
import ErrorBoundary from "./components/ErrorBoundary";
|
||||
import ConsoleLayout from "./layouts/ConsoleLayout";
|
||||
import AuthLayout from "./layouts/AuthLayout";
|
||||
import { RelayEnvironment } from "./RelayEnvironment";
|
||||
import VisitorErrorBoundary from "./components/VisitorErrorBoundary";
|
||||
import { FrameworkListPageSkeleton } from "./pages/FrameworkListPage";
|
||||
import { ControlOverviewPageSkeleton } from "./pages/ControlOverviewPage";
|
||||
import { CreateControlPageSkeleton } from "./pages/CreateControlPage";
|
||||
import { UpdateFrameworkPageSkeleton } from "./pages/UpdateFrameworkPage";
|
||||
import { UpdateControlPageSkeleton } from "./pages/UpdateControlPage";
|
||||
import { CreateFrameworkPageSkeleton } from "./pages/CreateFrameworkPage";
|
||||
import { CreateOrganizationPageSkeleton } from "./pages/CreateOrganizationPage";
|
||||
import { CreatePeoplePageSkeleton } from "./pages/CreatePeoplePage";
|
||||
import { CreatePolicyPageSkeleton } from "./pages/CreatePolicyPage";
|
||||
import { FrameworkOverviewPageSkeleton } from "./pages/FrameworkOverviewPage";
|
||||
import { PeopleListPageSkeleton } from "./pages/PeopleListPage";
|
||||
import { PeopleOverviewPageSkeleton } from "./pages/PeopleOverviewPage";
|
||||
import { PolicyListPageSkeleton } from "./pages/PolicyListPage";
|
||||
import { PolicyOverviewPageSkeleton } from "./pages/PolicyOverviewPage";
|
||||
import { UpdatePolicyPageSkeleton } from "./pages/UpdatePolicyPage";
|
||||
import { VendorListPageSkeleton } from "./pages/VendorListPage";
|
||||
import { VendorOverviewPageSkeleton } from "./pages/VendorOverviewPage";
|
||||
import { SettingsPageSkeleton } from "./pages/SettingsPage";
|
||||
import { AuthenticationRoutes } from "./pages/authentication/Routes";
|
||||
import { OrganizationsRoutes } from "./pages/organizations/Routes";
|
||||
|
||||
posthog.init(process.env.POSTHOG_KEY!, {
|
||||
api_host: process.env.POSTHOG_HOST,
|
||||
@@ -44,39 +26,7 @@ posthog.init(process.env.POSTHOG_KEY!, {
|
||||
const OrganizationSelectionPage = lazy(
|
||||
() => import("./pages/OrganizationSelectionPage")
|
||||
);
|
||||
const HomePage = lazy(() => import("./pages/HomePage"));
|
||||
const NotFoundPage = lazy(() => import("./pages/NotFoundPage"));
|
||||
const PeopleListPage = lazy(() => import("./pages/PeopleListPage"));
|
||||
const VendorListPage = lazy(() => import("./pages/VendorListPage"));
|
||||
const FrameworkListPage = lazy(() => import("./pages/FrameworkListPage"));
|
||||
const VendorOverviewPage = lazy(() => import("./pages/VendorOverviewPage"));
|
||||
const SettingsPage = lazy(() => import("./pages/SettingsPage"));
|
||||
const CreatePeoplePage = lazy(() => import("./pages/CreatePeoplePage"));
|
||||
const FrameworkOverviewPage = lazy(
|
||||
() => import("./pages/FrameworkOverviewPage")
|
||||
);
|
||||
const ControlOverviewPage = lazy(() => import("./pages/ControlOverviewPage"));
|
||||
const PeopleOverviewPage = lazy(() => import("./pages/PeopleOverviewPage"));
|
||||
const LoginPage = lazy(() => import("./pages/LoginPage"));
|
||||
const RegisterPage = lazy(() => import("./pages/RegisterPage"));
|
||||
const ConfirmEmailPage = lazy(() => import("./pages/ConfirmEmailPage"));
|
||||
const ConfirmInvitationPage = lazy(
|
||||
() => import("./pages/ConfirmInvitationPage")
|
||||
);
|
||||
const CreateOrganizationPage = lazy(
|
||||
() => import("./pages/CreateOrganizationPage")
|
||||
);
|
||||
const CreateFrameworkPage = lazy(() => import("./pages/CreateFrameworkPage"));
|
||||
const CreateControlPage = lazy(() => import("./pages/CreateControlPage"));
|
||||
const UpdateFrameworkPage = lazy(() => import("./pages/UpdateFrameworkPage"));
|
||||
const UpdateControlPage = lazy(() => import("./pages/UpdateControlPage"));
|
||||
const ForgotPasswordPage = lazy(() => import("./pages/ForgotPasswordPage"));
|
||||
const ResetPasswordPage = lazy(() => import("./pages/ResetPasswordPage"));
|
||||
// Policy pages
|
||||
const PolicyListPage = lazy(() => import("./pages/PolicyListPage"));
|
||||
const PolicyOverviewPage = lazy(() => import("./pages/PolicyOverviewPage"));
|
||||
const CreatePolicyPage = lazy(() => import("./pages/CreatePolicyPage"));
|
||||
const UpdatePolicyPage = lazy(() => import("./pages/UpdatePolicyPage"));
|
||||
|
||||
function App() {
|
||||
return (
|
||||
@@ -98,267 +48,18 @@ function App() {
|
||||
}
|
||||
/>
|
||||
|
||||
<Route path="organizations/*" element={<ConsoleLayout />}>
|
||||
<Route
|
||||
path="create"
|
||||
element={
|
||||
<Suspense fallback={<CreateOrganizationPageSkeleton />}>
|
||||
<ErrorBoundaryWithLocation>
|
||||
<CreateOrganizationPage />
|
||||
</ErrorBoundaryWithLocation>
|
||||
</Suspense>
|
||||
}
|
||||
/>
|
||||
<Route path=":organizationId">
|
||||
<Route
|
||||
index
|
||||
element={
|
||||
<Suspense>
|
||||
<ErrorBoundaryWithLocation>
|
||||
<HomePage />
|
||||
</ErrorBoundaryWithLocation>
|
||||
</Suspense>
|
||||
}
|
||||
/>
|
||||
<Route
|
||||
path="people"
|
||||
element={
|
||||
<Suspense fallback={<PeopleListPageSkeleton />}>
|
||||
<ErrorBoundaryWithLocation>
|
||||
<PeopleListPage />
|
||||
</ErrorBoundaryWithLocation>
|
||||
</Suspense>
|
||||
}
|
||||
/>
|
||||
<Route
|
||||
path="people/create"
|
||||
element={
|
||||
<Suspense fallback={<CreatePeoplePageSkeleton />}>
|
||||
<ErrorBoundaryWithLocation>
|
||||
<CreatePeoplePage />
|
||||
</ErrorBoundaryWithLocation>
|
||||
</Suspense>
|
||||
}
|
||||
/>
|
||||
<Route
|
||||
path="people/:peopleId"
|
||||
element={
|
||||
<Suspense fallback={<PeopleOverviewPageSkeleton />}>
|
||||
<ErrorBoundaryWithLocation>
|
||||
<PeopleOverviewPage />
|
||||
</ErrorBoundaryWithLocation>
|
||||
</Suspense>
|
||||
}
|
||||
/>
|
||||
<Route
|
||||
path="vendors"
|
||||
element={
|
||||
<Suspense fallback={<VendorListPageSkeleton />}>
|
||||
<ErrorBoundaryWithLocation>
|
||||
<VendorListPage />
|
||||
</ErrorBoundaryWithLocation>
|
||||
</Suspense>
|
||||
}
|
||||
/>
|
||||
<Route
|
||||
path="frameworks"
|
||||
element={
|
||||
<Suspense fallback={<FrameworkListPageSkeleton />}>
|
||||
<ErrorBoundaryWithLocation>
|
||||
<FrameworkListPage />
|
||||
</ErrorBoundaryWithLocation>
|
||||
</Suspense>
|
||||
}
|
||||
/>
|
||||
<Route
|
||||
path="frameworks/create"
|
||||
element={
|
||||
<Suspense fallback={<CreateFrameworkPageSkeleton />}>
|
||||
<ErrorBoundaryWithLocation>
|
||||
<CreateFrameworkPage />
|
||||
</ErrorBoundaryWithLocation>
|
||||
</Suspense>
|
||||
}
|
||||
/>
|
||||
<Route
|
||||
path="frameworks/:frameworkId"
|
||||
element={
|
||||
<Suspense
|
||||
fallback={<FrameworkOverviewPageSkeleton />}
|
||||
>
|
||||
<ErrorBoundaryWithLocation>
|
||||
<FrameworkOverviewPage />
|
||||
</ErrorBoundaryWithLocation>
|
||||
</Suspense>
|
||||
}
|
||||
/>
|
||||
<Route
|
||||
path="frameworks/:frameworkId/update"
|
||||
element={
|
||||
<Suspense fallback={<UpdateFrameworkPageSkeleton />}>
|
||||
<ErrorBoundaryWithLocation>
|
||||
<UpdateFrameworkPage />
|
||||
</ErrorBoundaryWithLocation>
|
||||
</Suspense>
|
||||
}
|
||||
/>
|
||||
<Route
|
||||
path="frameworks/:frameworkId/controls/create"
|
||||
element={
|
||||
<Suspense fallback={<CreateControlPageSkeleton />}>
|
||||
<ErrorBoundaryWithLocation>
|
||||
<CreateControlPage />
|
||||
</ErrorBoundaryWithLocation>
|
||||
</Suspense>
|
||||
}
|
||||
/>
|
||||
<Route
|
||||
path="frameworks/:frameworkId/controls/:controlId"
|
||||
element={
|
||||
<Suspense fallback={<ControlOverviewPageSkeleton />}>
|
||||
<ErrorBoundaryWithLocation>
|
||||
<ControlOverviewPage />
|
||||
</ErrorBoundaryWithLocation>
|
||||
</Suspense>
|
||||
}
|
||||
/>
|
||||
<Route
|
||||
path="frameworks/:frameworkId/controls/:controlId/update"
|
||||
element={
|
||||
<Suspense fallback={<UpdateControlPageSkeleton />}>
|
||||
<ErrorBoundaryWithLocation>
|
||||
<UpdateControlPage />
|
||||
</ErrorBoundaryWithLocation>
|
||||
</Suspense>
|
||||
}
|
||||
/>
|
||||
<Route
|
||||
path="vendors/:vendorId"
|
||||
element={
|
||||
<Suspense fallback={<VendorOverviewPageSkeleton />}>
|
||||
<ErrorBoundaryWithLocation>
|
||||
<VendorOverviewPage />
|
||||
</ErrorBoundaryWithLocation>
|
||||
</Suspense>
|
||||
}
|
||||
/>
|
||||
{/* Policy Routes */}
|
||||
<Route
|
||||
path="policies"
|
||||
element={
|
||||
<Suspense fallback={<PolicyListPageSkeleton />}>
|
||||
<ErrorBoundaryWithLocation>
|
||||
<PolicyListPage />
|
||||
</ErrorBoundaryWithLocation>
|
||||
</Suspense>
|
||||
}
|
||||
/>
|
||||
<Route
|
||||
path="policies/create"
|
||||
element={
|
||||
<Suspense fallback={<CreatePolicyPageSkeleton />}>
|
||||
<ErrorBoundaryWithLocation>
|
||||
<CreatePolicyPage />
|
||||
</ErrorBoundaryWithLocation>
|
||||
</Suspense>
|
||||
}
|
||||
/>
|
||||
<Route
|
||||
path="policies/:policyId"
|
||||
element={
|
||||
<Suspense fallback={<PolicyOverviewPageSkeleton />}>
|
||||
<ErrorBoundaryWithLocation>
|
||||
<PolicyOverviewPage />
|
||||
</ErrorBoundaryWithLocation>
|
||||
</Suspense>
|
||||
}
|
||||
/>
|
||||
<Route
|
||||
path="policies/:policyId/update"
|
||||
element={
|
||||
<Suspense fallback={<UpdatePolicyPageSkeleton />}>
|
||||
<ErrorBoundaryWithLocation>
|
||||
<UpdatePolicyPage />
|
||||
</ErrorBoundaryWithLocation>
|
||||
</Suspense>
|
||||
}
|
||||
/>
|
||||
<Route
|
||||
path="settings"
|
||||
element={
|
||||
<Suspense fallback={<SettingsPageSkeleton />}>
|
||||
<ErrorBoundaryWithLocation>
|
||||
<SettingsPage />
|
||||
</ErrorBoundaryWithLocation>
|
||||
</Suspense>
|
||||
}
|
||||
/>
|
||||
</Route>
|
||||
</Route>
|
||||
<Route
|
||||
path="organizations/*"
|
||||
element={<OrganizationsRoutes />}
|
||||
/>
|
||||
|
||||
{/* Authentication Routes - Accessible without login */}
|
||||
<Route element={<AuthLayout />}>
|
||||
<Route
|
||||
path="login"
|
||||
element={
|
||||
<Suspense>
|
||||
<VisitorErrorBoundaryWithLocation>
|
||||
<LoginPage />
|
||||
</VisitorErrorBoundaryWithLocation>
|
||||
</Suspense>
|
||||
}
|
||||
/>
|
||||
<Route
|
||||
path="register"
|
||||
element={
|
||||
<Suspense>
|
||||
<VisitorErrorBoundaryWithLocation>
|
||||
<RegisterPage />
|
||||
</VisitorErrorBoundaryWithLocation>
|
||||
</Suspense>
|
||||
}
|
||||
/>
|
||||
<Route
|
||||
path="forgot-password"
|
||||
element={
|
||||
<Suspense>
|
||||
<VisitorErrorBoundaryWithLocation>
|
||||
<ForgotPasswordPage />
|
||||
</VisitorErrorBoundaryWithLocation>
|
||||
</Suspense>
|
||||
}
|
||||
/>
|
||||
<Route
|
||||
path="reset-password"
|
||||
element={
|
||||
<Suspense>
|
||||
<VisitorErrorBoundaryWithLocation>
|
||||
<ResetPasswordPage />
|
||||
</VisitorErrorBoundaryWithLocation>
|
||||
</Suspense>
|
||||
}
|
||||
/>
|
||||
<Route
|
||||
path="confirm-email"
|
||||
element={
|
||||
<Suspense>
|
||||
<VisitorErrorBoundaryWithLocation>
|
||||
<ConfirmEmailPage />
|
||||
</VisitorErrorBoundaryWithLocation>
|
||||
</Suspense>
|
||||
}
|
||||
/>
|
||||
<Route
|
||||
path="confirm-invitation"
|
||||
element={
|
||||
<Suspense>
|
||||
<VisitorErrorBoundaryWithLocation>
|
||||
<ConfirmInvitationPage />
|
||||
</VisitorErrorBoundaryWithLocation>
|
||||
</Suspense>
|
||||
}
|
||||
/>
|
||||
</Route>
|
||||
<Route
|
||||
element={
|
||||
<AuthLayout>
|
||||
<AuthenticationRoutes />
|
||||
</AuthLayout>
|
||||
}
|
||||
/>
|
||||
|
||||
<Route
|
||||
path="*"
|
||||
@@ -387,19 +88,6 @@ function ErrorBoundaryWithLocation({
|
||||
return <ErrorBoundary key={location.pathname}>{children}</ErrorBoundary>;
|
||||
}
|
||||
|
||||
function VisitorErrorBoundaryWithLocation({
|
||||
children,
|
||||
}: {
|
||||
children: React.ReactNode;
|
||||
}) {
|
||||
const location = useLocation();
|
||||
return (
|
||||
<VisitorErrorBoundary key={location.pathname}>
|
||||
{children}
|
||||
</VisitorErrorBoundary>
|
||||
);
|
||||
}
|
||||
|
||||
const container = document.getElementById("root");
|
||||
const root = createRoot(container!);
|
||||
root.render(<App />);
|
||||
|
||||
@@ -1,15 +1,13 @@
|
||||
import { Outlet } from "react-router";
|
||||
import { Toaster } from "@/components/ui/toaster";
|
||||
import { ReactNode } from "react";
|
||||
|
||||
export default function AuthLayout() {
|
||||
export default function AuthLayout({ children }: { children: ReactNode }) {
|
||||
return (
|
||||
<div className="flex min-h-screen flex-col">
|
||||
<div className="flex flex-1">
|
||||
<div className="flex flex-1 flex-col bg-muted/40">
|
||||
<div className="flex flex-1 items-center justify-center">
|
||||
<main className="w-full max-w-md p-6">
|
||||
<Outlet />
|
||||
</main>
|
||||
<main className="w-full max-w-md p-6">{children}</main>
|
||||
</div>
|
||||
</div>
|
||||
<div className="hidden flex-1 bg-linear-to-br from-gray-900 to-gray-950 lg:block">
|
||||
|
||||
15
apps/console/src/pages/authentication/ErrorBoundary.tsx
Normal file
15
apps/console/src/pages/authentication/ErrorBoundary.tsx
Normal file
@@ -0,0 +1,15 @@
|
||||
import VisitorErrorBoundary from "@/components/VisitorErrorBoundary";
|
||||
import { useLocation } from "react-router";
|
||||
|
||||
export function VisitorErrorBoundaryWithLocation({
|
||||
children,
|
||||
}: {
|
||||
children: React.ReactNode;
|
||||
}) {
|
||||
const location = useLocation();
|
||||
return (
|
||||
<VisitorErrorBoundary key={location.pathname}>
|
||||
{children}
|
||||
</VisitorErrorBoundary>
|
||||
);
|
||||
}
|
||||
76
apps/console/src/pages/authentication/Routes.tsx
Normal file
76
apps/console/src/pages/authentication/Routes.tsx
Normal file
@@ -0,0 +1,76 @@
|
||||
import { Suspense } from "react";
|
||||
import { Route, Routes } from "react-router";
|
||||
import ConfirmEmailPage from "./ConfirmEmailPage";
|
||||
import ConfirmInvitationPage from "./ConfirmInvitationPage";
|
||||
import ForgotPasswordPage from "./ForgotPasswordPage";
|
||||
import LoginPage from "./LoginPage";
|
||||
import RegisterPage from "./RegisterPage";
|
||||
import ResetPasswordPage from "./ResetPasswordPage";
|
||||
import { VisitorErrorBoundaryWithLocation } from "./ErrorBoundary";
|
||||
|
||||
export function AuthenticationRoutes() {
|
||||
return (
|
||||
<Routes>
|
||||
<Route
|
||||
path="login"
|
||||
element={
|
||||
<Suspense>
|
||||
<VisitorErrorBoundaryWithLocation>
|
||||
<LoginPage />
|
||||
</VisitorErrorBoundaryWithLocation>
|
||||
</Suspense>
|
||||
}
|
||||
/>
|
||||
<Route
|
||||
path="register"
|
||||
element={
|
||||
<Suspense>
|
||||
<VisitorErrorBoundaryWithLocation>
|
||||
<RegisterPage />
|
||||
</VisitorErrorBoundaryWithLocation>
|
||||
</Suspense>
|
||||
}
|
||||
/>
|
||||
<Route
|
||||
path="forgot-password"
|
||||
element={
|
||||
<Suspense>
|
||||
<VisitorErrorBoundaryWithLocation>
|
||||
<ForgotPasswordPage />
|
||||
</VisitorErrorBoundaryWithLocation>
|
||||
</Suspense>
|
||||
}
|
||||
/>
|
||||
<Route
|
||||
path="reset-password"
|
||||
element={
|
||||
<Suspense>
|
||||
<VisitorErrorBoundaryWithLocation>
|
||||
<ResetPasswordPage />
|
||||
</VisitorErrorBoundaryWithLocation>
|
||||
</Suspense>
|
||||
}
|
||||
/>
|
||||
<Route
|
||||
path="confirm-email"
|
||||
element={
|
||||
<Suspense>
|
||||
<VisitorErrorBoundaryWithLocation>
|
||||
<ConfirmEmailPage />
|
||||
</VisitorErrorBoundaryWithLocation>
|
||||
</Suspense>
|
||||
}
|
||||
/>
|
||||
<Route
|
||||
path="confirm-invitation"
|
||||
element={
|
||||
<Suspense>
|
||||
<VisitorErrorBoundaryWithLocation>
|
||||
<ConfirmInvitationPage />
|
||||
</VisitorErrorBoundaryWithLocation>
|
||||
</Suspense>
|
||||
}
|
||||
/>
|
||||
</Routes>
|
||||
);
|
||||
}
|
||||
11
apps/console/src/pages/organizations/ErrorBoundary.tsx
Normal file
11
apps/console/src/pages/organizations/ErrorBoundary.tsx
Normal file
@@ -0,0 +1,11 @@
|
||||
import ErrorBoundary from "@/components/ErrorBoundary";
|
||||
import { useLocation } from "react-router";
|
||||
|
||||
export function ErrorBoundaryWithLocation({
|
||||
children,
|
||||
}: {
|
||||
children: React.ReactNode;
|
||||
}) {
|
||||
const location = useLocation();
|
||||
return <ErrorBoundary key={location.pathname}>{children}</ErrorBoundary>;
|
||||
}
|
||||
@@ -0,0 +1,90 @@
|
||||
import { NavLink, Outlet, Route, Routes, To } from "react-router";
|
||||
import { AppSidebar } from "@/components/AppSidebar";
|
||||
import { ReactNode, Suspense } from "react";
|
||||
import {
|
||||
Breadcrumb,
|
||||
BreadcrumbItem,
|
||||
BreadcrumbLink,
|
||||
BreadcrumbList,
|
||||
BreadcrumbPage,
|
||||
BreadcrumbSeparator,
|
||||
} from "@/components/ui/breadcrumb";
|
||||
import { SidebarInset, SidebarProvider } from "@/components/ui/sidebar";
|
||||
import { Toaster } from "@/components/ui/toaster";
|
||||
import { cn } from "@/lib/utils";
|
||||
|
||||
const BreadCrumbNavLink = ({
|
||||
to,
|
||||
children,
|
||||
className,
|
||||
}: {
|
||||
to: To;
|
||||
children?: ReactNode;
|
||||
className?: string;
|
||||
}) => {
|
||||
return (
|
||||
<BreadcrumbLink asChild>
|
||||
<NavLink to={to} end>
|
||||
{({ isActive }) => (
|
||||
<BreadcrumbPage
|
||||
className={cn(
|
||||
"text-gray-300",
|
||||
isActive && "text-gray-700",
|
||||
className
|
||||
)}
|
||||
>
|
||||
{children}
|
||||
</BreadcrumbPage>
|
||||
)}
|
||||
</NavLink>
|
||||
</BreadcrumbLink>
|
||||
);
|
||||
};
|
||||
|
||||
function BreadcrumbHome() {
|
||||
return (
|
||||
<Breadcrumb>
|
||||
<BreadcrumbList>
|
||||
<BreadcrumbItem>
|
||||
<BreadCrumbNavLink to="/">Home</BreadCrumbNavLink>
|
||||
</BreadcrumbItem>
|
||||
<Outlet />
|
||||
</BreadcrumbList>
|
||||
</Breadcrumb>
|
||||
);
|
||||
}
|
||||
|
||||
export default function NoOrganizationLayout() {
|
||||
return (
|
||||
<SidebarProvider>
|
||||
<Suspense>
|
||||
<AppSidebar className="p-4" />
|
||||
</Suspense>
|
||||
<SidebarInset>
|
||||
<div className="mx-auto w-lg md:w-xl lg:w-3xl xl:w-4xl 2xl:w-5xl p-8">
|
||||
<header className="flex shrink-0 items-center gap-2">
|
||||
<Routes>
|
||||
<Route path="*" element={<BreadcrumbHome />}>
|
||||
<Route
|
||||
path="create"
|
||||
element={
|
||||
<>
|
||||
<BreadcrumbSeparator />
|
||||
<BreadcrumbItem>
|
||||
<BreadcrumbPage>Create Organization</BreadcrumbPage>
|
||||
</BreadcrumbItem>
|
||||
</>
|
||||
}
|
||||
/>
|
||||
</Route>
|
||||
</Routes>
|
||||
</header>
|
||||
<div className="mt-7 w-full">
|
||||
<Outlet />
|
||||
</div>
|
||||
</div>
|
||||
<Toaster />
|
||||
</SidebarInset>
|
||||
</SidebarProvider>
|
||||
);
|
||||
}
|
||||
@@ -12,13 +12,13 @@ import {
|
||||
import { SidebarInset, SidebarProvider } from "@/components/ui/sidebar";
|
||||
import { Toaster } from "@/components/ui/toaster";
|
||||
import { graphql, useLazyLoadQuery } from "react-relay";
|
||||
import { ConsoleLayoutBreadcrumbFrameworkOverviewQuery } from "./__generated__/ConsoleLayoutBreadcrumbFrameworkOverviewQuery.graphql";
|
||||
import { ConsoleLayoutBreadcrumbPeopleOverviewQuery } from "./__generated__/ConsoleLayoutBreadcrumbPeopleOverviewQuery.graphql";
|
||||
import { ConsoleLayoutBreadcrumbVendorOverviewQuery } from "./__generated__/ConsoleLayoutBreadcrumbVendorOverviewQuery.graphql";
|
||||
import { ConsoleLayoutBreadcrumbControlOverviewQuery } from "./__generated__/ConsoleLayoutBreadcrumbControlOverviewQuery.graphql";
|
||||
import { ConsoleLayoutOrganizationQuery } from "./__generated__/ConsoleLayoutOrganizationQuery.graphql";
|
||||
import { ConsoleLayoutBreadcrumbPolicyOverviewQuery } from "./__generated__/ConsoleLayoutBreadcrumbPolicyOverviewQuery.graphql";
|
||||
import { cn } from "@/lib/utils";
|
||||
import { OrganizationLayoutOrganizationQuery } from "./__generated__/OrganizationLayoutOrganizationQuery.graphql";
|
||||
import { OrganizationLayoutBreadcrumbControlOverviewQuery } from "./__generated__/OrganizationLayoutBreadcrumbControlOverviewQuery.graphql";
|
||||
import { OrganizationLayoutBreadcrumbFrameworkOverviewQuery } from "./__generated__/OrganizationLayoutBreadcrumbFrameworkOverviewQuery.graphql";
|
||||
import { OrganizationLayoutBreadcrumbPeopleOverviewQuery } from "./__generated__/OrganizationLayoutBreadcrumbPeopleOverviewQuery.graphql";
|
||||
import { OrganizationLayoutBreadcrumbPolicyOverviewQuery } from "./__generated__/OrganizationLayoutBreadcrumbPolicyOverviewQuery.graphql";
|
||||
import { OrganizationLayoutBreadcrumbVendorOverviewQuery } from "./__generated__/OrganizationLayoutBreadcrumbVendorOverviewQuery.graphql";
|
||||
|
||||
const BreadCrumbNavLink = ({
|
||||
to,
|
||||
@@ -64,9 +64,9 @@ function BreadcrumbHome() {
|
||||
function BreadCrumbOrganization() {
|
||||
const { organizationId } = useParams();
|
||||
|
||||
const data = useLazyLoadQuery<ConsoleLayoutOrganizationQuery>(
|
||||
const data = useLazyLoadQuery<OrganizationLayoutOrganizationQuery>(
|
||||
graphql`
|
||||
query ConsoleLayoutOrganizationQuery($organizationId: ID!) {
|
||||
query OrganizationLayoutOrganizationQuery($organizationId: ID!) {
|
||||
organization: node(id: $organizationId) {
|
||||
... on Organization {
|
||||
name
|
||||
@@ -120,19 +120,22 @@ function BreadcrumbCreateFramework() {
|
||||
|
||||
function BreadcrumbFrameworkOverview() {
|
||||
const { organizationId, frameworkId } = useParams();
|
||||
const data = useLazyLoadQuery<ConsoleLayoutBreadcrumbFrameworkOverviewQuery>(
|
||||
graphql`
|
||||
query ConsoleLayoutBreadcrumbFrameworkOverviewQuery($frameworkId: ID!) {
|
||||
framework: node(id: $frameworkId) {
|
||||
id
|
||||
... on Framework {
|
||||
name
|
||||
const data =
|
||||
useLazyLoadQuery<OrganizationLayoutBreadcrumbFrameworkOverviewQuery>(
|
||||
graphql`
|
||||
query OrganizationLayoutBreadcrumbFrameworkOverviewQuery(
|
||||
$frameworkId: ID!
|
||||
) {
|
||||
framework: node(id: $frameworkId) {
|
||||
id
|
||||
... on Framework {
|
||||
name
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`,
|
||||
{ frameworkId: frameworkId! }
|
||||
);
|
||||
`,
|
||||
{ frameworkId: frameworkId! }
|
||||
);
|
||||
|
||||
return (
|
||||
<>
|
||||
@@ -177,20 +180,21 @@ function BreadcrumbVendorList() {
|
||||
|
||||
function BreadcrumbVendorOverview() {
|
||||
const { organizationId, vendorId } = useParams();
|
||||
const data = useLazyLoadQuery<ConsoleLayoutBreadcrumbVendorOverviewQuery>(
|
||||
graphql`
|
||||
query ConsoleLayoutBreadcrumbVendorOverviewQuery($vendorId: ID!) {
|
||||
vendor: node(id: $vendorId) {
|
||||
id
|
||||
... on Vendor {
|
||||
name
|
||||
const data =
|
||||
useLazyLoadQuery<OrganizationLayoutBreadcrumbVendorOverviewQuery>(
|
||||
graphql`
|
||||
query OrganizationLayoutBreadcrumbVendorOverviewQuery($vendorId: ID!) {
|
||||
vendor: node(id: $vendorId) {
|
||||
id
|
||||
... on Vendor {
|
||||
name
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`,
|
||||
{ vendorId: vendorId! },
|
||||
{ fetchPolicy: "store-or-network" }
|
||||
);
|
||||
`,
|
||||
{ vendorId: vendorId! },
|
||||
{ fetchPolicy: "store-or-network" }
|
||||
);
|
||||
|
||||
return (
|
||||
<>
|
||||
@@ -235,20 +239,21 @@ function BreadcrumbCreatePeople() {
|
||||
|
||||
function BreadcrumbPeopleOverview() {
|
||||
const { organizationId, peopleId } = useParams();
|
||||
const data = useLazyLoadQuery<ConsoleLayoutBreadcrumbPeopleOverviewQuery>(
|
||||
graphql`
|
||||
query ConsoleLayoutBreadcrumbPeopleOverviewQuery($peopleId: ID!) {
|
||||
people: node(id: $peopleId) {
|
||||
id
|
||||
... on People {
|
||||
fullName
|
||||
const data =
|
||||
useLazyLoadQuery<OrganizationLayoutBreadcrumbPeopleOverviewQuery>(
|
||||
graphql`
|
||||
query OrganizationLayoutBreadcrumbPeopleOverviewQuery($peopleId: ID!) {
|
||||
people: node(id: $peopleId) {
|
||||
id
|
||||
... on People {
|
||||
fullName
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`,
|
||||
{ peopleId: peopleId! },
|
||||
{ fetchPolicy: "store-or-network" }
|
||||
);
|
||||
`,
|
||||
{ peopleId: peopleId! },
|
||||
{ fetchPolicy: "store-or-network" }
|
||||
);
|
||||
|
||||
return (
|
||||
<>
|
||||
@@ -267,19 +272,22 @@ function BreadcrumbPeopleOverview() {
|
||||
|
||||
function BreadcrumbControlOverview() {
|
||||
const { organizationId, frameworkId, controlId } = useParams();
|
||||
const data = useLazyLoadQuery<ConsoleLayoutBreadcrumbControlOverviewQuery>(
|
||||
graphql`
|
||||
query ConsoleLayoutBreadcrumbControlOverviewQuery($controlId: ID!) {
|
||||
control: node(id: $controlId) {
|
||||
id
|
||||
... on Control {
|
||||
name
|
||||
const data =
|
||||
useLazyLoadQuery<OrganizationLayoutBreadcrumbControlOverviewQuery>(
|
||||
graphql`
|
||||
query OrganizationLayoutBreadcrumbControlOverviewQuery(
|
||||
$controlId: ID!
|
||||
) {
|
||||
control: node(id: $controlId) {
|
||||
id
|
||||
... on Control {
|
||||
name
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`,
|
||||
{ controlId: controlId! }
|
||||
);
|
||||
`,
|
||||
{ controlId: controlId! }
|
||||
);
|
||||
|
||||
return (
|
||||
<>
|
||||
@@ -346,20 +354,21 @@ function BreadcrumbCreatePolicy() {
|
||||
|
||||
function BreadcrumbPolicyOverview() {
|
||||
const { organizationId, policyId } = useParams();
|
||||
const data = useLazyLoadQuery<ConsoleLayoutBreadcrumbPolicyOverviewQuery>(
|
||||
graphql`
|
||||
query ConsoleLayoutBreadcrumbPolicyOverviewQuery($policyId: ID!) {
|
||||
policy: node(id: $policyId) {
|
||||
id
|
||||
... on Policy {
|
||||
name
|
||||
const data =
|
||||
useLazyLoadQuery<OrganizationLayoutBreadcrumbPolicyOverviewQuery>(
|
||||
graphql`
|
||||
query OrganizationLayoutBreadcrumbPolicyOverviewQuery($policyId: ID!) {
|
||||
policy: node(id: $policyId) {
|
||||
id
|
||||
... on Policy {
|
||||
name
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`,
|
||||
{ policyId: policyId! },
|
||||
{ fetchPolicy: "store-or-network" }
|
||||
);
|
||||
`,
|
||||
{ policyId: policyId! },
|
||||
{ fetchPolicy: "store-or-network" }
|
||||
);
|
||||
|
||||
return (
|
||||
<>
|
||||
@@ -387,7 +396,7 @@ function BreadcrumbUpdatePolicy() {
|
||||
);
|
||||
}
|
||||
|
||||
export default function ConsoleLayout() {
|
||||
export default function OrganizationLayout() {
|
||||
return (
|
||||
<SidebarProvider>
|
||||
<Suspense>
|
||||
@@ -398,7 +407,6 @@ export default function ConsoleLayout() {
|
||||
<header className="flex shrink-0 items-center gap-2">
|
||||
<Routes>
|
||||
<Route
|
||||
path=":organizationsId"
|
||||
element={
|
||||
<Suspense>
|
||||
<BreadCrumbOrganization />
|
||||
259
apps/console/src/pages/organizations/Routes.tsx
Normal file
259
apps/console/src/pages/organizations/Routes.tsx
Normal file
@@ -0,0 +1,259 @@
|
||||
import { lazy, Suspense } from "react";
|
||||
import { Route, Routes } from "react-router";
|
||||
import { CreateOrganizationPageSkeleton } from "./CreateOrganizationPage";
|
||||
import { ControlOverviewPageSkeleton } from "./frameworks/controls/ControlOverviewPage";
|
||||
import { CreateControlPageSkeleton } from "./frameworks/controls/CreateControlPage";
|
||||
import { UpdateControlPageSkeleton } from "./frameworks/controls/UpdateControlPage";
|
||||
import { CreateFrameworkPageSkeleton } from "./frameworks/CreateFrameworkPage";
|
||||
import { FrameworkListPageSkeleton } from "./frameworks/FrameworkListPage";
|
||||
import { FrameworkOverviewPageSkeleton } from "./frameworks/FrameworkOverviewPage";
|
||||
import { UpdateFrameworkPageSkeleton } from "./frameworks/UpdateFrameworkPage";
|
||||
import "./HomePage";
|
||||
import { CreatePeoplePageSkeleton } from "./people/CreatePeoplePage";
|
||||
import { PeopleListPageSkeleton } from "./people/PeopleListPage";
|
||||
import { PeopleOverviewPageSkeleton } from "./people/PeopleOverviewPage";
|
||||
import { CreatePolicyPageSkeleton } from "./policies/CreatePolicyPage";
|
||||
import { PolicyListPageSkeleton } from "./policies/PolicyListPage";
|
||||
import { PolicyOverviewPageSkeleton } from "./policies/PolicyOverviewPage";
|
||||
import { UpdatePolicyPageSkeleton } from "./policies/UpdatePolicyPage";
|
||||
import { SettingsPageSkeleton } from "./SettingsPage";
|
||||
import { VendorListPageSkeleton } from "./vendors/VendorListPage";
|
||||
import { VendorOverviewPageSkeleton } from "./vendors/VendorOverviewPage";
|
||||
import { ErrorBoundaryWithLocation } from "./ErrorBoundary";
|
||||
import OrganizationLayout from "./OrganizationLayout";
|
||||
import NoOrganizationLayout from "./NoOrganizationLayout";
|
||||
|
||||
const CreateOrganizationPage = lazy(() => import("./CreateOrganizationPage"));
|
||||
const ControlOverviewPage = lazy(
|
||||
() => import("./frameworks/controls/ControlOverviewPage")
|
||||
);
|
||||
const CreateControlPage = lazy(
|
||||
() => import("./frameworks/controls/CreateControlPage")
|
||||
);
|
||||
const UpdateControlPage = lazy(
|
||||
() => import("./frameworks/controls/UpdateControlPage")
|
||||
);
|
||||
const CreateFrameworkPage = lazy(
|
||||
() => import("./frameworks/CreateFrameworkPage")
|
||||
);
|
||||
const FrameworkListPage = lazy(() => import("./frameworks/FrameworkListPage"));
|
||||
const FrameworkOverviewPage = lazy(
|
||||
() => import("./frameworks/FrameworkOverviewPage")
|
||||
);
|
||||
const UpdateFrameworkPage = lazy(
|
||||
() => import("./frameworks/UpdateFrameworkPage")
|
||||
);
|
||||
const HomePage = lazy(() => import("./HomePage"));
|
||||
const CreatePeoplePage = lazy(() => import("./people/CreatePeoplePage"));
|
||||
const PeopleListPage = lazy(() => import("./people/PeopleListPage"));
|
||||
const PeopleOverviewPage = lazy(() => import("./people/PeopleOverviewPage"));
|
||||
const CreatePolicyPage = lazy(() => import("./policies/CreatePolicyPage"));
|
||||
const PolicyListPage = lazy(() => import("./policies/PolicyListPage"));
|
||||
const PolicyOverviewPage = lazy(() => import("./policies/PolicyOverviewPage"));
|
||||
const UpdatePolicyPage = lazy(() => import("./policies/UpdatePolicyPage"));
|
||||
const SettingsPage = lazy(() => import("./SettingsPage"));
|
||||
const VendorListPage = lazy(() => import("./vendors/VendorListPage"));
|
||||
const VendorOverviewPage = lazy(() => import("./vendors/VendorOverviewPage"));
|
||||
|
||||
export function OrganizationsRoutes() {
|
||||
return (
|
||||
<Routes>
|
||||
<Route path=":organizationId/*" element={<OrganizationLayout />}>
|
||||
<Route
|
||||
index
|
||||
element={
|
||||
<Suspense>
|
||||
<ErrorBoundaryWithLocation>
|
||||
<HomePage />
|
||||
</ErrorBoundaryWithLocation>
|
||||
</Suspense>
|
||||
}
|
||||
/>
|
||||
<Route
|
||||
path="people"
|
||||
element={
|
||||
<Suspense fallback={<PeopleListPageSkeleton />}>
|
||||
<ErrorBoundaryWithLocation>
|
||||
<PeopleListPage />
|
||||
</ErrorBoundaryWithLocation>
|
||||
</Suspense>
|
||||
}
|
||||
/>
|
||||
<Route
|
||||
path="people/create"
|
||||
element={
|
||||
<Suspense fallback={<CreatePeoplePageSkeleton />}>
|
||||
<ErrorBoundaryWithLocation>
|
||||
<CreatePeoplePage />
|
||||
</ErrorBoundaryWithLocation>
|
||||
</Suspense>
|
||||
}
|
||||
/>
|
||||
<Route
|
||||
path="people/:peopleId"
|
||||
element={
|
||||
<Suspense fallback={<PeopleOverviewPageSkeleton />}>
|
||||
<ErrorBoundaryWithLocation>
|
||||
<PeopleOverviewPage />
|
||||
</ErrorBoundaryWithLocation>
|
||||
</Suspense>
|
||||
}
|
||||
/>
|
||||
<Route
|
||||
path="vendors"
|
||||
element={
|
||||
<Suspense fallback={<VendorListPageSkeleton />}>
|
||||
<ErrorBoundaryWithLocation>
|
||||
<VendorListPage />
|
||||
</ErrorBoundaryWithLocation>
|
||||
</Suspense>
|
||||
}
|
||||
/>
|
||||
<Route
|
||||
path="frameworks"
|
||||
element={
|
||||
<Suspense fallback={<FrameworkListPageSkeleton />}>
|
||||
<ErrorBoundaryWithLocation>
|
||||
<FrameworkListPage />
|
||||
</ErrorBoundaryWithLocation>
|
||||
</Suspense>
|
||||
}
|
||||
/>
|
||||
<Route
|
||||
path="frameworks/create"
|
||||
element={
|
||||
<Suspense fallback={<CreateFrameworkPageSkeleton />}>
|
||||
<ErrorBoundaryWithLocation>
|
||||
<CreateFrameworkPage />
|
||||
</ErrorBoundaryWithLocation>
|
||||
</Suspense>
|
||||
}
|
||||
/>
|
||||
<Route
|
||||
path="frameworks/:frameworkId"
|
||||
element={
|
||||
<Suspense fallback={<FrameworkOverviewPageSkeleton />}>
|
||||
<ErrorBoundaryWithLocation>
|
||||
<FrameworkOverviewPage />
|
||||
</ErrorBoundaryWithLocation>
|
||||
</Suspense>
|
||||
}
|
||||
/>
|
||||
<Route
|
||||
path="frameworks/:frameworkId/update"
|
||||
element={
|
||||
<Suspense fallback={<UpdateFrameworkPageSkeleton />}>
|
||||
<ErrorBoundaryWithLocation>
|
||||
<UpdateFrameworkPage />
|
||||
</ErrorBoundaryWithLocation>
|
||||
</Suspense>
|
||||
}
|
||||
/>
|
||||
<Route
|
||||
path="frameworks/:frameworkId/controls/create"
|
||||
element={
|
||||
<Suspense fallback={<CreateControlPageSkeleton />}>
|
||||
<ErrorBoundaryWithLocation>
|
||||
<CreateControlPage />
|
||||
</ErrorBoundaryWithLocation>
|
||||
</Suspense>
|
||||
}
|
||||
/>
|
||||
<Route
|
||||
path="frameworks/:frameworkId/controls/:controlId"
|
||||
element={
|
||||
<Suspense fallback={<ControlOverviewPageSkeleton />}>
|
||||
<ErrorBoundaryWithLocation>
|
||||
<ControlOverviewPage />
|
||||
</ErrorBoundaryWithLocation>
|
||||
</Suspense>
|
||||
}
|
||||
/>
|
||||
<Route
|
||||
path="frameworks/:frameworkId/controls/:controlId/update"
|
||||
element={
|
||||
<Suspense fallback={<UpdateControlPageSkeleton />}>
|
||||
<ErrorBoundaryWithLocation>
|
||||
<UpdateControlPage />
|
||||
</ErrorBoundaryWithLocation>
|
||||
</Suspense>
|
||||
}
|
||||
/>
|
||||
<Route
|
||||
path="vendors/:vendorId"
|
||||
element={
|
||||
<Suspense fallback={<VendorOverviewPageSkeleton />}>
|
||||
<ErrorBoundaryWithLocation>
|
||||
<VendorOverviewPage />
|
||||
</ErrorBoundaryWithLocation>
|
||||
</Suspense>
|
||||
}
|
||||
/>
|
||||
{/* Policy Routes */}
|
||||
<Route
|
||||
path="policies"
|
||||
element={
|
||||
<Suspense fallback={<PolicyListPageSkeleton />}>
|
||||
<ErrorBoundaryWithLocation>
|
||||
<PolicyListPage />
|
||||
</ErrorBoundaryWithLocation>
|
||||
</Suspense>
|
||||
}
|
||||
/>
|
||||
<Route
|
||||
path="policies/create"
|
||||
element={
|
||||
<Suspense fallback={<CreatePolicyPageSkeleton />}>
|
||||
<ErrorBoundaryWithLocation>
|
||||
<CreatePolicyPage />
|
||||
</ErrorBoundaryWithLocation>
|
||||
</Suspense>
|
||||
}
|
||||
/>
|
||||
<Route
|
||||
path="policies/:policyId"
|
||||
element={
|
||||
<Suspense fallback={<PolicyOverviewPageSkeleton />}>
|
||||
<ErrorBoundaryWithLocation>
|
||||
<PolicyOverviewPage />
|
||||
</ErrorBoundaryWithLocation>
|
||||
</Suspense>
|
||||
}
|
||||
/>
|
||||
<Route
|
||||
path="policies/:policyId/update"
|
||||
element={
|
||||
<Suspense fallback={<UpdatePolicyPageSkeleton />}>
|
||||
<ErrorBoundaryWithLocation>
|
||||
<UpdatePolicyPage />
|
||||
</ErrorBoundaryWithLocation>
|
||||
</Suspense>
|
||||
}
|
||||
/>
|
||||
<Route
|
||||
path="settings"
|
||||
element={
|
||||
<Suspense fallback={<SettingsPageSkeleton />}>
|
||||
<ErrorBoundaryWithLocation>
|
||||
<SettingsPage />
|
||||
</ErrorBoundaryWithLocation>
|
||||
</Suspense>
|
||||
}
|
||||
/>
|
||||
</Route>
|
||||
|
||||
<Route path="*" element={<NoOrganizationLayout />}>
|
||||
<Route
|
||||
path="create"
|
||||
element={
|
||||
<Suspense fallback={<CreateOrganizationPageSkeleton />}>
|
||||
<ErrorBoundaryWithLocation>
|
||||
<CreateOrganizationPage />
|
||||
</ErrorBoundaryWithLocation>
|
||||
</Suspense>
|
||||
}
|
||||
/>
|
||||
</Route>
|
||||
</Routes>
|
||||
);
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @generated SignedSource<<00ec8864c54512b021bdfa0f7b53cd43>>
|
||||
* @generated SignedSource<<ebdda8f7be44df65a5ba836693e48bea>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
@@ -9,18 +9,18 @@
|
||||
// @ts-nocheck
|
||||
|
||||
import { ConcreteRequest } from 'relay-runtime';
|
||||
export type ConsoleLayoutBreadcrumbControlOverviewQuery$variables = {
|
||||
export type OrganizationLayoutBreadcrumbControlOverviewQuery$variables = {
|
||||
controlId: string;
|
||||
};
|
||||
export type ConsoleLayoutBreadcrumbControlOverviewQuery$data = {
|
||||
export type OrganizationLayoutBreadcrumbControlOverviewQuery$data = {
|
||||
readonly control: {
|
||||
readonly id: string;
|
||||
readonly name?: string;
|
||||
};
|
||||
};
|
||||
export type ConsoleLayoutBreadcrumbControlOverviewQuery = {
|
||||
response: ConsoleLayoutBreadcrumbControlOverviewQuery$data;
|
||||
variables: ConsoleLayoutBreadcrumbControlOverviewQuery$variables;
|
||||
export type OrganizationLayoutBreadcrumbControlOverviewQuery = {
|
||||
response: OrganizationLayoutBreadcrumbControlOverviewQuery$data;
|
||||
variables: OrganizationLayoutBreadcrumbControlOverviewQuery$variables;
|
||||
};
|
||||
|
||||
const node: ConcreteRequest = (function(){
|
||||
@@ -64,7 +64,7 @@ return {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "ConsoleLayoutBreadcrumbControlOverviewQuery",
|
||||
"name": "OrganizationLayoutBreadcrumbControlOverviewQuery",
|
||||
"selections": [
|
||||
{
|
||||
"alias": "control",
|
||||
@@ -87,7 +87,7 @@ return {
|
||||
"operation": {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Operation",
|
||||
"name": "ConsoleLayoutBreadcrumbControlOverviewQuery",
|
||||
"name": "OrganizationLayoutBreadcrumbControlOverviewQuery",
|
||||
"selections": [
|
||||
{
|
||||
"alias": "control",
|
||||
@@ -112,16 +112,16 @@ return {
|
||||
]
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "7ff42b211b319b1a413258ef2242b6e3",
|
||||
"cacheID": "2fa16d62f29015853c425704e3de3fd4",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "ConsoleLayoutBreadcrumbControlOverviewQuery",
|
||||
"name": "OrganizationLayoutBreadcrumbControlOverviewQuery",
|
||||
"operationKind": "query",
|
||||
"text": "query ConsoleLayoutBreadcrumbControlOverviewQuery(\n $controlId: ID!\n) {\n control: node(id: $controlId) {\n __typename\n id\n ... on Control {\n name\n }\n }\n}\n"
|
||||
"text": "query OrganizationLayoutBreadcrumbControlOverviewQuery(\n $controlId: ID!\n) {\n control: node(id: $controlId) {\n __typename\n id\n ... on Control {\n name\n }\n }\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "089c9c977bce592f440e3503f62aee3a";
|
||||
(node as any).hash = "202e114f9b94e9c0bf805b0ae8f69fcd";
|
||||
|
||||
export default node;
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @generated SignedSource<<1706f11580339ff248a8fa9b53862829>>
|
||||
* @generated SignedSource<<733d7a1785075f67a2b120aec123d3d3>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
@@ -9,18 +9,18 @@
|
||||
// @ts-nocheck
|
||||
|
||||
import { ConcreteRequest } from 'relay-runtime';
|
||||
export type ConsoleLayoutBreadcrumbFrameworkOverviewQuery$variables = {
|
||||
export type OrganizationLayoutBreadcrumbFrameworkOverviewQuery$variables = {
|
||||
frameworkId: string;
|
||||
};
|
||||
export type ConsoleLayoutBreadcrumbFrameworkOverviewQuery$data = {
|
||||
export type OrganizationLayoutBreadcrumbFrameworkOverviewQuery$data = {
|
||||
readonly framework: {
|
||||
readonly id: string;
|
||||
readonly name?: string;
|
||||
};
|
||||
};
|
||||
export type ConsoleLayoutBreadcrumbFrameworkOverviewQuery = {
|
||||
response: ConsoleLayoutBreadcrumbFrameworkOverviewQuery$data;
|
||||
variables: ConsoleLayoutBreadcrumbFrameworkOverviewQuery$variables;
|
||||
export type OrganizationLayoutBreadcrumbFrameworkOverviewQuery = {
|
||||
response: OrganizationLayoutBreadcrumbFrameworkOverviewQuery$data;
|
||||
variables: OrganizationLayoutBreadcrumbFrameworkOverviewQuery$variables;
|
||||
};
|
||||
|
||||
const node: ConcreteRequest = (function(){
|
||||
@@ -64,7 +64,7 @@ return {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "ConsoleLayoutBreadcrumbFrameworkOverviewQuery",
|
||||
"name": "OrganizationLayoutBreadcrumbFrameworkOverviewQuery",
|
||||
"selections": [
|
||||
{
|
||||
"alias": "framework",
|
||||
@@ -87,7 +87,7 @@ return {
|
||||
"operation": {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Operation",
|
||||
"name": "ConsoleLayoutBreadcrumbFrameworkOverviewQuery",
|
||||
"name": "OrganizationLayoutBreadcrumbFrameworkOverviewQuery",
|
||||
"selections": [
|
||||
{
|
||||
"alias": "framework",
|
||||
@@ -112,16 +112,16 @@ return {
|
||||
]
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "287decd67859fe4c2248b6d6b0a3d56d",
|
||||
"cacheID": "75003c9ef679845e901b7ecd8c591da7",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "ConsoleLayoutBreadcrumbFrameworkOverviewQuery",
|
||||
"name": "OrganizationLayoutBreadcrumbFrameworkOverviewQuery",
|
||||
"operationKind": "query",
|
||||
"text": "query ConsoleLayoutBreadcrumbFrameworkOverviewQuery(\n $frameworkId: ID!\n) {\n framework: node(id: $frameworkId) {\n __typename\n id\n ... on Framework {\n name\n }\n }\n}\n"
|
||||
"text": "query OrganizationLayoutBreadcrumbFrameworkOverviewQuery(\n $frameworkId: ID!\n) {\n framework: node(id: $frameworkId) {\n __typename\n id\n ... on Framework {\n name\n }\n }\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "a4c4f857eb13cf154a01f70874f0fd58";
|
||||
(node as any).hash = "c8da93cc3207000e73285e126d12a882";
|
||||
|
||||
export default node;
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @generated SignedSource<<6f086aeafe55fd91abdf75b5832f76e8>>
|
||||
* @generated SignedSource<<2a843b85994d7b675c2e0504ea8c687e>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
@@ -9,18 +9,18 @@
|
||||
// @ts-nocheck
|
||||
|
||||
import { ConcreteRequest } from 'relay-runtime';
|
||||
export type ConsoleLayoutBreadcrumbPeopleOverviewQuery$variables = {
|
||||
export type OrganizationLayoutBreadcrumbPeopleOverviewQuery$variables = {
|
||||
peopleId: string;
|
||||
};
|
||||
export type ConsoleLayoutBreadcrumbPeopleOverviewQuery$data = {
|
||||
export type OrganizationLayoutBreadcrumbPeopleOverviewQuery$data = {
|
||||
readonly people: {
|
||||
readonly fullName?: string;
|
||||
readonly id: string;
|
||||
};
|
||||
};
|
||||
export type ConsoleLayoutBreadcrumbPeopleOverviewQuery = {
|
||||
response: ConsoleLayoutBreadcrumbPeopleOverviewQuery$data;
|
||||
variables: ConsoleLayoutBreadcrumbPeopleOverviewQuery$variables;
|
||||
export type OrganizationLayoutBreadcrumbPeopleOverviewQuery = {
|
||||
response: OrganizationLayoutBreadcrumbPeopleOverviewQuery$data;
|
||||
variables: OrganizationLayoutBreadcrumbPeopleOverviewQuery$variables;
|
||||
};
|
||||
|
||||
const node: ConcreteRequest = (function(){
|
||||
@@ -64,7 +64,7 @@ return {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "ConsoleLayoutBreadcrumbPeopleOverviewQuery",
|
||||
"name": "OrganizationLayoutBreadcrumbPeopleOverviewQuery",
|
||||
"selections": [
|
||||
{
|
||||
"alias": "people",
|
||||
@@ -87,7 +87,7 @@ return {
|
||||
"operation": {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Operation",
|
||||
"name": "ConsoleLayoutBreadcrumbPeopleOverviewQuery",
|
||||
"name": "OrganizationLayoutBreadcrumbPeopleOverviewQuery",
|
||||
"selections": [
|
||||
{
|
||||
"alias": "people",
|
||||
@@ -112,16 +112,16 @@ return {
|
||||
]
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "ae4480910071c40c530fabf42d140afd",
|
||||
"cacheID": "3f43dd20847240f85b9e4f7e1d2ae1e6",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "ConsoleLayoutBreadcrumbPeopleOverviewQuery",
|
||||
"name": "OrganizationLayoutBreadcrumbPeopleOverviewQuery",
|
||||
"operationKind": "query",
|
||||
"text": "query ConsoleLayoutBreadcrumbPeopleOverviewQuery(\n $peopleId: ID!\n) {\n people: node(id: $peopleId) {\n __typename\n id\n ... on People {\n fullName\n }\n }\n}\n"
|
||||
"text": "query OrganizationLayoutBreadcrumbPeopleOverviewQuery(\n $peopleId: ID!\n) {\n people: node(id: $peopleId) {\n __typename\n id\n ... on People {\n fullName\n }\n }\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "ffd8d5be8b9b8a930c956c8d292715d8";
|
||||
(node as any).hash = "715ffb6eaef0bdeec2c1a42e17d37ba9";
|
||||
|
||||
export default node;
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @generated SignedSource<<03812f2d66d34ef3636bc7890059f4cf>>
|
||||
* @generated SignedSource<<02beff12353573ba1a8701513b4e9a7e>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
@@ -9,18 +9,18 @@
|
||||
// @ts-nocheck
|
||||
|
||||
import { ConcreteRequest } from 'relay-runtime';
|
||||
export type ConsoleLayoutBreadcrumbPolicyOverviewQuery$variables = {
|
||||
export type OrganizationLayoutBreadcrumbPolicyOverviewQuery$variables = {
|
||||
policyId: string;
|
||||
};
|
||||
export type ConsoleLayoutBreadcrumbPolicyOverviewQuery$data = {
|
||||
export type OrganizationLayoutBreadcrumbPolicyOverviewQuery$data = {
|
||||
readonly policy: {
|
||||
readonly id: string;
|
||||
readonly name?: string;
|
||||
};
|
||||
};
|
||||
export type ConsoleLayoutBreadcrumbPolicyOverviewQuery = {
|
||||
response: ConsoleLayoutBreadcrumbPolicyOverviewQuery$data;
|
||||
variables: ConsoleLayoutBreadcrumbPolicyOverviewQuery$variables;
|
||||
export type OrganizationLayoutBreadcrumbPolicyOverviewQuery = {
|
||||
response: OrganizationLayoutBreadcrumbPolicyOverviewQuery$data;
|
||||
variables: OrganizationLayoutBreadcrumbPolicyOverviewQuery$variables;
|
||||
};
|
||||
|
||||
const node: ConcreteRequest = (function(){
|
||||
@@ -64,7 +64,7 @@ return {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "ConsoleLayoutBreadcrumbPolicyOverviewQuery",
|
||||
"name": "OrganizationLayoutBreadcrumbPolicyOverviewQuery",
|
||||
"selections": [
|
||||
{
|
||||
"alias": "policy",
|
||||
@@ -87,7 +87,7 @@ return {
|
||||
"operation": {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Operation",
|
||||
"name": "ConsoleLayoutBreadcrumbPolicyOverviewQuery",
|
||||
"name": "OrganizationLayoutBreadcrumbPolicyOverviewQuery",
|
||||
"selections": [
|
||||
{
|
||||
"alias": "policy",
|
||||
@@ -112,16 +112,16 @@ return {
|
||||
]
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "2c38760f04efaf9b41d6b2abb17c2074",
|
||||
"cacheID": "a7bbb574545c752bde0eba468ec494d7",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "ConsoleLayoutBreadcrumbPolicyOverviewQuery",
|
||||
"name": "OrganizationLayoutBreadcrumbPolicyOverviewQuery",
|
||||
"operationKind": "query",
|
||||
"text": "query ConsoleLayoutBreadcrumbPolicyOverviewQuery(\n $policyId: ID!\n) {\n policy: node(id: $policyId) {\n __typename\n id\n ... on Policy {\n name\n }\n }\n}\n"
|
||||
"text": "query OrganizationLayoutBreadcrumbPolicyOverviewQuery(\n $policyId: ID!\n) {\n policy: node(id: $policyId) {\n __typename\n id\n ... on Policy {\n name\n }\n }\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "f2a356a6aa9b98ca13dde3b82e2e868a";
|
||||
(node as any).hash = "90b9df71a590d79f4e083aa117ad7302";
|
||||
|
||||
export default node;
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @generated SignedSource<<266ca8730d2832be4d4c96d325c3e4ab>>
|
||||
* @generated SignedSource<<d0ab5ff850203d4209b0d189e8c28b7c>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
@@ -9,18 +9,18 @@
|
||||
// @ts-nocheck
|
||||
|
||||
import { ConcreteRequest } from 'relay-runtime';
|
||||
export type ConsoleLayoutBreadcrumbVendorOverviewQuery$variables = {
|
||||
export type OrganizationLayoutBreadcrumbVendorOverviewQuery$variables = {
|
||||
vendorId: string;
|
||||
};
|
||||
export type ConsoleLayoutBreadcrumbVendorOverviewQuery$data = {
|
||||
export type OrganizationLayoutBreadcrumbVendorOverviewQuery$data = {
|
||||
readonly vendor: {
|
||||
readonly id: string;
|
||||
readonly name?: string;
|
||||
};
|
||||
};
|
||||
export type ConsoleLayoutBreadcrumbVendorOverviewQuery = {
|
||||
response: ConsoleLayoutBreadcrumbVendorOverviewQuery$data;
|
||||
variables: ConsoleLayoutBreadcrumbVendorOverviewQuery$variables;
|
||||
export type OrganizationLayoutBreadcrumbVendorOverviewQuery = {
|
||||
response: OrganizationLayoutBreadcrumbVendorOverviewQuery$data;
|
||||
variables: OrganizationLayoutBreadcrumbVendorOverviewQuery$variables;
|
||||
};
|
||||
|
||||
const node: ConcreteRequest = (function(){
|
||||
@@ -64,7 +64,7 @@ return {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "ConsoleLayoutBreadcrumbVendorOverviewQuery",
|
||||
"name": "OrganizationLayoutBreadcrumbVendorOverviewQuery",
|
||||
"selections": [
|
||||
{
|
||||
"alias": "vendor",
|
||||
@@ -87,7 +87,7 @@ return {
|
||||
"operation": {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Operation",
|
||||
"name": "ConsoleLayoutBreadcrumbVendorOverviewQuery",
|
||||
"name": "OrganizationLayoutBreadcrumbVendorOverviewQuery",
|
||||
"selections": [
|
||||
{
|
||||
"alias": "vendor",
|
||||
@@ -112,16 +112,16 @@ return {
|
||||
]
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "d0b39b21eec610e1162705b7e2799468",
|
||||
"cacheID": "cdf321fbd087d345096d8af142d99608",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "ConsoleLayoutBreadcrumbVendorOverviewQuery",
|
||||
"name": "OrganizationLayoutBreadcrumbVendorOverviewQuery",
|
||||
"operationKind": "query",
|
||||
"text": "query ConsoleLayoutBreadcrumbVendorOverviewQuery(\n $vendorId: ID!\n) {\n vendor: node(id: $vendorId) {\n __typename\n id\n ... on Vendor {\n name\n }\n }\n}\n"
|
||||
"text": "query OrganizationLayoutBreadcrumbVendorOverviewQuery(\n $vendorId: ID!\n) {\n vendor: node(id: $vendorId) {\n __typename\n id\n ... on Vendor {\n name\n }\n }\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "20bb1420f2d13cf7974591da5e6b654f";
|
||||
(node as any).hash = "41b87834c3e5625381d8434930cf29db";
|
||||
|
||||
export default node;
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @generated SignedSource<<93800eee21fa3f30cc45da37370359fd>>
|
||||
* @generated SignedSource<<c8aadda28109f223c394a98b8ac9c14e>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
@@ -9,17 +9,17 @@
|
||||
// @ts-nocheck
|
||||
|
||||
import { ConcreteRequest } from 'relay-runtime';
|
||||
export type ConsoleLayoutOrganizationQuery$variables = {
|
||||
export type OrganizationLayoutOrganizationQuery$variables = {
|
||||
organizationId: string;
|
||||
};
|
||||
export type ConsoleLayoutOrganizationQuery$data = {
|
||||
export type OrganizationLayoutOrganizationQuery$data = {
|
||||
readonly organization: {
|
||||
readonly name?: string;
|
||||
};
|
||||
};
|
||||
export type ConsoleLayoutOrganizationQuery = {
|
||||
response: ConsoleLayoutOrganizationQuery$data;
|
||||
variables: ConsoleLayoutOrganizationQuery$variables;
|
||||
export type OrganizationLayoutOrganizationQuery = {
|
||||
response: OrganizationLayoutOrganizationQuery$data;
|
||||
variables: OrganizationLayoutOrganizationQuery$variables;
|
||||
};
|
||||
|
||||
const node: ConcreteRequest = (function(){
|
||||
@@ -56,7 +56,7 @@ return {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "ConsoleLayoutOrganizationQuery",
|
||||
"name": "OrganizationLayoutOrganizationQuery",
|
||||
"selections": [
|
||||
{
|
||||
"alias": "organization",
|
||||
@@ -78,7 +78,7 @@ return {
|
||||
"operation": {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Operation",
|
||||
"name": "ConsoleLayoutOrganizationQuery",
|
||||
"name": "OrganizationLayoutOrganizationQuery",
|
||||
"selections": [
|
||||
{
|
||||
"alias": "organization",
|
||||
@@ -109,16 +109,16 @@ return {
|
||||
]
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "e275faa366380b1b423251e6a06ab743",
|
||||
"cacheID": "f4716079c4ca6a1012c7044a3328af01",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "ConsoleLayoutOrganizationQuery",
|
||||
"name": "OrganizationLayoutOrganizationQuery",
|
||||
"operationKind": "query",
|
||||
"text": "query ConsoleLayoutOrganizationQuery(\n $organizationId: ID!\n) {\n organization: node(id: $organizationId) {\n __typename\n ... on Organization {\n name\n }\n id\n }\n}\n"
|
||||
"text": "query OrganizationLayoutOrganizationQuery(\n $organizationId: ID!\n) {\n organization: node(id: $organizationId) {\n __typename\n ... on Organization {\n name\n }\n id\n }\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "3310c40eb8f1e3874139c934fb08cbb1";
|
||||
(node as any).hash = "878d0ca4790ce128c108f29135074919";
|
||||
|
||||
export default node;
|
||||
@@ -15,7 +15,6 @@ import { Badge } from "@/components/ui/badge";
|
||||
import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs";
|
||||
import type { PolicyOverviewPageQuery as PolicyOverviewPageQueryType } from "./__generated__/PolicyOverviewPageQuery.graphql";
|
||||
import type { PolicyOverviewPageDeleteMutation } from "./__generated__/PolicyOverviewPageDeleteMutation.graphql";
|
||||
import "../styles/policy-content.css";
|
||||
import { useToast } from "@/hooks/use-toast";
|
||||
import { PageTemplate, PageTemplateSkeleton } from "@/components/PageTemplate";
|
||||
|
||||
Reference in New Issue
Block a user