@for($i=1;$i<=$daysInMonth;$i++)
@php
$date = Carbon::create($year,$month,$i)->format('Y-m-d');
$dayEvents = $events[$date] ?? [];
$daySchedules = $schedules[$date] ?? [];
$totalItems = count($dayEvents) + count($daySchedules);
$isToday = $today->day === $i;
$hasCompleted = collect($dayEvents)->where('status','selesai')->count() > 0;
$hasPending = collect($dayEvents)->where('status','!=','selesai')->count() > 0;
@endphp
{{ $i }}
@if($totalItems > 0)
@if($hasCompleted)
@endif
@if($hasPending)
@endif
@if(count($daySchedules) > 0)
@endif
{{ $totalItems }} aktivitas
@endif
@if($isToday)
@endif