@section('title', 'تقرير الورديات - ' . $station->name) @section('page-title', 'تقرير الورديات') @section('page-description', 'تقرير شامل لجميع الورديات مع إمكانية الإدارة والمتابعة')

إجمالي الورديات

{{ $stats['total_shifts'] }}

الورديات النشطة

{{ $stats['open_shifts'] }}

الورديات المغلقة

{{ $stats['closed_shifts'] }}

إجمالي المبيعات (ر.س)

{{ number_format($stats['total_sales'], 2) }}

@if($stats['shifts_by_status']->isNotEmpty())

الورديات حسب الحالة

@foreach($stats['shifts_by_status'] as $statusData)
{{ $statusData['status'] }} {{ $statusData['count'] }}
@endforeach
@endif @if($stats['shifts_by_employee']->isNotEmpty())

الورديات حسب الموظف

@foreach($stats['shifts_by_employee']->take(5) as $employeeData)
{{ $employeeData['employee_name'] }} {{ $employeeData['count'] }} وردية
@endforeach
@endif

سجل الورديات

@if($shifts->count() > 0)
@foreach($shifts as $shift) @endforeach
الوردية الموظف المضخة وقت البداية وقت النهاية المدة الحالة الإجراءات
#{{ $shift->id }}
{{ $shift->start_datetime->format('Y-m-d') }}
{{ substr($shift->user->name ?? 'غير محدد', 0, 1) }}
{{ $shift->user->name ?? 'غير محدد' }}
{{ $shift->pump->name ?? 'غير محدد' }} {{ $shift->start_datetime->format('Y-m-d H:i') }} @if($shift->end_datetime) {{ $shift->end_datetime->format('Y-m-d H:i') }} @else جارية @endif @if($shift->end_datetime) @php $duration = $shift->start_datetime->diff($shift->end_datetime); $hours = $duration->h + ($duration->days * 24); $minutes = $duration->i; @endphp {{ $hours }}س {{ $minutes }}د @else - @endif @php $statusClasses = [ 'open' => 'bg-green-100 text-green-800', 'closed' => 'bg-yellow-100 text-yellow-800', 'reconciled' => 'bg-blue-100 text-blue-800', 'discrepancy' => 'bg-red-100 text-red-800', 'cancelled' => 'bg-gray-100 text-gray-800', 'pending_approval' => 'bg-purple-100 text-purple-800', ]; $statusTexts = [ 'open' => 'نشطة', 'closed' => 'مغلقة', 'reconciled' => 'مطابقة', 'discrepancy' => 'تضارب', 'cancelled' => 'ملغية', 'pending_approval' => 'في انتظار الموافقة', ]; @endphp {{ $statusTexts[$shift->status] ?? $shift->status }}
@if($shift->status === 'open') @elseif($shift->status === 'reconciled' && Auth::user()->user_type === 'station_manager') @endif
{{ $shifts->appends(request()->query())->links() }}
@else

لا توجد ورديات

لم يتم العثور على ورديات في الفترة المحددة.

@endif
@push('scripts') @endpush