@extends('layouts.app') @section('content')

Notifications

Stay updated with all system activities

@if($unreadCount > 0) {{ $unreadCount }} unread @endif @if($unreadCount > 0) Mark All Read @endif
@if($notifications->count() > 0)
@foreach($notifications as $notification) @php $iconMap = [ 'loan_application' => ['icon' => 'bx-credit-card', 'color' => '#22c55e'], 'payment' => ['icon' => 'bx-money', 'color' => '#3b82f6'], 'membership' => ['icon' => 'bx-user-plus', 'color' => '#8b5cf6'], 'withdrawal' => ['icon' => 'bx-log-out', 'color' => '#ef4444'], ]; $enquiryType = $notification->enquiry->type ?? 'default'; $icon = $iconMap[$enquiryType] ?? ['icon' => 'bx-bell', 'color' => '#17479E']; $typeColors = [ 'enquiry_registered' => '#3b82f6', 'enquiry_assigned' => '#8b5cf6', 'status_changed' => '#f59e0b', 'payment_initiated' => '#3b82f6', 'payment_approved' => '#22c55e', 'loan_processed' => '#3b82f6', ]; $typeColor = $typeColors[$notification->type] ?? '#6b7280'; @endphp
@if(!$notification->is_read) @else @endif {{ $notification->title }}
{{ $notification->created_at->diffForHumans() }}

{{ Str::limit($notification->message, 120) }}

@if($notification->enquiry) {{ $notification->enquiry->check_number }} {{ Str::limit($notification->enquiry->full_name, 20) }} {{ $notification->enquiry->region->name ?? 'N/A' }} @endif {{ ucwords(str_replace('_', ' ', $notification->type)) }}
@if($notification->enquiry) @endif @if(!$notification->is_read)
@csrf
@endif
@endforeach
@if($notifications->hasPages())
{{ $notifications->appends(request()->query())->links('pagination::bootstrap-5') }}
@endif @else

No Notifications

You're all caught up! Check back later for updates.

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