@php // Two charts per row. Without the revenue chart, specialties takes its place beside the type split. $canViewRevenue = auth('admin')->user()->can('clinic.reports.view'); $charts = [ ['id' => 'chart_daily', 'col' => 'col-xl-8', 'icon' => 'chart-line-up', 'color' => 'primary', 'title' => trans('clinic.home.chart_daily')], ['id' => 'chart_status', 'col' => 'col-xl-4', 'icon' => 'chart-pie-simple', 'color' => 'success', 'title' => trans('clinic.home.chart_status')], ]; if ($canViewRevenue) { $charts[] = ['id' => 'chart_revenue', 'col' => 'col-xl-8', 'icon' => 'dollar', 'color' => 'success', 'title' => trans('clinic.home.chart_revenue')]; } $charts[] = ['id' => 'chart_types', 'col' => 'col-xl-4', 'icon' => 'category', 'color' => 'info', 'title' => trans('clinic.home.chart_types')]; $charts[] = ['id' => 'chart_specialties', 'col' => $canViewRevenue ? 'col-xl-6' : 'col-xl-8', 'icon' => 'chart-simple', 'color' => 'warning', 'title' => trans('clinic.home.chart_specialties')]; @endphp

{{ trans('clinic.home.statistics') }}

@foreach ($charts as $chart)

{{ $chart['title'] }}

@endforeach

{{ trans('clinic.home.top_doctors') }}

@forelse ($topDoctors as $row) @empty @endforelse
{{ trans('clinic.doctors.title') }} {{ trans('clinic.reports.bookings_in_range') }} {{ trans('clinic.reviews.rating') }}
{{ $row['doctor']->name }} @if ($row['doctor']->specialty) {{ $row['doctor']->specialty->name }} @endif
{{ $row['bookings_count'] }} @if ($row['avg_rating'] !== null) {{ $row['avg_rating'] }} / 5 @else {{ trans('clinic.reports.no_ratings') }} @endif
{{ trans('clinic.common.no_records') }}