@extends('layouts.admin') @section('title', $message->title . ' | MTWU Admin') @section('content')
Back

{{ $message->title }}

Sent on {{ $message->published_at ? $message->published_at->format('F d, Y \a\t H:i') : 'Draft' }}

@if($message->status === 'published')
@csrf
@endif Edit Message
Type
{{ ucfirst($message->type) }}
Audience
@if($message->recipient_type === 'all') All Members @elseif($message->recipient_type === 'individual') Individual (ID: {{ $message->receiver_id }}) @elseif($message->recipient_type === 'segment') Segmented Group @endif
Channels
@foreach($message->channels ?? ['in_app'] as $channel) @if($channel == 'in_app') In-App @elseif($channel == 'push') Push @elseif($channel == 'email') Email @endif @endforeach
Status
@if($message->status === 'published') Published
{{ $message->published_at ? $message->published_at->format('M d, Y H:i') : '' }}
@elseif($message->status === 'scheduled') Scheduled
For {{ $message->published_at ? $message->published_at->format('M d, Y H:i') : '' }}
@else Draft @endif @if($message->expires_at)
Expires {{ $message->expires_at->format('M d, Y H:i') }}
@endif
{!! $message->content !!}
@if($message->attachments->count() > 0)
@php $images = $message->attachments->filter(fn($a) => Str::startsWith($a->mime_type, 'image/')); $files = $message->attachments->reject(fn($a) => Str::startsWith($a->mime_type, 'image/')); @endphp @if($images->count() > 0)

Attached Images

@foreach($images as $image)
{{ $image->file_name }}
{{ $image->file_name }}
@endforeach
@endif @if($files->count() > 0)

Attached Documents

@foreach($files as $attachment)
{{ $attachment->file_name }}
{{ round($attachment->file_size / 1024, 1) }} KB
@endforeach
@endif
@endif @endsection