Track HiveGrid Cloud planning reference
This commit is contained in:
1 parent
b3d5ea6764
commit
e341c5938a
5784 files changed
+1104929
-3
No files matched your search
@@ -0,0 +1,95 @@
|
||||
import { LoaderFunctionArgs, MetaFunction } from "react-router";
|
||||
import { Outlet } from "react-router";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import ServerError from "~/components/ui/errors/ServerError";
|
||||
import SidebarIconsLayout from "~/components/ui/layouts/SidebarIconsLayout";
|
||||
import UserIcon from "~/components/ui/icons/UserIcon";
|
||||
import CustomerIcon from "~/components/ui/icons/settings/CustomerIcon";
|
||||
import CustomerIconFilled from "~/components/ui/icons/settings/CustomerIconFilled";
|
||||
import CompanyIcon from "~/components/ui/icons/crm/CompanyIcon";
|
||||
import CompanyIconFilled from "~/components/ui/icons/crm/CompanyIconFilled";
|
||||
import { LinkIcon, LockIcon, NoSymbolIcon, ServerStackIcon } from "~/components/ui/icons/vendor";
|
||||
import { useRootData } from "~/utils/data/useRootData";
|
||||
import { adminPath } from "~/utils/app/CanonicalUrlUtils";
|
||||
|
||||
type LoaderData = {
|
||||
title: string;
|
||||
};
|
||||
|
||||
export const loader = async ({ request, params }: LoaderFunctionArgs) => {
|
||||
const data: LoaderData = {
|
||||
title: "",
|
||||
};
|
||||
return data;
|
||||
};
|
||||
|
||||
export const meta: MetaFunction<typeof loader> = ({ data }) => [{ title: data?.title }];
|
||||
|
||||
export default () => {
|
||||
const { t } = useTranslation();
|
||||
const { appConfiguration } = useRootData();
|
||||
return <Outlet />;
|
||||
return (
|
||||
<SidebarIconsLayout
|
||||
label={{ align: "right" }}
|
||||
items={[
|
||||
{
|
||||
name: t("admin.tenants.title"),
|
||||
href: adminPath("accounts", { mode: "host-aware" }),
|
||||
exact: true,
|
||||
// permission: "admin.accounts.view",
|
||||
icon: <CompanyIcon className="text-muted-foreground h-5 w-5 shrink-0" aria-hidden="true" />,
|
||||
iconSelected: <CompanyIcon className="text-muted-foreground h-5 w-5 shrink-0" aria-hidden="true" />,
|
||||
},
|
||||
{
|
||||
name: t("models.user.plural"),
|
||||
href: adminPath("accounts/users", { mode: "host-aware" }),
|
||||
// permission: "admin.users.view",
|
||||
icon: <CustomerIcon className="text-muted-foreground h-5 w-5 shrink-0" aria-hidden="true" />,
|
||||
iconSelected: <CustomerIcon className="text-muted-foreground h-5 w-5 shrink-0" aria-hidden="true" />,
|
||||
},
|
||||
{
|
||||
name: t("app.sidebar.rolesAndPermissions"),
|
||||
href: adminPath("accounts/roles-and-permissions", { mode: "host-aware" }),
|
||||
// permission: "admin.roles.view",
|
||||
icon: <LockIcon className="text-muted-foreground h-5 w-5 shrink-0" aria-hidden="true" />,
|
||||
iconSelected: <LockIcon className="text-muted-foreground h-5 w-5 shrink-0" aria-hidden="true" />,
|
||||
},
|
||||
{
|
||||
name: t("admin.accounts.navigation.relationships"),
|
||||
href: adminPath("accounts/relationships", { mode: "host-aware" }),
|
||||
// permission: "admin.relationships.view",
|
||||
hidden: !appConfiguration.app.features.tenantTypes,
|
||||
icon: <LinkIcon className="text-muted-foreground h-5 w-5 shrink-0" aria-hidden="true" />,
|
||||
iconSelected: <LinkIcon className="text-muted-foreground h-5 w-5 shrink-0" aria-hidden="true" />,
|
||||
},
|
||||
{
|
||||
name: t("admin.accounts.navigation.subscriptions"),
|
||||
href: adminPath("accounts/subscriptions", { mode: "host-aware" }),
|
||||
// permission: "admin.relationships.view",
|
||||
hidden: true,
|
||||
},
|
||||
{
|
||||
name: t("models.blacklist.object"),
|
||||
href: adminPath("accounts/blacklist", { mode: "host-aware" }),
|
||||
// permission: "admin.blacklist.view",
|
||||
icon: <NoSymbolIcon className="text-muted-foreground h-5 w-5 shrink-0" aria-hidden="true" />,
|
||||
iconSelected: <NoSymbolIcon className="text-muted-foreground h-5 w-5 shrink-0" aria-hidden="true" />,
|
||||
},
|
||||
{
|
||||
name: t("models.tenantIpAddress.plural"),
|
||||
href: adminPath("accounts/ip-addresses", { mode: "host-aware" }),
|
||||
// permission: "admin.tenantIpAddress.view",
|
||||
icon: <ServerStackIcon className="text-muted-foreground h-5 w-5 shrink-0" aria-hidden="true" />,
|
||||
iconSelected: <ServerStackIcon className="text-muted-foreground h-5 w-5 shrink-0" aria-hidden="true" />,
|
||||
},
|
||||
]}
|
||||
>
|
||||
<Outlet />
|
||||
</SidebarIconsLayout>
|
||||
);
|
||||
};
|
||||
|
||||
export function ErrorBoundary() {
|
||||
return <ServerError />;
|
||||
}
|
||||
Reference in new issue
Block a user