@extends('app') @section('title', __('common.profile')) @include('theme_helpers') @php $units = isset($units) ? $units : DT_GetUnits(); $DBasic = isset($DBasic) ? $DBasic : check_module('DisposableBasic'); $DSpecial = isset($DSpecial) ? $DSpecial : check_module('DisposableSpecial'); $Auth_ID = Auth::id(); $ivao_id = optional($user->fields->firstWhere('name', Theme::getSetting('gen_ivao_field')))->value; $vatsim_id = optional($user->fields->firstWhere('name', Theme::getSetting('gen_vatsim_field')))->value; $AdminCheck = false; @endphp @ability('admin', 'admin-access') @php $AdminCheck = true; @endphp @endability @section('content')
{{-- Pilot ID Card --}}
@if(Theme::getSetting('roster_ident')) {{ $user->ident.' | ' }} @if(filled($user->callsign)) {{ $user->callsign.' > ' }} @endif @endif {{ $user->name_private }}
@if($user->avatar == null) @else @endif
@if($user->id === $Auth_ID) @endif
{{ optional($user->airline)->name.' / '.optional($user->rank)->name }}
{{ $ivao_id }} {{ $vatsim_id }}
E-mail
@lang('profile.apikey')
{{-- Action Buttons --}} @if($user->id === $Auth_ID) @endif
{{-- Inline Navigation --}}
{{-- Info Boxes --}}
{{-- Current Airport --}}
@if(filled($user->curr_airport_id) || filled($user->home_airport_id)) {{ $user->curr_airport_id ?? $user->home_airport_id }} @else -- @endif
{{-- Last Pirep --}}
@if($user->last_pirep) {{ $user->last_pirep->submitted_at->diffForHumans() }} @else -- @endif
{{-- Flights --}}
{{ $user->flights }}
{{-- Flight Time --}}
@minutestotime($user->flight_time)
{{-- Transfer Time --}} @if(setting('pilots.allow_transfer_hours') === true || filled($user->transfer_time))
@minutestohours($user->transfer_time)h
@endif
@if($DBasic && $user->flights > 0)
@widget('DBasic::PersonalStats', ['disp' => 'full', 'user' => $user->id, 'type' => 'avgscore']) {{-- User Balance and Last Transactions Display --}} @if($Auth_ID || $AdminCheck) @widget('DBasic::JournalDetails', ['user' => $user->id, 'card' => true, 'limit' => 20]) @endif {{-- End User Balance Section --}}
@widget('DBasic::PersonalStats', ['disp' => 'full', 'user' => $user->id, 'type' => 'avglanding']) @if(Theme::getSetting('gen_stable_approach')) @widget('DBasic::PersonalStats', ['disp' => 'full', 'user' => $user->id, 'type' => 'fdm']) @endif
@widget('DBasic::PersonalStats', ['disp' => 'full', 'user' => $user->id, 'type' => 'avgtime']) @if($DSpecial) @widget('DBasic::PersonalStats', ['disp' => 'full', 'user' => $user->id, 'type' => 'assignment']) @endif
@widget('DBasic::PersonalStats', ['disp' => 'full', 'user' => $user->id, 'type' => 'avgdistance']) @widget('DBasic::PersonalStats', ['disp' => 'full', 'user' => $user->id, 'type' => 'totdistance'])
@widget('DBasic::PersonalStats', ['disp' => 'full', 'user' => $user->id, 'type' => 'avgfuel']) @widget('DBasic::PersonalStats', ['disp' => 'full', 'user' => $user->id, 'type' => 'totfuel'])
@endif
@if($Auth_ID)
@include('profile.user_fields')
@endif @if($user->typeratings->count() > 0)
@include('profile.user_typeratings')
@endif @if(filled($user->awards))
@include('profile.user_awards')
@endif @if($DBasic && $user->flights > 0)
@include('profile.user_stats')
@widget('DBasic::UserPireps', ['user' => $user->id, 'limit' => 50])
@endif
@endsection @section('scripts') @parent @endsection