feat(l1): drafts + tickets pages + coverage banner + seat counter widget
L1DraftsPage is a Phase 1 placeholder (AI drafts arrive in Phase 2). L1TicketsPage replaces the stub with a status-filterable internal-tickets queue. L1CoverageBanner renders inside L1RouteGuard so every /l1/* page shows it for engineer-coverers (hidden for native L1). SeatCounterWidget + /api/seats.ts surface engineer + L1 seat usage from the /accounts/me/ seats endpoint (T9). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -1,10 +1,18 @@
|
||||
import { Navigate } from 'react-router-dom'
|
||||
import { usePermissions } from '@/hooks/usePermissions'
|
||||
import { L1CoverageBanner } from '@/components/l1/L1CoverageBanner'
|
||||
|
||||
export function L1RouteGuard({ children }: { children: React.ReactNode }) {
|
||||
const { canUseL1Surface } = usePermissions()
|
||||
if (!canUseL1Surface) {
|
||||
return <Navigate to="/" replace />
|
||||
}
|
||||
return <>{children}</>
|
||||
return (
|
||||
<div className="flex flex-col h-full">
|
||||
<L1CoverageBanner />
|
||||
<div className="flex-1 min-h-0 flex flex-col">
|
||||
{children}
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user