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

Notifications

@csrf
@if(session('success'))
{{ session('success') }}
@endif
@forelse($notifications as $notification)
@if(isset($notification->data['type']) && $notification->data['type'] === 'prescription_created')
@else
@endif

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

@if(isset($notification->data['type']) && $notification->data['type'] === 'prescription_created')

Prescription #: {{ $notification->data['prescription_number'] ?? 'N/A' }}

Patient: {{ $notification->data['patient_name'] ?? 'N/A' }}

Doctor: {{ $notification->data['doctor_name'] ?? 'N/A' }}

@endif

{{ $notification->created_at->diffForHumans() }}

@if(!$notification->read_at)
@csrf
@endif
@empty

No notifications found.

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