@extends('user::layouts.master') @section('breadcrumb_title', 'View Review') @section('content')

Review Details

Edit Back to Reviews
{{-- Review Info --}}

Review Information

User
@if ($productReview->user) {{ renderImageInfo( $productReview?->user->getFirstMediaUrl('avatar'), $productReview?->user?->name, $productReview?->user?->email, ) }} @else Guest User @endif
Name
{{ $productReview->user->name ?? 'N/A' }}
Email
{{ $productReview->user->email ?? 'N/A' }}
Product
@if ($productReview->commentable->title) {{ $productReview->commentable->title }} @else Product not found @endif
Review
{{ $productReview->content ?? 'No content' }}
Rating
{{ ratting($productReview->ratting, 'd-flex gap-1') }}
Status
@if ($productReview->status == 'approved') Approved @elseif ($productReview->status == 'spam') Spam @elseif ($productReview->status == 'pending') Pending @endif
Created At
{{ customDateTimeFormate($productReview->created_at) }}
Updated At
{{ customDateTimeFormate($productReview->updated_at) }}
{{-- Parent Comment (if this is a reply) --}} @if ($productReview->parent_id && $productReview->parent)

Parent Comment

{{ $productReview->parent->user->name ?? $productReview->parent->name }} {{ $productReview->parent->created_at->format('M d, Y H:i') }}

{!! nl2br(e($productReview->parent->content ?? $productReview->parent->comment)) !!}

@endif {{-- Child Comments (replies to this comment) --}} @if ($productReview->children && $productReview->children->count() > 0)

Replies ({{ $productReview->children->count() }})

@foreach ($productReview->children as $reply)
@if ($reply->user && $reply->user->getFirstMediaUrl('avatar')) User Image @endif {{ $reply->user->name ?? $reply->name }} {{ customDateTimeFormate($reply->created_at) }}

{{ $reply?->content }}

@include('backend::components.show-button', [ 'route' => route('author.product-reviews.show', $reply->id), ]) @include('backend::components.edit-button', [ 'route' => route('author.product-reviews.edit', $reply->id), ])
@endforeach
@endif
{{-- Sidebar --}}

Quick Actions

@if ($productReview->status == 'pending' || $productReview->status == 'spam') @endif

Add Reply

@csrf
@error('content')

{{ $message }}

@enderror
@endsection @push('scripts') @endpush