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

{{ $announcement->title }}

{{ $announcement->created_at->format('M d, Y') }} {{ json_decode($announcement->message, true)['type'] ?? 'General' }}
{{ __('Message') }}
{!! nl2br(e(json_decode($announcement->message, true)['body'] ?? '')) !!}
@php $userIds = json_decode($announcement->user_ids, true) ?? []; $users = \App\Repositories\UserRepository::query()->whereIn('id', $userIds)->get(); @endphp
{{ __(' Sent to Users') }} {{ count($users) }} Recipient{{ count($users) !== 1 ? 's' : '' }}
@if ($users->isNotEmpty())
@foreach ($users as $index => $user) @endforeach
# {{ __('Name') }} {{ __('Email') }}
{{ $index + 1 }}
{{ strtoupper(substr($user->name, 0, 2)) }}
{{ $user->name }}
{{ $user->email }}
@else

{{ __('No specific users selected - sent to all.') }}

@endif
@endsection