@php $shortcuts = [ 'today' => __('اليوم'), 'yesterday' => __('أمس'), 'week' => __('هذا الأسبوع'), 'month' => __('هذا الشهر'), 'last_week' => __('آخر أسبوع'), 'last_month' => __('آخر شهر'), 'all_time' => __('All time'), ]; $currentPreset = $activePreset ?? 'today'; $presetToShortcut = [ 'all_time' => 'all_time', 'today' => 'today', 'yesterday' => 'yesterday', 'this_week' => 'week', 'this_month' => 'month', 'last_week' => 'last_week', 'last_month' => 'last_month', ]; $activeShortcut = $presetToShortcut[$currentPreset] ?? null; $dateFromValue = ($currentPreset === 'all_time' || !isset($dateFrom)) ? '' : $dateFrom->toDateString(); $dateToValue = ($currentPreset === 'all_time' || !isset($dateTo)) ? '' : $dateTo->toDateString(); @endphp {{ __('Filter') }} @if(!empty($dateRangeLabel)) {{ $dateRangeLabel }} @endif {{ __('التاريخ') }} @foreach($shortcuts as $key => $label) @if($key === 'all_time') {{ $label }} @else {{ $label }} @endif @endforeach — {{ __('Search') }} {{ __('Reset') }}