@extends('tracker::layouts.master') @section('title','Calendar') @push('styles') @endpush @section('content') @php $monthCap = 3; // issues shown per day in month view before "+N more" $title = $view === 'month' ? $grids[0]['month']->format($grids[0]['month']->year === $grids[1]['month']->year ? 'F' : 'F Y') . ' – ' . $grids[1]['month']->format('F Y') : $start->format($start->year === $end->year ? 'M j' : 'M j, Y') . ' – ' . $end->format('M j, Y'); // Months on screen — a greyed-out overflow day whose month has its own grid here leaves its // issues to that grid, so nothing shows up twice where the two month grids share a week. $shownMonths = collect($grids)->pluck('month')->filter()->map->format('Y-m')->all(); // Switching views keeps you in the same period: month → the current week if this is the // current month, otherwise the month's first week; week → the month the viewed date is in. $weekToggleDate = $view === 'month' ? ($date->isSameMonth(today()) ? today() : $date->copy()->startOfMonth()) : $date; $statuses = \Modules\Tracker\Models\Issue::statuses(); @endphp