2018-03-12 07:00:42 +08:00
|
|
|
@extends('app')
|
2018-05-19 03:30:59 +08:00
|
|
|
@section('title', __('common.dashboard'))
|
2018-02-04 08:18:09 +08:00
|
|
|
|
2017-08-03 02:13:08 +08:00
|
|
|
@section('content')
|
2020-02-02 02:05:56 +08:00
|
|
|
<div class="row">
|
2017-08-05 09:17:04 +08:00
|
|
|
<div class="col-sm-8">
|
2018-04-04 01:06:06 +08:00
|
|
|
|
2020-02-02 02:05:56 +08:00
|
|
|
{{-- TOP BAR WITH BOXES --}}
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-sm-3">
|
|
|
|
<div class="card card-primary text-white dashboard-box">
|
|
|
|
<div class="card-body text-center">
|
|
|
|
<div class="icon-background">
|
|
|
|
<i class="fas fa-plane icon"></i>
|
|
|
|
</div>
|
|
|
|
<h3 class="header">{{ $user->flights }}</h3>
|
|
|
|
<h5 class="description">{{ trans_choice('common.flight', $user->flights) }}</h5>
|
2017-08-05 09:17:04 +08:00
|
|
|
</div>
|
2020-02-02 02:05:56 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
2018-04-04 01:06:06 +08:00
|
|
|
|
2020-02-02 02:05:56 +08:00
|
|
|
<div class="col-sm-3">
|
|
|
|
<div class="card card-primary text-white dashboard-box">
|
|
|
|
<div class="card-body text-center">
|
|
|
|
<div class="icon-background">
|
|
|
|
<i class="far fa-clock icon"></i>
|
|
|
|
</div>
|
2020-02-12 01:32:41 +08:00
|
|
|
<h3 class="header">@minutestotime($user->flight_time), {{$user->flight_time}}</h3>
|
2020-02-02 02:05:56 +08:00
|
|
|
<h5 class="description">@lang('dashboard.totalhours')</h5>
|
2017-08-05 09:17:04 +08:00
|
|
|
</div>
|
2020-02-02 02:05:56 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="col-sm-3">
|
|
|
|
<div class="card card-primary text-white dashboard-box">
|
|
|
|
<div class="card-body text-center">
|
|
|
|
<div class="icon-background"> {{--110px font-size--}}
|
|
|
|
<i class="fas fa-money-bill-alt icon"></i>
|
|
|
|
</div>
|
|
|
|
<h3 class="header">{{ optional($user->journal)->balance ?? 0 }}</h3>
|
|
|
|
<h5 class="description">@lang('dashboard.yourbalance')</h5>
|
2018-04-04 01:06:06 +08:00
|
|
|
</div>
|
2020-02-02 02:05:56 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
2018-04-04 01:06:06 +08:00
|
|
|
|
2020-02-02 02:05:56 +08:00
|
|
|
<div class="col-sm-3">
|
|
|
|
<div class="card card-primary text-white dashboard-box">
|
|
|
|
<div class="card-body text-center">
|
|
|
|
<div class="icon-background">
|
|
|
|
<i class="fas fa-map-marker icon"></i>
|
|
|
|
</div>
|
|
|
|
@if($user->current_airport)
|
|
|
|
<h3 class="header">{{ $user->curr_airport_id }}</h3>
|
|
|
|
@else
|
|
|
|
<h3 class="header">{{ $user->home_airport_id }}</h3>
|
|
|
|
@endif
|
|
|
|
<h5 class="description">@lang('airports.current')</h5>
|
2017-08-05 09:17:04 +08:00
|
|
|
</div>
|
2020-02-02 02:05:56 +08:00
|
|
|
</div>
|
2017-08-05 09:17:04 +08:00
|
|
|
</div>
|
|
|
|
|
2020-02-02 02:05:56 +08:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="card">
|
|
|
|
<div class="nav nav-tabs" role="tablist" style="background: #067ec1; color: #FFF;">
|
|
|
|
@lang('dashboard.yourlastreport')
|
|
|
|
</div>
|
2018-05-16 14:47:31 +08:00
|
|
|
@if($last_pirep === null)
|
2020-02-02 02:05:56 +08:00
|
|
|
<div class="card-body" style="text-align:center;">
|
|
|
|
@lang('dashboard.noreportsyet') <a
|
|
|
|
href="{{ route('frontend.pireps.create') }}">@lang('dashboard.fileonenow')</a>
|
|
|
|
</div>
|
2017-12-24 01:17:29 +08:00
|
|
|
@else
|
2020-02-02 02:05:56 +08:00
|
|
|
@include('pireps.pirep_card', ['pirep' => $last_pirep])
|
2017-12-24 01:17:29 +08:00
|
|
|
@endif
|
2020-02-02 02:05:56 +08:00
|
|
|
</div>
|
2017-08-05 09:20:30 +08:00
|
|
|
|
2020-02-02 02:05:56 +08:00
|
|
|
{{ Widget::latestNews(['count' => 1]) }}
|
2017-08-05 09:20:30 +08:00
|
|
|
|
2017-08-03 02:13:08 +08:00
|
|
|
</div>
|
2018-04-02 19:47:05 +08:00
|
|
|
|
|
|
|
{{-- Sidebar --}}
|
2017-08-05 09:17:04 +08:00
|
|
|
<div class="col-sm-4">
|
2020-02-02 02:05:56 +08:00
|
|
|
<div class="card">
|
|
|
|
<div class="nav nav-tabs" role="tablist" style="background: #067ec1; color: #FFF;">
|
|
|
|
@lang('dashboard.weatherat', ['ICAO' => $current_airport])
|
|
|
|
</div>
|
|
|
|
<div class="card-body">
|
|
|
|
<!-- Tab panes -->
|
|
|
|
<div class="tab-content">
|
|
|
|
{{ Widget::Weather(['icao' => $current_airport]) }}
|
|
|
|
</div>
|
2018-04-02 19:47:05 +08:00
|
|
|
</div>
|
2020-02-02 02:05:56 +08:00
|
|
|
</div>
|
2018-04-02 19:47:05 +08:00
|
|
|
|
2020-02-02 02:05:56 +08:00
|
|
|
<div class="card">
|
|
|
|
<div class="nav nav-tabs" role="tablist" style="background: #067ec1; color: #FFF;">
|
|
|
|
@lang('dashboard.recentreports')
|
2018-04-02 19:47:05 +08:00
|
|
|
</div>
|
2020-02-02 02:05:56 +08:00
|
|
|
<div class="card-body">
|
|
|
|
<!-- Tab panes -->
|
|
|
|
<div class="tab-content">
|
|
|
|
{{ Widget::latestPireps(['count' => 5]) }}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2018-04-02 19:47:05 +08:00
|
|
|
|
2020-02-02 02:05:56 +08:00
|
|
|
<div class="card">
|
|
|
|
<div class="nav nav-tabs" role="tablist" style="background: #067ec1; color: #FFF;">
|
|
|
|
@lang('common.newestpilots')
|
|
|
|
</div>
|
|
|
|
<div class="card-body">
|
|
|
|
<!-- Tab panes -->
|
|
|
|
<div class="tab-content">
|
|
|
|
{{ Widget::latestPilots(['count' => 5]) }}
|
|
|
|
</div>
|
2018-04-02 19:47:05 +08:00
|
|
|
</div>
|
2020-02-02 02:05:56 +08:00
|
|
|
</div>
|
2017-08-03 02:13:08 +08:00
|
|
|
</div>
|
2020-02-02 02:05:56 +08:00
|
|
|
</div>
|
2017-08-03 02:13:08 +08:00
|
|
|
@endsection
|