@props([ 'title' => config('app.name', 'RD Inventory'), 'userRole' => null, // optional override ]) @php $u = auth()->user(); $isDistrict = $u?->isDistrictUser() ?? false; $isStation = $u?->isStationUser() ?? false; $roleLabel = $userRole ?? ($isDistrict ? 'Bezirksstelle' : 'Ortstelle'); // Helpers: aktiver Link $isActive = function (string $pattern) { return request()->routeIs($pattern); }; $navClass = function (bool $active = false) { return $active ? 'flex items-center gap-3 rounded-2xl px-4 py-3 text-sm font-semibold bg-neutral-50 border border-rk' : 'flex items-center gap-3 rounded-2xl px-4 py-3 text-sm font-medium border border-transparent hover:bg-neutral-50'; }; $dot = function (bool $active = false) { return $active ? 'bg-rk-red' : 'bg-neutral-300'; }; @endphp {{ $title }} @vite(['resources/css/app.css', 'resources/js/app.js']) @stack('styles')
{{-- Sidebar --}} {{-- Main --}}
{{-- Topbar --}}
{{-- Mobile menu (placeholder) --}}
{{-- Title / Context --}}
{{ $title }}
{{-- Role pill --}} {{ $isDistrict ? 'Bezirksstelle' : 'Ortstelle' }} {{-- Station pill --}} @if ($isStation && $u?->station) @endif
@if ($u) {{ $u->email }} @else — @endif
{{-- Right actions --}}
{{-- Optional: search (small) --}} {{-- User dropdown --}}
{{-- Dropdown panel --}}
{{ $u?->name ?? 'Benutzer' }}
{{ $u?->email ?? '—' }}
{{ $isDistrict ? 'Bezirksstelle' : 'Ortstelle' }} @if ($isStation && $u?->station) {{ $u->station->name }} @endif @if (auth()->user()->hasRole('developer')) @endif
RD Inventory
{{-- Security (nur Bezirksstelle) --}}
Sicherheit
@if ($isDistrict) Benutzer Rollen & Rechte Audit-Log Sitzungen & 2FA @else @if (auth()->user()->isStationUser() && auth()->user()->hasPermission('station.users.manage')) Benutzer (Ortstelle) @endif @endif
{{-- Page --}}
{{ $slot }}
{{-- Footer --}}
@stack('scripts')