Ticket edit updates

This commit is contained in:
Darren Clarke 2024-08-07 15:25:53 +02:00
parent 2568547384
commit 87724bb7b8
9 changed files with 297 additions and 352 deletions

View file

@ -151,7 +151,7 @@ const MenuItem = ({
}
/>
)}
{badge && badge > 0 ? (
{open && badge && badge > 0 ? (
<ListItemSecondaryAction>
<Typography
color="textSecondary"
@ -197,7 +197,6 @@ export const Sidebar: FC<SidebarProps> = ({
useEffect(() => {
const fetchCounts = async () => {
const counts = await getOverviewTicketCountsAction();
console.log({ counts });
setOverviewCounts(counts);
};
@ -422,8 +421,9 @@ export const Sidebar: FC<SidebarProps> = ({
/>
<Collapse
in={
pathname.startsWith("/overview") ||
pathname.startsWith("/tickets")
open &&
(pathname.startsWith("/overview") ||
pathname.startsWith("/tickets"))
}
timeout="auto"
unmountOnExit
@ -512,7 +512,7 @@ export const Sidebar: FC<SidebarProps> = ({
/>
)}
<Collapse
in={pathname.startsWith("/leafcutter")}
in={open && pathname.startsWith("/leafcutter")}
timeout="auto"
unmountOnExit
onClick={undefined}
@ -575,7 +575,7 @@ export const Sidebar: FC<SidebarProps> = ({
open={open}
/>
<Collapse
in={pathname.startsWith("/admin/")}
in={open && pathname.startsWith("/admin/")}
timeout="auto"
unmountOnExit
onClick={undefined}
@ -588,7 +588,7 @@ export const Sidebar: FC<SidebarProps> = ({
open={open}
/>
<Collapse
in={pathname.startsWith("/admin/bridge")}
in={open && pathname.startsWith("/admin/bridge")}
timeout="auto"
unmountOnExit
onClick={undefined}