@php // Helper function if (!function_exists('getEventTypeColor')) { function getEventTypeColor($type) { $colors = [ 'announcements' => 'success', 'webinars' => 'info', 'workshops' => 'warning', 'other' => 'secondary', ]; return $colors[$type] ?? 'secondary'; } } // Response colors mapping $responseColors = [ 'accepted' => 'success', 'rejected' => 'danger', 'maybe' => 'warning', ]; // Priority icons mapping $priorityIcons = [ 'high' => 'fa-flag text-danger', 'medium' => 'fa-flag text-warning', 'low' => 'fa-flag text-info', ]; // Audience type mapping with translation $audienceTypes = [ 'staff_training' => __('labels.staff_training'), 'customer_event' => __('labels.customer_event'), 'both' => __('labels.both'), ]; // Audience colors and icons $audienceColors = [ 'staff_training' => 'primary', 'customer_event' => 'info', 'both' => 'success', ]; $audienceIcons = [ 'staff_training' => 'fa-users-cog', 'customer_event' => 'fa-handshake', 'both' => 'fa-users', ]; @endphp

{{ __('labels.todays_events') }}

{{ now()->format('l, F j, Y') }}
@if(isset($events['count']) && $events['count']) {{ $events['count'] ?? '' }} {{ __('labels.event_s') }} @endif
@if (count($events['list'] ?? []) > 0)
@foreach ($events['list'] as $event)
@php // Get user's response - you'll need to adjust this based on your data structure $hasResponded = $event['has_responded'] ?? false; @endphp
@if ($event['type'] == 'webinars') @elseif($event['type'] == 'workshops') @elseif($event['type'] == 'announcements') @else @endif
{{ Str::limit($event['title'], 35) }}
{{ ucfirst($event['type']) }}
{{ \Carbon\Carbon::parse($event['started_at'])->format('h:i A') }} @if ($event['ended_at']) - {{ \Carbon\Carbon::parse($event['ended_at'])->format('h:i A') }} @endif
@if ($event['description'])

{{ Str::limit(strip_tags($event['description']), 60) }}

@endif
@if (!$loop->last)
@endif @endforeach
@else
{{ __('labels.no_events_today') }}

{{ __('labels.all_caught_up') }}

@can('create', \App\Models\Event::class) {{ __('labels.schedule_event') }} @endcan
@endif
@push('css') @endpush @push('js') @endpush