@extends('layouts.admin') @php $currencySymbol = App\Models\AppSetting::getValue('currency_symbol', '?'); @endphp @section('title', 'Edit Driver') @section('header', 'Edit Driver') @section('styles') @endsection @section('content')
Driver Information
@csrf @method('PUT')
@error('name')
{{ $message }}
@enderror
@error('email')
{{ $message }}
@enderror
@error('phone')
{{ $message }}
@enderror
@error('password')
{{ $message }}
@enderror
@error('vehicle_type')
{{ $message }}
@enderror
@error('vehicle_number')
{{ $message }}
@enderror
@error('license_number')
{{ $message }}
@enderror
Auto Delivery Zone
{{ optional($driver->deliveryArea)->name ?? 'Use current location or search to detect zone' }}
{{ optional($driver->deliveryArea)->description ?? 'Zone will be fetched automatically from the selected map location.' }}
Search manually, use browser location, or drag the map marker to set driver location.
@error('address')
{{ $message }}
@enderror @error('latitude')
{{ $message }}
@enderror @error('longitude')
{{ $message }}
@enderror
Leave blank to use global limit: {{ $globalMaxActiveOrders }} active order{{ $globalMaxActiveOrders == 1 ? '' : 's' }}. @error('max_active_orders')
{{ $message }}
@enderror
@include('admin.partials.payout-account-fields', ['values' => [ 'account_holder_name' => old('account_holder_name', $driver->account_holder_name), 'bank_name' => old('bank_name', $driver->bank_name), 'account_number' => old('account_number', $driver->account_number), 'ifsc_code' => old('ifsc_code', $driver->ifsc_code), 'upi_id' => old('upi_id', $driver->upi_id), 'stripe_account_id' => old('stripe_account_id', $driver->stripe_account_id ?? $driver->gateway_account_id), 'gateway_account_id' => old('gateway_account_id', $driver->gateway_account_id ?? $driver->stripe_account_id), ]])
is_active) ? 'checked' : '' }}>
Cancel
Driver Stats
Total Orders: {{ $driver->orders_count ?? 0 }}
Total Earnings: {{ $currencySymbol }}{{ number_format($driver->orders_sum_delivery_fee ?? 0, App\Models\AppSetting::currencyDecimals()) }}
Joined: {{ $driver->created_at->format('d M Y') }}
@endsection @section('scripts') @include('partials.google-maps-shim') @php $deliveryAreasPayload = $deliveryAreas->map(fn ($area) => [ 'id' => $area->id, 'name' => $area->name, 'area_type' => $area->area_type, 'description' => $area->description, 'latitude' => $area->latitude, 'longitude' => $area->longitude, 'radius_km' => $area->radius_km, 'polygon_coordinates' => $area->polygon_coordinates, ])->values(); @endphp @endsection