Link ticket fixes #1

This commit is contained in:
Darren Clarke 2023-10-02 14:22:48 +02:00
parent 1443a61164
commit d9ce2f5883
21 changed files with 617 additions and 583 deletions

View file

@ -25,6 +25,7 @@ import {
Dvr as DvrIcon,
Assessment as AssessmentIcon,
LibraryBooks as LibraryBooksIcon,
School as SchoolIcon,
} from "@mui/icons-material";
import { usePathname } from "next/navigation";
import Link from "next/link";
@ -33,6 +34,7 @@ import LinkLogo from "public/link-logo-small.png";
import { useSession, signOut } from "next-auth/react";
import { getTicketOverviewCountsQuery } from "app/_graphql/getTicketOverviewCountsQuery";
console.log;
const openWidth = 270;
const closedWidth = 100;
@ -163,7 +165,6 @@ interface SidebarProps {
export const Sidebar: FC<SidebarProps> = ({ open, setOpen }) => {
const pathname = usePathname();
const { data: session } = useSession();
console.log({ session });
const username = session?.user?.name || "User";
// @ts-ignore
const roles = session?.user?.roles || [];
@ -436,11 +437,19 @@ export const Sidebar: FC<SidebarProps> = ({ open, setOpen }) => {
<MenuItem
name="Knowledge Base"
href="/knowledge"
Icon={LibraryBooksIcon}
Icon={SchoolIcon}
iconSize={20}
selected={pathname.endsWith("/knowledge")}
open={open}
/>
<MenuItem
name="Documentation"
href="/docs"
Icon={LibraryBooksIcon}
iconSize={20}
selected={pathname.endsWith("/docs")}
open={open}
/>
<MenuItem
name="Reporting"
href="/reporting"