@extends('layouts.app') @section('title', 'تحليلات المواعيد') @php $statusMeta = [ 'scheduled' => ['label' => 'مجدول', 'color' => 'info', 'icon' => 'calendar'], 'confirmed' => ['label' => 'مؤكد', 'color' => 'cyan', 'icon' => 'check'], 'checked_in' => ['label' => 'وصل', 'color' => 'azure', 'icon' => 'user-check'], 'in_progress' => ['label' => 'قيد المعاينة', 'color' => 'warning', 'icon' => 'stethoscope'], 'completed' => ['label' => 'مكتمل', 'color' => 'success', 'icon' => 'check'], 'cancelled' => ['label' => 'ملغي', 'color' => 'danger', 'icon' => 'x'], 'no_show' => ['label' => 'لم يحضر', 'color' => 'orange', 'icon' => 'user-x'], ]; @endphp @section('content') كل التقارير
{{ \Carbon\Carbon::parse($from)->translatedFormat('j M Y') }} ← {{ \Carbon\Carbon::parse($to)->translatedFormat('j M Y') }}
@if($total === 0)

لا توجد مواعيد في هذه الفترة

غيّر النطاق الزمني أو سجّل مواعيد جديدة لتحليلها.

@else
{{-- Status donut --}}

توزيع الحالات

{{-- Weekday distribution --}}

التوزيع الأسبوعي

{{-- Daily trend --}}

الاتجاه اليومي

{{-- Status breakdown table --}}

تفصيل الحالات

@foreach($statusMeta as $key => $meta) @php $count = (int) ($byStatus[$key] ?? 0); @endphp @if($count > 0 || $loop->index < 4) @php $pct = $total > 0 ? round($count / $total * 100, 1) : 0; @endphp @endif @endforeach
الحالة العدد النسبة
{{ $meta['label'] }} {{ number_format($count) }}
{{ $pct }}%
الإجمالي {{ number_format($total) }}
@endif @endsection @push('scripts') @endpush