@extends('dashboard.layout.layout') @section('content')
{!! Form::textarea('', $driver->is_ban ? $driver->ban_reason : null, ['class' => 'form-control', 'readonly']) !!}
{{-- order --}}
{!! $orders->links() !!}
@foreach ($orders as $order) @endforeach
# {!! trans('dashboard.order.order_number') !!} {!! trans('dashboard.driver.driver') !!} {!! trans('dashboard.order.order_type') !!} {!! trans('dashboard.order.order_status') !!} {!! trans('dashboard.order.total_price') !!} {!! trans('dashboard.general.added_date') !!}
{{ $loop->iteration }} {{ $order->id }} {{ optional($order->driver)->fullname }} {{ trans('dashboard.order.order_types.' . $order->order_type) }} {!! trans('dashboard.order.statuses.' . $order->order_status) !!}
{{ $order->total_price }}
{{ $order->created_at->format('Y-m-d') }}
{{-- health --}}
{{ trans('dashboard.user.health_status') }}

{!! trans('dashboard.user.admin_accept_health_status') !!}

@if ($driver->health_certificate_type == 'image') @elseif ($driver->health_certificate_type == 'file') {{ str_after($driver->health_certificate, '___file_') }} @endif
{{-- wallet --}}
{!! $offers->links() !!}
@forelse ($offers as $offer) @if ($offer->order && $offer->order->client)

{{ optional(@$offer->order->client)->fullname }}

{{ $offer->offer_price }}

{!! trans('dashboard.driver_offer.driver_offer_price') !!}

{{ optional(@$offer->order->client)->clientOrders->count() }}

{{ trans('dashboard.order.order_count') }}

( {{ $offer->order->rates()->where(['client_id' => $offer->order->client_id, 'driver_id' => $offer->driver_id])->avg('rates.rate') ?? 0 }})

{!! trans('dashboard.client.client_rate_on_order') !!}
{!! trans('dashboard.driver_offer.offer_statuses.' . $offer->offer_status) !!}
@endif @empty
{{ trans('dashboard.order.no_offer_used') }}
@endforelse
{!! $offers->links() !!}
{{-- distance --}}
{!! $distances->links() !!}
@forelse ($distances as $distance_item) @if ($distance_item->order->client)

{{ optional(@$distance_item->order->client)->fullname }}

{{ $distance_item->distance_item_price }}

{{ optional(@$distance_item->order->client)->clientOrders->count() }}

{{ trans('dashboard.order.order_count') }}

( {{ $distance_item->order->rates()->where(['client_id' => $distance_item->order->client_id, 'driver_id' => $distance_item->driver_id])->avg('rates.rate') ?? 0 }})

{!! trans('dashboard.client.client_rate_on_order') !!}
{!! trans('dashboard.driver_order_distatnce.distance_item_statuses.' . $distance_item->order_distance_status) !!}
@endif @empty
{{ trans('dashboard.driver_order_distatnce.no_order_distance_used') }}
@endforelse
{!! $distances->links() !!}
{{-- financial record transactions --}}
{!! $financial_record_transactions->links() !!}
{{-- --}} @foreach ($financial_record_transactions as $financial_record_transaction) {{-- --}} {{-- --}} @endforeach
# {!! trans('dashboard.financial_record_transaction.transaction_type') !!} {!! trans('dashboard.financial_record_transaction.status') !!} {!! trans('dashboard.financial_record_transaction.amount') !!} {!! trans('dashboard.financial_record_transaction.total_wallet_before') !!} {!! trans('dashboard.financial_record_transaction.total_wallet_after') !!} {!! trans('dashboard.financial_record_transaction.main_wallet_before') !!} {!! trans('dashboard.financial_record_transaction.main_wallet_after') !!} {!! trans('dashboard.financial_record_transaction.dept_wallet_before') !!} {!! trans('dashboard.financial_record_transaction.dept_wallet_after') !!} {!! trans('dashboard.financial_record_transaction.free_balance_before') !!} {!! trans('dashboard.financial_record_transaction.free_balance_after') !!} {!! trans('dashboard.financial_record_transaction.temp_wallet_before') !!} {!! trans('dashboard.financial_record_transaction.temp_wallet_after') !!} {!! trans('dashboard.financial_record_transaction.point_wallet_before') !!} {!! trans('dashboard.financial_record_transaction.point_wallet_after') !!} {!! trans('dashboard.financial_record_transaction.teps_before') !!} {!! trans('dashboard.financial_record_transaction.teps_after') !!} {!! trans('dashboard.financial_record_transaction.transaction_id') !!} {!! trans('dashboard.financial_record_transaction.iban') !!}{!! trans('dashboard.financial_record_transaction.model_type') !!}{!! trans('dashboard.financial_record_transaction.second_user_id') !!} {!! trans('dashboard.general.added_date') !!}
{{ $loop->iteration }}
{{ trans('dashboard.financial_record_transaction.transaction_types.' . $financial_record_transaction->transaction_type) }}
{{ $financial_record_transaction->status != null ? trans("dashboard.financial_record_transaction.statuses.$financial_record_transaction->status") : trans('dashboard.general.deleted_item') }} {{ $financial_record_transaction->amount }} {{ $financial_record_transaction->total_wallet_before }} {{ $financial_record_transaction->total_wallet_after }} {{ $financial_record_transaction->main_wallet_before }} {{ $financial_record_transaction->main_wallet_after }} {{ $financial_record_transaction->dept_wallet_before }} {{ $financial_record_transaction->dept_wallet_after }} {{ $financial_record_transaction->free_balance_before }} {{ $financial_record_transaction->free_balance_after }} {{ $financial_record_transaction->temp_wallet_before }} {{ $financial_record_transaction->temp_wallet_after }} {{ $financial_record_transaction->point_wallet_before }} {{ $financial_record_transaction->point_wallet_after }} {{ $financial_record_transaction->teps_before }} {{ $financial_record_transaction->teps_after }}{{ $financial_record_transaction->model_type }}{{ $financial_record_transaction->transaction_id != null ? $financial_record_transaction->transaction_id : trans('dashboard.general.deleted_item') }} {{ $financial_record_transaction->iban != null ? $financial_record_transaction->iban : trans('dashboard.general.deleted_item') }} @if ($financial_record_transaction->user && $financial_record_transaction->user_id != $driver->id && !in_array(@$financial_record_transaction->user->user_type, ['admin', 'superadmin'])) {{ optional($financial_record_transaction->user)->fullname }} @else {{ optional($financial_record_transaction->user)->fullname }} @endif @if ($financial_record_transaction->second_user_id != $driver->id && !in_array(@$financial_record_transaction->secondUser->user_type, ['admin', 'superadmin', null])) {{ optional($financial_record_transaction->secondUser)->fullname }} @else {{ optional($financial_record_transaction->secondUser)->fullname ?? trans('dashboard.financial_record_transaction.system') }} @endif
{{ optional($financial_record_transaction->created_at)->format('Y-m-d') }}
{!! $financial_record_transactions->links() !!}
{{-- Packages --}}
{{ trans('dashboard.driver_package.driver_package') }}
{!! $packages->links() !!}
@forelse ($packages as $package)

{{ $package->name }}

{{ @$package->package_data_array['package_price'] }} {{ trans('dashboard.currency.rs') }}

{{ optional($package->subscribed_at)->format('Y-m-d') }}

{!! trans('dashboard.driver_package.subscribed_at') !!}

{{ optional($package->end_at)->format('Y-m-d') }}

{{ trans('dashboard.driver_package.end_at') }}
{!! trans('dashboard.driver_package.paid_status') !!}
{{ $package->subscribe_status }}
@empty
{{ trans('dashboard.driver_package.not_packages_used') }}
@endforelse
{!! $transfered_from_driver->links() !!}
@foreach ($transfered_from_driver as $transfer) @endforeach
# {!! trans('dashboard.transfer.amount') !!} {!! trans('dashboard.transfer.transfer_status') !!} {!! trans('dashboard.transfer.transaction_number') !!} {!! trans('dashboard.transfer.type') !!} {!! trans('dashboard.transfer.transfer_to') !!} {!! trans('dashboard.general.added_date') !!}
{{ $loop->iteration }} {{ $transfer->amount }} {{ $transfer->status ? trans("dashboard.transfer.statuses.$transfer->status") : trans('dashboard.general.deleted_item') }} {{ $transfer->id }}
{{ trans('dashboard.transfer.transaction_types.' . $transfer->transaction_type) }}
@if (!in_array(@$transfer->secondUser->user_type, ['admin', 'superadmin', null])) {{ optional($transfer->secondUser)->fullname }} @else {{ optional($transfer->secondUser)->fullname ?? trans('dashboard.financial_record_transaction.system') }} @endif
{{ $transfer->created_at->format('Y-m-d') }}
{!! $transfered_to_driver->links() !!}
@foreach ($transfered_to_driver as $transfer_to) @endforeach
# {!! trans('dashboard.transfer.amount') !!} {!! trans('dashboard.transfer.transfer_status') !!} {!! trans('dashboard.transfer.transaction_number') !!} {!! trans('dashboard.transfer.type') !!} {!! trans('dashboard.transfer.transfer_to') !!} {!! trans('dashboard.general.added_date') !!}
{{ $loop->iteration }} {{ $transfer_to->amount }} {{ $transfer_to->status ? trans("dashboard.transfer.statuses.$transfer_to->status") : trans('dashboard.general.deleted_item') }} {{ $transfer_to->id }}
{{ trans('dashboard.transfer.transaction_types.' . $transfer_to->transaction_type) }}
@if (!in_array(@$transfer_to->secondUser->user_type, ['admin', 'superadmin', null])) {{ optional($transfer_to->secondUser)->fullname }} @else {{ optional($transfer_to->secondUser)->fullname ?? trans('dashboard.financial_record_transaction.system') }} @endif
{{ $transfer_to->created_at->format('Y-m-d') }}
{!! $points->links() !!}
@foreach ($points as $point) @endforeach
# {!! trans('dashboard.point.creator') !!} {!! trans('dashboard.point.amount') !!} {!! trans('dashboard.point.points') !!} {!! trans('dashboard.point.point_status') !!} {!! trans('dashboard.point.used_status') !!} {!! trans('dashboard.point.used_type') !!} {!! trans('dashboard.general.added_date') !!}
{{ $loop->iteration }} {{ optional($point->creator)->fullname }} {{ $point->amount }}
{{ $point->points }}
{{ trans('dashboard.point.point_statuses.' . $point->status) }} {{ trans('dashboard.point.used_statuses.' . $point->is_used) }} {{ trans('dashboard.point.reasons.' . $point->reason) }}
{{ $point->created_at->format('Y-m-d') }}
{!! $points->links() !!}
{!! $notifications->links() !!}
{{-- --}} @foreach ($notifications as $notification) @php $data_title = ''; if (isset($notification->data['title'])) { if (!is_array($notification->data['title'])) { $data_title = trans($notification->data['title']); } elseif (isset($notification->data['title'][1])) { $data_title = trans($notification->data['title'][0], $notification->data['title'][1]); } elseif (!isset($notification->data['title'][1])) { $data_title = trans($notification->data['title'][0]); } else { $data_title = ''; } } $body = ''; if (isset($notification->data['body'])) { if (!is_array($notification->data['body'])) { $body = trans($notification->data['body']); } elseif (isset($notification->data['body'][1])) { $body = trans($notification->data['body'][0], $notification->data['body'][1]); } elseif (!isset($notification->data['body'][1])) { $body = trans($notification->data['body'][0]); } else { $body = ''; } } @endphp {{-- --}} @endforeach
# {{ trans('dashboard.notification.notification') }} {{ trans('dashboard.notification.sender') }} {{ trans('dashboard.general.read_at') }} {{ trans('dashboard.general.added_date') }}
{{ $loop->iteration }}
{{ str_limit($body, 100, ' ...') }}
{!! isset($notification->data['sender']) ? json_decode($notification->data['sender'])->fullname : trans('dashboard.notification.not_found') !!}
@if ($notification->read_at)
{{ $notification->read_at->isoFormat('D MMMM , Y ( h:mm a )') }}
@else
@endif
{{ $notification->created_at->format('Y-m-d') }}
{!! $notifications->links() !!}
{{ trans('dashboard.driver.elm_data') }}
{{ @optional($driver->driver)->elm_reply ? trans('dashboard.driver.elm.previous_check') : trans('dashboard.driver.elm.no_check_yet') }}
{{ @$driver->fullname }}
{{ trans('dashboard.user.identity_number') }} : {{ $driver->identity_number ?? trans('dashboard.general.no_data') }}
{!! trans('dashboard.general.phone') !!} : {{ $driver->phone }} {{$driver->phonecode}}
{!! trans('dashboard.driver.date_of_birth') !!} : {{ optional($driver->date_of_birth)->format("Y-m-d") ?? trans('dashboard.general.no_data') }}
{!! trans('dashboard.driver.date_of_birth_hijri') !!} : {{ optional($driver->date_of_birth_hijri)->format("Y-m-d") ?? trans('dashboard.general.no_data') }}
{!! trans('dashboard.car.license_serial_number') !!} : {{ @$driver->car->license_serial_number ?? trans('dashboard.general.no_data') }}
{!! trans('dashboard.car.plate_type') !!} : @if (@$driver->car->plate_type) {{ trans('dashboard.car.plate_types.'.$driver->car->plate_type) }} @else {!! trans('dashboard.general.no_data') !!} @endif
{!! trans('dashboard.car.plate_number') !!} : {{ @$driver->car->plate_number ?? trans('dashboard.general.no_data') }}
@if ($driver->identity_number) @endif

{!! trans('dashboard.driver.elm.reply') !!}

{!! trans('dashboard.user.wallet') !!}

{!! Form::text('total_wallet', $driver->total_wallet, ['class' => 'form-control total_wallet', 'id' => 'total_wallet', 'disabled','placeholder' => trans('dashboard.user.total_wallet')]) !!}
@if (auth()->user()->hasPermissions('driver', 'wallet'))
@endif
{!! Form::text('main_wallet', optional($driver)->wallet, ['class' => 'form-control main_wallet', 'aria-describedby' => 'button-addon3', 'placeholder' => trans('dashboard.user.wallet_value')]) !!} @if (auth()->user()->hasPermissions('driver', 'wallet'))
@endif
{!! Form::text('free_wallet_balance', optional($driver->financialRecord)->free_balance, ['class' => 'form-control user_wallet free_balance', 'aria-describedby' => 'button-addon2', 'placeholder' => trans('dashboard.user.free_wallet_balance')]) !!} @if (auth()->user()->hasPermissions('driver', 'wallet'))
@endif

{!! trans('dashboard.user.rating') !!}

{{ $driver->user_rate_percentage ? $driver->user_rate_percentage . '%' : '0%' }}

{{ $driver->ratedrivers->count() }} {{ $driver->ratedrivers->count() > 1 ? trans('dashboard.user.users_make_rate') : trans('dashboard.user.user_make_rate') }}
@if ($driver->car)

{!! trans('dashboard.car.car') !!}

CAR
@endif
{!! trans('dashboard.driver.other_drivers') !!}
@forelse ($other_drivers as $other_driver)
{{ mb_substr($other_driver->fullname, 0, 2, 'UTF-8') }} {{-- --}}
@empty
{!! trans('dashboard.driver.no_drivers') !!}
@endforelse
@include('dashboard.layout.notify_modal') @includeWhen(@$driver->driver->subscribed_package_id,'dashboard.driver.extend_package_modal') @include('dashboard.driver.change_package_modal') @include('dashboard.driver.refuse_health_data_modal') @endsection @section('vendor_styles') @endsection @section('page_styles') @endsection @section('vendor_scripts') @endsection @section('page_scripts') {{-- --}} @endsection