quest-vorteq/src/components/layout/breadcrumb.tsx
Lorentz a67558de23 feat(F-008,F-009,F-010): complete Phase 1 foundation with middleware, navigation, and migrations
Implements authentication middleware with rate limiting, comprehensive permission
system, full portal navigation with sidebar and header, company selection flow,
and data migration tooling from SQL Server to PostgreSQL.

Key additions:
- Middleware: auth guards, rate limiting, session management
- Permissions: role-based access control with hierarchical permission rules
- Navigation: responsive sidebar with expandable sections, header with notifications
- Company selector: multi-company user support with session-based active company
- Data migration: comprehensive script for migrating auth and quest domain tables
- Schema: added auth_user_type_permission_group junction table

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-16 11:07:44 +00:00

59 lines
1.5 KiB
TypeScript

'use client';
import Link from 'next/link';
import { usePathname } from 'next/navigation';
import { ChevronRight, Home } from 'lucide-react';
import { Fragment } from 'react';
export function Breadcrumb() {
const pathname = usePathname();
// Generate breadcrumb items from pathname
const segments = pathname.split('/').filter(Boolean);
// Don't show breadcrumb on dashboard
if (segments.length === 0 || pathname === '/dashboard') {
return null;
}
const breadcrumbItems = segments.map((segment, index) => {
const href = '/' + segments.slice(0, index + 1).join('/');
const label = segment
.split('-')
.map((word) => word.charAt(0).toUpperCase() + word.slice(1))
.join(' ');
return {
label,
href,
isLast: index === segments.length - 1,
};
});
return (
<nav className="mb-4 flex items-center space-x-2 text-sm text-muted-foreground">
<Link
href="/dashboard"
className="flex items-center transition-colors hover:text-foreground"
>
<Home className="h-4 w-4" />
</Link>
{breadcrumbItems.map((item) => (
<Fragment key={item.href}>
<ChevronRight className="h-4 w-4" />
{item.isLast ? (
<span className="font-medium text-foreground">{item.label}</span>
) : (
<Link
href={item.href}
className="transition-colors hover:text-foreground"
>
{item.label}
</Link>
)}
</Fragment>
))}
</nav>
);
}