import { Settings2, RotateCcw, ChevronUp, ChevronDown } from 'lucide-react' import { PILOT_WIDGET_DEFS, PILOT_WIDGET_IDS_DEFAULT_ORDER } from '../../pilot/widgetRegistry' import { resetPilotLayout, savePilotLayout } from '../../pilot/pilotLayoutStorage' /** * Pilot: lokale Konfiguration (Ein/Aus, Reihenfolge). Kein Admin-Recht nötig. */ export default function PilotVizAdminCard({ layout, onLayoutChange }) { const persist = (next) => { savePilotLayout(next) onLayoutChange(next) } const move = (index, dir) => { const nextOrder = [...layout.order] const j = index + dir if (j < 0 || j >= nextOrder.length) return ;[nextOrder[index], nextOrder[j]] = [nextOrder[j], nextOrder[index]] persist({ ...layout, order: nextOrder }) } const toggle = (id) => { persist({ ...layout, enabled: { ...layout.enabled, [id]: !layout.enabled[id] }, }) } const handleReset = () => { onLayoutChange(resetPilotLayout()) } return (
Widget-Konfiguration (Pilot)

Sichtbarkeit und Reihenfolge steuern. Wird nur lokal in diesem Browser gespeichert (localStorage) – gut zum Ausprobieren vor einer serverseitigen Profil-Konfiguration.

Standard-Reihenfolge: {PILOT_WIDGET_IDS_DEFAULT_ORDER.join(' → ')}
) }