import { showToast } from '../../stores/toastStore'; import ServiceContextSelector from './ServiceContextSelector'; const NAV_ITEMS = [ { key: 'dashboard', label: 'Dashboard' }, { key: 'work-orders', label: 'Putni nalozi' }, { key: 'service-records', label: 'Servisni zapisi' }, { key: 'cranes', label: 'Dizalice' }, { key: 'clients', label: 'Klijenti' }, ]; export default function DashboardTopbar({ activeSection, onSectionChange, onOpenWorkOrderModal, onOpenTaskModal, pendingSyncCount, onNewServiceRecord, showSectionNav = true, }) { const sectionTitle = NAV_ITEMS.find((item) => item.key === activeSection)?.label || 'Dashboard'; return (
{/* ── Gornji red ───────────────────────────────────────── */}

Pregled sustava

{sectionTitle}

{pendingSyncCount > 0 && ( Offline queue: {pendingSyncCount} )}
{/* ── Selector bar: Kupac + Dizalica ───────────────────── */} {/* ── Navigacijski tabovi ──────────────────────────────── */} {showSectionNav && ( )}
); }