UI changes

This commit is contained in:
2026-10-02 13:17:32 +05:30
parent bfd3e5cded
commit 9707ef596c
3 changed files with 99 additions and 8 deletions
@@ -38,7 +38,7 @@ import {
TooltipTrigger,
} from '@/components/ui/tooltip'
import { useAuth, type Role } from '@/contexts/auth-context'
import { DASHBOARD_ITEM, NAV_GROUPS, type NavGroup, type NavItem } from '@/config/nav'
import { DASHBOARD_ITEM, CONFIGURATION_ITEM, NAV_GROUPS, type NavGroup, type NavItem } from '@/config/nav'
function canSee(item: NavItem, permissions: string[]): boolean {
if (!item.permission) return true
@@ -54,6 +54,8 @@ export function AppSidebar() {
const pathname = usePathname()
const dashboardActive = pathname === DASHBOARD_ITEM.href
const configurationActive =
pathname === CONFIGURATION_ITEM.href || pathname.startsWith(CONFIGURATION_ITEM.href + '/')
const [openGroups, setOpenGroups] = useState<Record<string, boolean>>({})
useEffect(() => {
@@ -182,6 +184,22 @@ export function AppSidebar() {
</Collapsible>
)
})}
{/* Configuration — standalone, no sub-nav */}
<SidebarGroup className="py-1">
<SidebarMenu>
<SidebarMenuItem>
<SidebarMenuButton
render={<Link href={CONFIGURATION_ITEM.href} />}
isActive={configurationActive}
tooltip={CONFIGURATION_ITEM.title}
>
<HugeiconsIcon icon={CONFIGURATION_ITEM.icon} size={18} />
<span>{CONFIGURATION_ITEM.title}</span>
</SidebarMenuButton>
</SidebarMenuItem>
</SidebarMenu>
</SidebarGroup>
</SidebarContent>
<SidebarFooter>