@extends('components.app-layout') @section('title', "Today's Birthdays") @section('subtitle', 'Send birthday messages to members celebrating today') @section('content')

Today's Birthdays

{{ $todayBirthdays->count() }} members celebrating their birthday today

@if($todayBirthdays->count() > 0)

Generate Birthday Messages

@csrf

Birthday Celebrants

@foreach($todayBirthdays as $member)
@if(in_array($member->id, $sentMessages)) Message Sent @else Pending @endif

{{ $member->full_name }}

Member ID: {{ $member->member_id }}

@if($member->age)

Turning {{ $member->age }} years old

@endif @if($member->yearGroup) {{ $member->yearGroup->abbreviation }} @endif
@if($member->phone)
{{ $member->phone }}
@endif @if($member->email)
{{ $member->email }}
@endif @if(!$member->phone && !$member->email)
No contact information
@endif
@if(!in_array($member->id, $sentMessages) && ($member->phone || $member->email))
@csrf
@endif
@endforeach
@else

No Birthdays Today

There are no members celebrating their birthday today.

@endif
@endsection