Takvim @php $today = now(); $monthLabels = ['Ocak','Şubat','Mart','Nisan','Mayıs','Haziran','Temmuz','Ağustos','Eylül','Ekim','Kasım','Aralık']; $dayLabels = ['Pzt','Sal','Çar','Per','Cum','Cmt','Paz']; $cursorLabel = $monthLabels[$cursor->month - 1] . ' ' . $cursor->year; // Üst kartlar $statEvents'ten (moddan bağımsız geniş aralık) — Gün/Hafta modunda da doğru $statSrc = $statEvents ?? $events; $statMonth = $statSrc->filter(fn($e) => $e->date->month === $cursor->month && $e->date->year === $cursor->year)->count(); $statToday = $statSrc->filter(fn($e) => $e->date->isSameDay($today))->count(); $statWeek = $statSrc->filter(fn($e) => $e->date->between($today->copy()->startOfWeek(\Carbon\Carbon::MONDAY), $today->copy()->endOfWeek(\Carbon\Carbon::SUNDAY)))->count(); // Gecikmiş Vadeler: GecikmisUyariProvider'ın bugüne düşürdüğü uyarılar + // geçmiş tarihli vade/çek/not öğeleri. $statOverdue = $statSrc->filter(fn($e) => $e->categoryKey === 'gecikmis-uyari' || ($e->date->lt($today->copy()->startOfDay()) && in_array($e->categoryKey, ['fatura-vade','cek-vade','not-hatirlatma'], true)) )->count(); @endphp
{{-- Stats --}}
{{ $cursorLabel }}
{{ $statMonth }}
Bugün
{{ $statToday }}
Bu Hafta
{{ $statWeek }}
Gecikmiş Vadeler
{{ $statOverdue }}
{{-- Header: nav + bugün + kategori toggle (mobil) + mod --}}
{{ $cursorLabel }}
{{-- Ay/Yıl seçici ikonu --}} {{-- Picker popup --}}
{{-- Yıl navigasyonu --}}
{{-- 12 ay grid (4 sütun × 3 satır) --}}
{{-- Mobil: kategori filter toggle --}}
{{-- Mobile overlay for category bottom sheet --}}
{{-- Category chip bar — desktop: horizontal strip; mobile: bottom sheet --}}
Kategoriler
@if(count($categories) === 0)
Görülebilecek kategori yok.
@else
@endif
{{-- Calendar main (full width) --}}
{{-- Month mode --}} {{-- Week mode — 7 gün tek satır (mobilde dikey) --}} {{-- Day mode — tek günün ajandası --}}
{{-- /cal-main --}} {{-- ── Event detail modal (body'ye teleport — tam ortalanır) ── --}} {{-- ── Day drawer (body'ye teleport — tam ortalanır) ── --}}
{{-- /cal-wrap --}}