diff --git a/Client/src/Components/Sidebar/index.jsx b/Client/src/Components/Sidebar/index.jsx
index ec374a008..6d5250a76 100644
--- a/Client/src/Components/Sidebar/index.jsx
+++ b/Client/src/Components/Sidebar/index.jsx
@@ -183,7 +183,7 @@ function Sidebar() {
This is the top lever for styles
*/
sx={{
- position: 'relative',
+ position: "relative",
border: 1,
borderColor: theme.palette.primary.lowContrast,
borderRadius: theme.shape.borderRadius,
@@ -304,86 +304,55 @@ function Sidebar() {
-
+
+
+ ) : (
+ /* TODO Do we ever get here? If item does not have a path and collapsed state is false */
+
+
+ setOpen((prev) => ({
+ ...Object.fromEntries(Object.keys(prev).map((key) => [key, false])),
+ [item.name]: !prev[item.name],
+ }))
+ }
+ sx={{
+ gap: theme.spacing(4),
+ borderRadius: theme.shape.borderRadius,
+ px: theme.spacing(4),
+ }}
+ >
+ {item.icon}
+ {item.name}
+ {open[`${item.name}`] ? : }
+
+
+
+ {item.nested.map((child) => {
+ if (
+ child.name === "Team" &&
+ authState.user?.role &&
+ !authState.user.role.includes("superadmin")
+ ) {
+ return null;
+ }
+
+ return (
+ {
+ const url = URL_MAP[child.path];
+ if (url) {
+ window.open(url, "_blank", "noreferrer");
+ } else {
+ navigate(`/${child.path}`);
+ }
+ }}
+ sx={{
+ gap: theme.spacing(4),
+ borderRadius: theme.shape.borderRadius,
+ pl: theme.spacing(4),
+ "&::before": {
+ content: `""`,
+ position: "absolute",
+ top: 0,
+ left: "-7px",
+ height: "100%",
+ borderLeft: 1,
+ borderLeftColor: theme.palette.primary.lowContrast,
+ },
+ "&:last-child::before": {
+ height: "50%",
+ },
+ "&::after": {
+ content: `""`,
+ position: "absolute",
+ top: "45%",
+ left: "-8px",
+ height: "3px",
+ width: "3px",
+ borderRadius: "50%",
+ backgroundColor: theme.palette.primary.lowContrast,
+ },
+ "&.selected-path::after": {
+ /* TODO what is this selector doing? */
+ backgroundColor: theme.palette.primary.contrastTextTertiary,
+ transform: "scale(1.2)",
+ },
+ }}
+ >
+ {child.icon}
+ {child.name}
+
+ );
+ })}
+
+
+
+ );
+ })}
+