@extends('layouts.app') @section('title', 'Notifications') @section('content')

Notifications @if($unreadCount > 0) {{ $unreadCount }} @endif

@if($unreadCount > 0) @endif History
@if($notifications->count() > 0)
@foreach($notifications as $notification)
@if(!$notification->read_at)
@endif
@php $type = $notification->data['type'] ?? 'general'; $iconClass = match($type) { 'frost', 'freeze' => 'fas fa-snowflake text-info', 'extreme_weather', 'wind', 'rain' => 'fas fa-cloud-bolt text-warning', 'task_due', 'task_overdue' => 'fas fa-tasks text-primary', 'equipment_maintenance' => 'fas fa-wrench text-orange', 'test' => 'fas fa-vial text-success', default => 'fas fa-info-circle text-secondary', }; @endphp
{{ $notification->data['title'] ?? 'Notification' }}

{{ $notification->data['message'] ?? '' }}

{{ $notification->created_at->diffForHumans() }}
@if(!$notification->read_at) @endif
@endforeach
@else
No notifications

You don't have any notifications yet.

@endif
@push('styles') @endpush @push('scripts') @endpush @endsection