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

Admin Notifications

Manage your system notifications

@if(isset($unreadCount) && $unreadCount > 0) @endif
@forelse($notifications as $notification)
@switch($notification->type) @case('business_verified') Business Verified @break @case('business_rejected') Business Rejected @break @case('venue_approved') Venue Approved @break @case('venue_rejected') Venue Rejected @break @case('staff_invited') Staff Invited @break @case('staff_joined') Staff Joined @break @case('payment_received') Payment Received @break @case('subscription_expiring') Subscription Expiring @break @default {{ ucfirst(str_replace('_', ' ', $notification->type)) }} @endswitch
@php $data = $notification->data; @endphp
@switch($notification->type) @case('business_verified') {{ $data['business_name'] ?? 'Unknown' }} - Verified @break @case('business_rejected') {{ $data['business_name'] ?? 'Unknown' }} - Rejected @break @case('venue_approved') {{ $data['venue_name'] ?? 'Unknown' }} - Approved @break @case('venue_rejected') {{ $data['venue_name'] ?? 'Unknown' }} - Rejected @break @case('staff_invited') New Staff Invite: {{ $data['staff_email'] ?? 'Unknown' }} @break @case('staff_joined') {{ $data['staff_name'] ?? 'Unknown' }} Joined {{ $data['business_name'] ?? 'Business' }} @break @case('payment_received') Payment Received: {{ $data['amount'] ?? '0' }} @break @case('subscription_expiring') Subscription Expiring: {{ $data['business_name'] ?? 'Unknown' }} @break @default {{ ucfirst(str_replace('_', ' ', $notification->type)) }} @endswitch

@switch($notification->type) @case('business_rejected') Reason: {{ $data['reason'] ?? 'No reason provided' }} @break @case('venue_rejected') Reason: {{ $data['reason'] ?? 'No reason provided' }} @break @case('payment_received') Amount: {{ $data['amount'] ?? 'N/A' }} {{ $data['currency'] ?? 'AED' }} @break @case('subscription_expiring') Expires: {{ $data['expiry_date'] ?? 'Unknown' }} @break @default @endswitch

{{ $notification->created_at->diffForHumans() }}
@if(!$notification->read_at) @endif
@if(!empty($data['action_url'])) @endif
@empty

No notifications

@endforelse
@if($notifications->hasPages()) @endif
@endsection