@extends('admin.layouts.admin') @section('title','Driver Profile') @section('page-title','Driver Profile') @section('content')
{{-- ================= LEFT: PROFILE + STATS ================= --}}
{{-- PROFILE --}}
@if($driver->is_online) @endif
{{ $driver->name }}
{{ $driver->email }}
{{ $driver->is_active ? 'Active' : 'Inactive' }} {{ $driver->is_online ? 'Online' : 'Offline' }}
{{-- TOGGLE --}}
@csrf
{{-- EARNINGS --}}
Total Earnings
LKR {{ number_format($driver->earnings ?? 0,2) }}
{{-- ================= RIGHT: DETAILS / ORDERS / KYC ================= --}}
{{-- DETAILS --}}
@php $fields = [ 'Phone' => $driver->phone, 'Zone' => $driver->zone_id, 'Vehicle Type' => $driver->vehicle_type, 'Vehicle No' => $driver->vehicle_no, 'License No' => $driver->license_no, 'Joined' => $driver->created_at->format('d M Y'), ]; @endphp @foreach($fields as $label => $value)
{{ $label }}
{{ $value ?? '—' }}
@endforeach
{{-- ORDERS --}}
@forelse($driver->orders ?? [] as $order) @empty @endforelse
# Status Total Date
#{{ $order->id }} {{ ucfirst($order->status) }} LKR {{ number_format($order->total,2) }} {{ $order->created_at->format('d M Y') }}
No orders found
{{-- KYC --}}
License Number
{{ $driver->license_no ?? 'Pending' }}
Verification Status
@if($driver->kyc_verified) Verified @else Pending @endif
{{-- ================= LIVE LOCATION ================= --}}
Live Driver Location
@endsection @push('scripts') @endpush