From 2b9672fedffe6f95d9c722406add01080cb9d394 Mon Sep 17 00:00:00 2001 From: Darren Clarke Date: Fri, 2 Dec 2022 17:45:14 +0100 Subject: [PATCH] Add new pages --- components/Sidebar.tsx | 134 ++++++++++++++++++++++++++++++----- components/ZammadWrapper.tsx | 43 +++++++++++ pages/assigned.tsx | 30 ++++++++ pages/index.tsx | 69 ++++++------------ pages/leafcutter.tsx | 36 ++++++++++ pages/link.tsx | 30 ++++++++ pages/pending.tsx | 30 ++++++++ pages/profile.tsx | 33 +++++++++ pages/settings.tsx | 33 +++++++++ pages/unassigned.tsx | 30 ++++++++ pages/urgent.tsx | 30 ++++++++ 11 files changed, 432 insertions(+), 66 deletions(-) create mode 100644 components/ZammadWrapper.tsx create mode 100644 pages/assigned.tsx create mode 100644 pages/leafcutter.tsx create mode 100644 pages/link.tsx create mode 100644 pages/pending.tsx create mode 100644 pages/profile.tsx create mode 100644 pages/settings.tsx create mode 100644 pages/unassigned.tsx create mode 100644 pages/urgent.tsx diff --git a/components/Sidebar.tsx b/components/Sidebar.tsx index 11dd13e..cdaa9bd 100644 --- a/components/Sidebar.tsx +++ b/components/Sidebar.tsx @@ -8,39 +8,57 @@ import { ListItemIcon, ListItemText, Drawer, + Accordion, + AccordionSummary, + AccordionDetails, } from "@mui/material"; +import { + FeaturedPlayList as FeaturedPlayListIcon, + Person as PersonIcon, + Analytics as AnalyticsIcon, + Logout as LogoutIcon, + Cottage as CottageIcon, + Settings as SettingsIcon, +} from "@mui/icons-material"; import Link from "next/link"; -const MenuItem = ({ name, href, iconSize }: any) => ( +const MenuItem = ({ name, href, Icon, iconSize, indent = 0 }: any) => ( - + - {/* */} + {iconSize > 0 && } a": { + textDecoration: "none !important", + }, + "a:visited": { + textDecoration: "none !important", + }, + border: 0, }} > {name} @@ -58,7 +76,7 @@ interface SidebarProps { export const Sidebar: FC = ({ open }) => ( = ({ open }) => ( sx: { width: 300, border: 0, - - backgroundColor: "black !important", }, }} > @@ -76,15 +92,95 @@ export const Sidebar: FC = ({ open }) => ( direction="column" justifyContent="space-between" wrap="nowrap" - sx={{ backgroundColor: "black", height: "100%" }} + sx={{ backgroundColor: "#25272A", height: "100%", p: 2 }} > + + + Hello + + + + + Agent/User + + + + + - - - - - + + + + + + + + + + + + + + + + + diff --git a/components/ZammadWrapper.tsx b/components/ZammadWrapper.tsx new file mode 100644 index 0000000..edaec8d --- /dev/null +++ b/components/ZammadWrapper.tsx @@ -0,0 +1,43 @@ +import { FC, useState } from "react"; +import Iframe from "react-iframe"; + +type ZammadWrapperProps = { + url: string; + hideSidebar?: boolean; +}; + +export const ZammadWrapper: FC = ({ + url, + hideSidebar = true, +}) => { + const [display, setDisplay] = useState("none"); + + return ( +