Notifications {{ $notificationCount }}
@if(isset($debug) && count($debug) > 0) Task: {{ $debug['taskCount'] ?? 0 }} | Form: {{ $debug['formReminderCount'] ?? 0 }} @endif
@forelse($notifications as $notification) @php $routeName = $notification['route_name'] ?? 'location.tasks.show'; $routeId = $notification['route_id'] ?? 1; $notificationType = $notification['type']; $notificationId = $notification['id']; $comments = ['added a comment','uploaded a document','uploaded an audio recording']; @endphp
@if($notificationType === 'task') @php $title = strtolower($notification['title'] ?? ''); @endphp @if($title === 'task completed')
@elseif($title === 'task closed')
@elseif($title === "task marked as can't do")
@elseif($title === 'task overdue')
@else
@endif @elseif($notificationType === 'reminder')
@elseif($notificationType === 'form_reminder')
@else
@endif

@if ($notificationType === 'task') @php $title = strtolower($notification['title'] ?? ''); $messagesMap = [ 'task completed' => 'Task Completed', 'task closed' => 'Task Closed', "task marked as can't do" => "Task Marked as Can't Do", 'task overdue' => 'Task Overdue', ]; @endphp @if (in_array($notification['title'], $comments)) {{ $notification['message'] }} @elseif (isset($messagesMap[$title])) {{ $messagesMap[$title] }}: {{ $notification['message'] ?? '' }} @else {{ $notification['message'] }} @endif @elseif ($notificationType === 'form_reminder') {{ $notification['title'] }} @else {{ $notification['message'] }}: {{ $notification['title'] }} @endif

{{ \Carbon\Carbon::parse($notification['notified_at'])->diffForHumans() }}

@empty

No new notifications

@endforelse
@if($notificationCount > 0)
@endif