@extends('admin.layouts.app') @section('title', 'Post Details') @section('content')

Post Details

Post #{{ $post->id }} • {{ $post->created_at->format('M d, Y h:i A') }}

@csrf @method('DELETE')
{{ number_format($stats['total_likes']) }}

Likes

{{ number_format($stats['total_dislikes']) }}

Dislikes

{{ number_format($stats['total_comments']) }}

Comments

{{ number_format($stats['total_reposts']) }}

Reposts

{{ number_format($stats['total_bookmarks']) }}

Bookmarks

{{ number_format($stats['engagement_score'], 1) }}

Engagement

{{ strtoupper(substr($post->author->name ?? 'N', 0, 2)) }}

{{ $post->author->name ?? 'Unknown Author' }}

{{ $post->author->email ?? 'N/A' }}

@if($post->author->nurseProfile)

{{ $post->author->nurseProfile->primary_specialty ?? 'User' }} @if($post->author->nurseProfile->country) • {{ $post->author->nurseProfile->country }} @endif

@endif

{{ $post->created_at->format('M d, Y') }}

{{ $post->created_at->format('h:i A') }}

@if($post->category)
{{ $post->category->name }} @if($post->specialty_tag) {{ $post->specialty_tag }} @endif
@endif

{{ $post->body }}

@if($post->image_url)
Post image
@endif @if($post->quotedPost)
{{ strtoupper(substr($post->quotedPost->author->name ?? 'N', 0, 2)) }}
{{ $post->quotedPost->author->name ?? 'Unknown' }} • {{ $post->quotedPost->created_at->diffForHumans() }}

{{ Str::limit($post->quotedPost->body, 200) }}

@endif
Signal Level: {{ $post->signal_level ?? 'N/A' }} Engagement Score: {{ number_format($post->engagement_score, 2) }}

Comments ({{ $stats['total_comments'] }})

@if($post->comments->isEmpty())

No comments yet

@else
@foreach($post->comments()->with(['user', 'replies.user'])->latest()->get() as $comment)
{{ strtoupper(substr($comment->user->name ?? 'N', 0, 2)) }}
{{ $comment->user->name ?? 'Unknown' }} {{ $comment->created_at->diffForHumans() }}

{{ $comment->body }}

@if($comment->replies->isNotEmpty())
@foreach($comment->replies as $reply)
{{ strtoupper(substr($reply->user->name ?? 'N', 0, 2)) }}
{{ $reply->user->name ?? 'Unknown' }} {{ $reply->created_at->diffForHumans() }}

{{ $reply->body }}

@endforeach
@endif
@endforeach
@endif

Author Information

Name

{{ $post->author->name ?? 'Unknown' }}

Email

{{ $post->author->email ?? 'N/A' }}

@if($post->author->nurseProfile)

Specialty

{{ $post->author->nurseProfile->primary_specialty ?? 'N/A' }}

Location

{{ $post->author->nurseProfile->city ? $post->author->nurseProfile->city . ', ' : '' }} {{ $post->author->nurseProfile->country ?? 'N/A' }}

@endif

Engagement Breakdown

Net Reactions {{ $stats['total_likes'] - $stats['total_dislikes'] }}
Interactions {{ $stats['total_likes'] + $stats['total_dislikes'] + $stats['total_comments'] }}
Shares {{ $stats['total_reposts'] + $stats['total_quotes'] }}
Total Engagement {{ number_format($stats['engagement_score'], 2) }}
@if($stats['total_quotes'] > 0)

Quoted By ({{ $stats['total_quotes'] }})

@foreach($post->quotes()->with('author')->latest()->take(5)->get() as $quote)
{{ $quote->author->name ?? 'Unknown' }}

{{ Str::limit($quote->body, 80) }}

{{ $quote->created_at->diffForHumans() }}
@endforeach
@endif
@endsection