{{-- Shared toolbar for all report pages. Variables expected: $active ('occupancy'|'revenue'|'night-audit'), $from, $to, $date --}}
{{-- Tab switcher --}}
Occupancy Revenue Night Audit
{{-- Date picker form — adapts to the active tab --}} @if($active === 'night-audit')
@if($date !== now()->toDateString()) Today @endif
@else
{{-- Quick presets --}}
@php $presets = [ 'This Month' => ['from' => now()->startOfMonth()->toDateString(), 'to' => now()->toDateString()], 'Last Month' => ['from' => now()->subMonth()->startOfMonth()->toDateString(), 'to' => now()->subMonth()->endOfMonth()->toDateString()], 'Last 7d' => ['from' => now()->subDays(6)->toDateString(), 'to' => now()->toDateString()], 'Last 30d' => ['from' => now()->subDays(29)->toDateString(), 'to' => now()->toDateString()], ]; @endphp @foreach($presets as $label => $params) @php $isActive = $from === $params['from'] && $to === $params['to']; @endphp {{ $label }} @endforeach
@endif