@extends('layouts.app') @section('title', 'Message') @section('subtitle', $message->subject) @section('content') Inbox
{{ $message->sender?->initials() ?? 'SY' }}
{{ $message->sender?->name ?? 'System' }}
{{ $message->sender?->roleLabel() }}
{{ \App\Models\Message::AUDIENCES[$message->audience] ?? ucfirst($message->audience) }} {{ \App\Models\Message::CHANNELS[$message->channel] ?? ucfirst($message->channel) }}
{{ $message->body }}
Delivered {{ $message->sent_at?->diffForHumans() ?? 'recently' }} @if (auth()->user()->isAdminOrStaff()) Reply @endif

Recipients ({{ $message->recipients->count() }})

@forelse ($message->recipients as $recipient)
{{ $recipient->user?->initials() }}
{{ $recipient->user?->name }}
{{ $recipient->user?->email }}
@if ($recipient->read_at) Read @else Sent @endif
@empty
No recipients recorded.
@endforelse
@endsection