@extends('admin.layouts.master-soyuz') @section('title', __('Edit Review | ')) @section('body') @component('admin.component.breadcumb',['thirdactive' => 'active']) @slot('heading'){{ __('All Reviews and Ratings') }}@endslot @slot('menu1'){{ __('Review') }}@endslot @slot('menu2'){{ __('Edit Review') }}@endslot @slot('button')
{{ __('Back') }}
@endslot @endcomponent @php $userName = optional($review->users)->name ?? optional($review->user)->name ?? '—'; $userEmail = optional($review->users)->email ?? optional($review->user)->email ?? ''; $proName = ''; $proImg = url('images/no-image.png'); if ($review->variant_id && optional($review->variant)->products) { $proName = $review->variant->products->name; if ($review->variant->variantimages) { $proImg = url('variantimages/thumbnails/' . $review->variant->variantimages['main_image']); } } elseif ($review->simple_product) { $proName = $review->simple_product->product_name; if ($review->simple_product->thumbnail) { $proImg = url('images/simple_products/' . $review->simple_product->thumbnail); } } $rating = (float) ($review->value ?? 0); @endphp
@if ($errors->any()) @endif
{{-- LEFT: Review context --}}
{{ __('Review Details') }}
{{-- Product card --}}
{{ __('Product') }}
{{ $proName ?: __('Product unavailable') }}
{{-- Rating --}}
{{ __('Rating') }}
@for($i = 1; $i <= 5; $i++) @endfor
{{ number_format($rating, 1) }} / 5
{{-- Customer --}}
{{ __('Customer') }}
{{ $userName }}
@if($userEmail){{ $userEmail }}@endif
{{-- Customer review --}}
{{ __("Customer's Review") }}
“{{ $review->review ?: __('No comment provided.') }}”
{{-- Meta --}}
{{ __('Order ID') }}: {{ $review->order_id ?? '—' }}
{{ __('Submitted') }}: {{ $review->created_at ? $review->created_at->format('d M Y') : '—' }}
@if(!empty($review->qty))
{{ __('Qty') }}: {{ $review->qty }}
@endif @if(!empty($review->price))
{{ __('Price') }}: {{ $review->price }}
@endif
{{-- RIGHT: Admin remark + status --}}
{{ __('Moderate Review') }}
@csrf @method('PUT') {{-- Status --}}
{{ __('Approval Status') }}
{{ __('Toggle to publish or hide this review on the storefront.') }}
{{-- Admin remark --}}
{{ __('Internal note shown next to the review on the front-end (optional public-facing reply).') }}
{{ __('Cancel') }}
@endsection