@extends('admin.layouts.app') @section('title') {{ __('Reminders') }} @stop @section('after_head') @stop @section('content') @include('admin.errors.alerts')
{{ __('Stay on top of upcoming events and important dates') }}

{{ __('Reminders') }}

@if ($route_create) {{ __('Add Reminder') }} @endif
{{-- The screen's three controls; the calendar keeps the month it is on while they change. --}}
@if (! empty($filters['date'])) @endif
{{-- Calendar and Categories --}}
@php $today = \Illuminate\Support\Carbon::today(); $gridStart = $month->copy()->startOfMonth()->startOfWeek(\Carbon\CarbonInterface::SUNDAY); $gridEnd = $month->copy()->endOfMonth()->endOfWeek(\Carbon\CarbonInterface::SATURDAY); @endphp
{{ $month->translatedFormat('F Y') }}
@for ($weekday = $gridStart->copy(); $weekday->lt($gridStart->copy()->addDays(7)); $weekday->addDay()) @endfor @for ($day = $gridStart->copy(); $day->lte($gridEnd); $day->addDay()) @if ($day->dayOfWeek === \Carbon\CarbonInterface::SUNDAY) @endif @php $key = $day->toDateString(); $count = (int) ($calendar[$key] ?? 0); $classes = collect(['reminders-day']) ->when($day->month !== $month->month, fn ($c) => $c->push('is-muted')) ->when($count > 0, fn ($c) => $c->push('has-reminders')) ->when($day->isSameDay($today), fn ($c) => $c->push('is-today')) ->when(($filters['date'] ?? null) === $key, fn ($c) => $c->push('is-selected')) ->implode(' '); @endphp @if ($day->dayOfWeek === \Carbon\CarbonInterface::SATURDAY) @endif @endfor
{{ mb_substr($weekday->translatedFormat('D'), 0, 1) }}
{{ $day->day }}
@if (! empty($filters['date'])) @endif
{{ __('Categories') }}
@foreach ($categories['counts'] as $category)
{{ $category['label'] }} {{ trans_choice(':count reminder|:count reminders', $category['count'], ['count' => $category['count']]) }}
@endforeach
@if ($categories['next_at']) {{ __('Your next reminder is on :date', ['date' => \Illuminate\Support\Carbon::parse($categories['next_at'])->translatedFormat('j F \a\t h:i A')]) }} @else {{ __('You have no upcoming reminders') }} @endif
{{-- Upcoming Reminders --}}
{{ __('Upcoming Reminders') }}
@forelse ($data as $recipient) @php $reminder = $recipient->reminder; $category = \App\Enums\ReminderCategoryEnum::tryFrom((string) $reminder?->category); $repeat = $reminder?->repeat_rule ?? \App\Enums\ReminderRepeatEnum::None; @endphp
{{ $category?->label() ?? $reminder?->category }} · {{ $repeat->label() }}
{{ $reminder?->title }} @if ($reminder?->description)
{{ $reminder->description }}
@endif
{{ $recipient->remind_at?->translatedFormat('d M Y ยท h:i A') }} {{ $recipient->statusLabel() }}
@empty
{{ __('No reminders found') }}
@endforelse
{{ $data->links() }}
@stop @section('after_foot') @include('admin.layouts.delete') @stop