@extends('layouts/layoutMaster') @section('title', __('locale.Reviews')) @section('vendor-style') @vite(['resources/assets/vendor/libs/datatables-bs5/datatables.bootstrap5.scss', 'resources/assets/vendor/libs/datatables-responsive-bs5/responsive.bootstrap5.scss', 'resources/assets/vendor/libs/datatables-buttons-bs5/buttons.bootstrap5.scss', 'resources/assets/vendor/libs/apex-charts/apex-charts.scss', 'resources/assets/vendor/libs/raty-js/raty-js.scss']) @endsection @section('vendor-script') @vite(['resources/assets/vendor/libs/moment/moment.js', 'resources/assets/vendor/libs/datatables-bs5/datatables-bootstrap5.js', 'resources/assets/vendor/libs/apex-charts/apexcharts.js', 'resources/assets/vendor/libs/raty-js/raty-js.js']) @endsection @section('page-style') @vite('resources/assets/vendor/scss/pages/app-ecommerce.scss') @endsection @section('page-script') @vite(['resources/assets/js/reviews.js']) @endsection @section('content')
{{-- Left: Rating Summary --}}
{{-- Left side with main rating --}}

{{ number_format($reviewData['avg_rating'], 2) }}

{{ __('locale.Total') }} {{ $reviewData['total_reviews'] }} {{ __('locale.Reviews') }}

{{ __('locale.All reviews are from genuine customers') }}

+{{ $reviewData['new_reviews'] }} {{ __('locale.This week') }}
{{-- Right side with star progress --}}
@foreach (range(5, 1) as $star)
{{ $star }} Star
{{ $reviewData['progress'][$star]['count'] ?? 0 }}
@endforeach
{{-- Right: Weekly Statistics --}}
{{ __('locale.Reviews statistics') }}

{{ $reviewData['new_reviews'] }} {{ __('locale.New reviews') }} +{{ $reviewData['total_reviews'] > 0 ? round(($reviewData['new_reviews'] / $reviewData['total_reviews']) * 100, 1) : 0 }}%

@php $positiveReviews = ($reviewData['progress'][5]['count'] ?? 0) + ($reviewData['progress'][4]['count'] ?? 0); $positivePercentage = $reviewData['total_reviews'] > 0 ? round(($positiveReviews / $reviewData['total_reviews']) * 100, 1) : 0; @endphp
{{ $positivePercentage }}% {{ __('locale.Positive reviews') }}
{{ __('locale.Weekly Report') }}
{{-- Placeholder for Chart --}}
{{ __('locale.Product')}} {{ __('locale.Reviewer')}} {{ __('locale.Review')}} {{ __('locale.Date')}} {{ __('locale.Status')}} {{ __('locale.Actions')}}
@endsection