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"

View file

@ -27,7 +27,7 @@ export const StyledDataGrid: FC<StyledDataGridProps> = ({
columns,
rows,
onRowClick,
height = "calc(100vh - 20px)",
height = "100%",
selectedRows,
setSelectedRows,
}) => {
@ -43,6 +43,9 @@ export const StyledDataGrid: FC<StyledDataGridProps> = ({
border: 0,
width: "100%",
height,
".MuiDataGrid-row": {
cursor: "pointer",
},
".MuiDataGrid-row:nth-of-type(1n)": {
backgroundColor: "#f3f3f3",
},
@ -66,12 +69,14 @@ export const StyledDataGrid: FC<StyledDataGridProps> = ({
rows={rows}
columns={columns}
density="compact"
hideFooter
pagination
initialState={{
pagination: { paginationModel: { pageSize: 20 } },
}}
pageSizeOptions={[5, 10, 25]}
paginationMode="client"
sx={{ height }}
rowBuffer={30}
checkboxSelection={!!setSelectedRows}
onRowSelectionModelChange={setSelectedRows}
rowSelectionModel={selectedRows}
rowHeight={46}
scrollbarSize={0}
disableVirtualization