@extends('admin.layouts.app') @section('title', 'إدارة الرحلات') @section('page-title', 'إدارة الرحلات') @section('page-icon', 'fas fa-route') @section('content') {{-- إحصائيات --}}
{{ $trips->total() }}
إجمالي الرحلات
{{ $trips->where('status', 'pending')->count() }}
في الانتظار
{{ $trips->where('status', 'started')->count() }}
قيد التنفيذ
{{ $trips->where('status', 'completed')->count() }}
مكتملة
{{-- فلاتر --}}
البحث والفلترة
{{-- جدول الرحلات --}}
قائمة الرحلات
{{ $trips->total() }} رحلة
@if($trips->count() > 0)
@foreach($trips as $trip) @endforeach
# السائق الراكب نقطة الانطلاق نقطة الوصول المسافة السعر الحالة التاريخ الإجراءات
{{ $trip->id }} @if($trip->driver)
@if($trip->driver->profile_photo) صورة السائق @else
@endif
{{ $trip->driver->name }}
{{ $trip->driver->phone }}
@else غير محدد @endif
@if($trip->passenger)
@if($trip->passenger->profile_photo) صورة الراكب @else
@endif
{{ $trip->passenger->name }}
{{ $trip->passenger->phone }}
@else غير محدد @endif
{{ Str::limit($trip->pickup_location, 30) }}
@if($trip->pickup_latitude && $trip->pickup_longitude) {{ number_format($trip->pickup_latitude, 6) }}, {{ number_format($trip->pickup_longitude, 6) }} @endif
{{ Str::limit($trip->dropoff_location, 30) }}
@if($trip->dropoff_latitude && $trip->dropoff_longitude) {{ number_format($trip->dropoff_latitude, 6) }}, {{ number_format($trip->dropoff_longitude, 6) }} @endif
@if($trip->distance) {{ $trip->distance }} كم @else غير محدد @endif @if($trip->fare) {{ number_format($trip->fare, 0) }} د.ع @else غير محدد @endif @switch($trip->status) @case('pending') في الانتظار @break @case('accepted') مقبولة @break @case('started') قيد التنفيذ @break @case('completed') مكتملة @break @case('cancelled') ملغية @break @default {{ $trip->status }} @endswitch
{{ $trip->created_at->format('Y-m-d') }}
{{ $trip->created_at->format('H:i') }}
{{ $trips->links('pagination::bootstrap-4') }}
@else
لا توجد رحلات
@endif
@endsection @section('scripts') @endsection