diff --git a/src/components/Sidebar.tsx b/src/components/Sidebar.tsx
index d551f7a3..8e685c7b 100644
--- a/src/components/Sidebar.tsx
+++ b/src/components/Sidebar.tsx
@@ -12,6 +12,10 @@ import {
BsCurrencyDollar,
BsClipboardData,
BsPeople,
+ BsChevronDown,
+ BsChevronUp,
+ BsChatText,
+ BsCardText,
} from "react-icons/bs";
import { GoWorkflow } from "react-icons/go";
import { CiDumbbell } from "react-icons/ci";
@@ -31,7 +35,7 @@ import {
useAllowedEntities,
useAllowedEntitiesSomePermissions,
} from "@/hooks/useEntityPermissions";
-import { useMemo } from "react";
+import { useMemo, useState } from "react";
import { PermissionType } from "../interfaces/permissions";
interface Props {
@@ -52,6 +56,7 @@ interface NavProps {
disabled?: boolean;
isMinimized?: boolean;
badge?: number;
+ children?: React.ReactNode;
}
const Nav = ({
@@ -62,34 +67,71 @@ const Nav = ({
disabled = false,
isMinimized = false,
badge,
+ children,
}: NavProps) => {
+ const [open, setOpen] = useState(false);
return (
-
-
- {!isMinimized && {label}}
- {!!badge && badge > 0 && (
-
- {badge}
-
- )}
-
+
+
+ {!isMinimized && {label}}
+ {!!badge && badge > 0 && (
+
+ {badge}
+
+ )}
+ {children && (
+
+ )}
+
+ {open || isMinimized ? children : null}
+
);
};
@@ -325,7 +367,24 @@ export default function Sidebar({
path={path}
keyPath="/training"
isMinimized={isMinimized}
- />
+ >
+
+
+
)}
{sidebarPermissions["viewPaymentRecords"] && (
+ >
+
+
+
)}
{sidebarPermissions["viewPaymentRecords"] && (