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

Notifications Center

Stay updated with all system activities

@if($unreadCount > 0)
{{ $unreadCount }} Unread
Mark All Read @else
All Caught Up!
@endif
Reset
@if($notifications->count() > 0)
@foreach($notifications as $notification)
@php $iconMap = [ 'loan_application' => ['icon' => 'bx-credit-card', 'color' => 'success'], 'payment' => ['icon' => 'bx-money', 'color' => 'info'], 'membership' => ['icon' => 'bx-user-plus', 'color' => 'primary'], 'withdrawal' => ['icon' => 'bx-log-out', 'color' => 'danger'], ]; $enquiryType = $notification->enquiry->type ?? 'default'; $icon = $iconMap[$enquiryType] ?? ['icon' => 'bx-bell', 'color' => 'primary']; @endphp
@if(!$notification->is_read) NEW @endif
{{ $notification->title }}

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

@php $typeColors = [ 'enquiry_registered' => 'info', 'enquiry_assigned' => 'primary', 'status_changed' => 'warning', 'payment_initiated' => 'info', 'payment_approved' => 'success', 'loan_processed' => 'info', ]; $color = $typeColors[$notification->type] ?? 'secondary'; @endphp {{ ucwords(str_replace('_', ' ', $notification->type)) }}
{{ $notification->created_at->diffForHumans() }} {{ $notification->enquiry->check_number ?? 'N/A' }} @if($notification->enquiry) {{ Str::limit($notification->enquiry->full_name, 25) }} {{ $notification->enquiry->region->name ?? 'N/A' }}, {{ $notification->enquiry->district->name ?? 'N/A' }} Status: {{ ucfirst($notification->enquiry->status) }} @endif
@if($notification->enquiry) View Enquiry @endif Details @if(!$notification->is_read)
@csrf
@endif
@endforeach
@if($notifications->hasPages())
{{ $notifications->links('pagination::bootstrap-5') }}
@endif @else

No Notifications Found

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

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