feat: add Environment Report links to Sidebar and Dashboard
This commit is contained in:
parent
dc403c29f5
commit
64d7d56792
2 changed files with 13 additions and 2 deletions
|
|
@ -18,6 +18,7 @@ import {
|
|||
ClipboardList,
|
||||
Grid3X3,
|
||||
Cloud,
|
||||
Activity,
|
||||
type LucideIcon
|
||||
} from 'lucide-react';
|
||||
|
||||
|
|
@ -116,7 +117,8 @@ export const NAV_SECTIONS: NavSection[] = [
|
|||
label: 'Analytics',
|
||||
minRole: 'STAFF',
|
||||
items: [
|
||||
{ id: 'reports', label: 'Reports', path: '/reports', icon: BarChart3 },
|
||||
{ id: 'env-report', label: 'Environment Report', path: '/reports/environment', icon: Activity },
|
||||
{ id: 'reports', label: 'All Reports', path: '/reports', icon: BarChart3 },
|
||||
{ id: 'financial', label: 'Financial', path: '/financial', icon: DollarSign, minRole: 'MANAGER' },
|
||||
{ id: 'insights', label: 'AI Insights', path: '/insights', icon: Brain, minRole: 'MANAGER' },
|
||||
]
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
import { useState, useEffect } from 'react';
|
||||
import { Link } from 'react-router-dom';
|
||||
import {
|
||||
Thermometer, Droplets, Wind, Sun, AlertTriangle,
|
||||
Activity, Settings, RefreshCw, ChevronRight, Wifi, WifiOff, Bell
|
||||
Activity, Settings, RefreshCw, ChevronRight, Wifi, WifiOff, Bell, FileText
|
||||
} from 'lucide-react';
|
||||
import api from '../lib/api';
|
||||
import { PageHeader, MetricCard, EmptyState, CardSkeleton } from '../components/ui/LinearPrimitives';
|
||||
|
|
@ -160,6 +161,14 @@ export default function EnvironmentDashboard() {
|
|||
subtitle="Real-time sensor data and alerts"
|
||||
actions={
|
||||
<div className="flex items-center gap-3">
|
||||
<Link
|
||||
to="/reports/environment"
|
||||
className="hidden sm:flex items-center gap-2 px-3 py-1.5 text-xs font-medium text-[var(--color-text-primary)] bg-[var(--color-bg-tertiary)] hover:bg-[var(--color-bg-secondary)] border border-[var(--color-border-subtle)] rounded-full transition-colors"
|
||||
>
|
||||
<FileText size={14} className="text-[var(--color-text-secondary)]" />
|
||||
Report
|
||||
</Link>
|
||||
|
||||
{/* Live indicator */}
|
||||
<div className="flex items-center gap-2 px-3 py-1.5 rounded-full bg-[var(--color-bg-tertiary)]">
|
||||
{wsConnected ? (
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue