{{ __('admin.dashboard_hello', ['name' => auth()->user()->Name]) }}

@if ($overview)

{{ __('overview.company_title', ['name' => $organisationName]) }}

@foreach (['users', 'vehicles', 'trips'] as $stat)
{{ __('overview.'.$stat) }}
{{ $overview[$stat] }}
@endforeach
@if (\Illuminate\Support\Facades\Route::has('web.trips.index') && \Illuminate\Support\Facades\Gate::allows('trips.approve'))

{{ __('overview.to_approve') }}

@endif

{{ __('overview.units_title') }}

{{ __('overview.units_help') }}

@if ($overview['units']->isEmpty())

{{ __('overview.no_units') }}

@else
@foreach ($overview['units'] as $unit) @endforeach
{{ __('overview.unit') }} {{ __('overview.module') }} {{ __('admin.status') }} {{ __('overview.trips') }} {{ __('overview.last_trip') }}
{{ $unit->vehicle->name }} {{ $unit->vehicle->module_key === null ? __('vehicles.module_missing') : __('vehicles.module_linked') }} {{ $unit->vehicle->is_active ? __('admin.active') : __('admin.inactive') }} {{ $unit->trips }} {{ $unit->last_trip ?? '–' }}
@endif
@elseif ($companies)

{{ __('overview.companies_title') }}

{{ __('overview.choose_company') }}

{{ __('overview.companies') }}
{{ $companies->count() }}
@include('web.organisations._table', ['companies' => $companies, 'prefix' => 'company'])
@endif @if (count($links) > 0) @elseif (! $overview && ! $companies)

{{ __('admin.dashboard_empty') }}

@endif