@extends('layouts.app') @section('title', app()->getLocale() === 'bn' ? 'অভিযোগ রিপোর্ট' : 'Grievance Report') @section('page-title', app()->getLocale() === 'bn' ? 'অভিযোগ রিপোর্ট' : 'Grievance Report') @section('content')
← {{ __('Back') }}
{{-- Avg Resolution Time --}}

{{ app()->getLocale() === 'bn' ? 'গড় সমাধান সময়' : 'Avg Resolution Time' }}

{{ number_format($stats['avg_resolution_days'] ?? 0, 1) }}

{{ app()->getLocale() === 'bn' ? 'দিন' : 'days' }}

{{-- By Status --}}

{{ app()->getLocale() === 'bn' ? 'স্ট্যাটাস অনুযায়ী' : 'By Status' }}

@foreach($stats['by_status'] ?? [] as $item) @php $c = match($item->status) { 'resolved' => 'green', 'under_review' => 'blue', 'rejected' => 'red', default => 'yellow' }; @endphp

{{ $item->total }}

{{ ucfirst(str_replace('_',' ',$item->status)) }}

@endforeach
{{-- By Category --}}

{{ app()->getLocale() === 'bn' ? 'ক্যাটাগরি অনুযায়ী' : 'By Category' }}

@foreach($stats['by_category'] ?? [] as $item) @php $max = collect($stats['by_category'])->max('total') ?: 1; @endphp
{{ ucfirst(str_replace('_',' ',$item->category)) }} {{ $item->total }}
@endforeach
@endsection