Major product upgrade: landing page, scanning UI, admin panel, working reports
Frontend: - New public marketing landing page at / (hero, features, stats, how-it-works, CTA) - New /scans page surfacing the scanning engine: asset health grid, one-click full scan, live scanner findings feed, 24h stats - New /admin panel (was a 404 from the sidebar): audit report generation and instant PDF snapshot download - Reports page: now visible to all roles, working PDF downloads, posture snapshot export for IT/admin - Findings page: full-text search, sorting (severity/newest/title), severity count chips, CSV export - Dashboard: scan activity strip, Run Scan + Export PDF quick actions - Footprint page: summary stat cards - api.ts: scanning, reports, and PDF download endpoints + types; fixed missing resolution_note on Finding type - Removed unsupported eslint key from next.config.ts Backend: - Audit reports: list/get/PDF now open to executives and IT admins with strict tenant isolation (was trustos_admin-only, leaving tenants unable to see their own reports); PDF snapshot open to IT admins; generation stays admin-only Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -3,12 +3,13 @@ import Link from "next/link";
|
||||
import { usePathname } from "next/navigation";
|
||||
import { useAuth } from "@/hooks/useAuth";
|
||||
import {
|
||||
LayoutDashboard, Shield, Search, FileText, Settings, LogOut, ChevronRight
|
||||
LayoutDashboard, Shield, Search, FileText, Settings, LogOut, Radar
|
||||
} from "lucide-react";
|
||||
|
||||
const NAV = [
|
||||
{ href: "/dashboard", icon: LayoutDashboard, label: "Vault Dashboard" },
|
||||
{ href: "/findings", icon: Shield, label: "Findings" },
|
||||
{ href: "/scans", icon: Radar, label: "Scanning", roles: ["it_admin", "trustos_admin"] },
|
||||
{ href: "/footprint", icon: Search, label: "Digital Footprint" },
|
||||
{ href: "/reports", icon: FileText, label: "Audit Reports" },
|
||||
];
|
||||
@@ -40,7 +41,7 @@ export default function Sidebar() {
|
||||
{/* Nav */}
|
||||
<nav className="flex-1 px-3 py-4 overflow-y-auto">
|
||||
<div className="space-y-0.5">
|
||||
{NAV.map(({ href, icon: Icon, label }) => {
|
||||
{NAV.filter(item => !item.roles || (role && item.roles.includes(role))).map(({ href, icon: Icon, label }) => {
|
||||
const active = pathname === href || pathname.startsWith(href + "/");
|
||||
return (
|
||||
<Link
|
||||
|
||||
Reference in New Issue
Block a user