2018-03-12 07:00:42 +08:00
|
|
|
@extends('app')
|
2017-12-20 10:19:36 +08:00
|
|
|
@section('title', 'dashboard')
|
2018-02-04 08:18:09 +08:00
|
|
|
|
2017-08-03 02:13:08 +08:00
|
|
|
@section('content')
|
|
|
|
<div class="row">
|
2017-08-05 09:17:04 +08:00
|
|
|
<div class="col-sm-8">
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-sm-4">
|
|
|
|
<div class="card card-primary text-white" style="background: #067ec1; color: #FFF;">
|
|
|
|
<div class="card-block text-center">
|
2017-08-05 09:42:31 +08:00
|
|
|
<div style="float: left; position: absolute; display:block; top: 0px;font-size: 150px">
|
2018-02-23 01:34:57 +08:00
|
|
|
<i class="fas fa-plane" style="opacity: .1;"></i>
|
2017-08-05 09:42:31 +08:00
|
|
|
</div>
|
2018-03-13 06:58:12 +08:00
|
|
|
<h4 class="">{{ $user->flights }}</h4>
|
2017-08-05 09:17:04 +08:00
|
|
|
<h5 class="description" style="color: white;">{{ str_plural('flight', $user->flights) }}</h5>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="col-sm-4">
|
|
|
|
<div class="card card-primary text-white" style="background: #067ec1; color: #FFF;">
|
|
|
|
<div class="card-block text-center">
|
2017-08-05 09:42:31 +08:00
|
|
|
<div style="float: left; position: absolute; display:block; top: 0px;font-size: 150px">
|
2018-02-23 01:34:57 +08:00
|
|
|
<i class="far fa-clock" style="opacity: .1;"></i>
|
2017-08-05 09:42:31 +08:00
|
|
|
</div>
|
2018-03-13 06:58:12 +08:00
|
|
|
<h4 class="">{{ \App\Facades\Utils::minutesToTimeString($user->flight_time, false)}}</h4>
|
2017-08-05 09:17:04 +08:00
|
|
|
<h5 class="description" style="color: white;">total hours</h5>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="col-sm-4">
|
|
|
|
<div class="card card-primary text-white" style="background: #067ec1; color: #FFF;">
|
|
|
|
<div class="card-block text-center">
|
2017-08-05 09:42:31 +08:00
|
|
|
<div style="float: left; position: absolute; display:block; top: 0px;font-size: 150px">
|
2018-02-23 01:34:57 +08:00
|
|
|
<i class="fas fa-map-marker" style="opacity: .1;"></i>
|
2017-08-05 09:42:31 +08:00
|
|
|
</div>
|
2018-02-12 23:47:12 +08:00
|
|
|
@if($user->current_airport)
|
2018-03-13 06:58:12 +08:00
|
|
|
<h4 class="">{{ $user->current_airport->icao }}</h4>
|
2018-02-12 23:47:12 +08:00
|
|
|
@else
|
|
|
|
<h4 class="">-</h4>
|
|
|
|
@endif
|
2017-08-05 09:17:04 +08:00
|
|
|
<h5 class="description" style="color: white;">current airport</h5>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2017-12-24 01:17:29 +08:00
|
|
|
@if($last_pirep === null)
|
2017-08-05 09:20:30 +08:00
|
|
|
<div class="card">
|
|
|
|
<div class="nav nav-tabs" role="tablist" style="background: #067ec1; color: #FFF;">
|
|
|
|
Your Last Report
|
|
|
|
</div>
|
2017-12-24 01:17:29 +08:00
|
|
|
<div class="card-block" style="text-align:center;">
|
2018-03-13 06:58:12 +08:00
|
|
|
No reports yet. <a href="{{ route('frontend.pireps.create') }}">File one now.</a>
|
2017-08-05 09:20:30 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
2017-12-24 01:17:29 +08:00
|
|
|
@else
|
|
|
|
<div class="nav nav-tabs" role="tablist" style="background: #067ec1; color: #FFF;">
|
|
|
|
Your Last Report
|
|
|
|
</div>
|
2018-04-02 19:47:05 +08:00
|
|
|
@include('pireps.pirep_card', ['pirep' => $last_pirep])
|
2017-12-24 01:17:29 +08:00
|
|
|
@endif
|
2017-08-05 09:20:30 +08:00
|
|
|
|
2018-01-11 06:02:33 +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">
|
2018-04-02 19:47:05 +08:00
|
|
|
<div class="card">
|
|
|
|
<div class="nav nav-tabs" role="tablist" style="background: #067ec1; color: #FFF;">
|
|
|
|
Weather at {{ $current_airport }}
|
|
|
|
</div>
|
|
|
|
<div class="card-block">
|
|
|
|
<!-- Tab panes -->
|
|
|
|
<div class="tab-content">
|
|
|
|
{{ Widget::checkWx(['icao' => $current_airport]) }}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="card">
|
|
|
|
<div class="nav nav-tabs" role="tablist" style="background: #067ec1; color: #FFF;">
|
|
|
|
Recent Reports
|
|
|
|
</div>
|
|
|
|
<div class="card-block">
|
|
|
|
<!-- Tab panes -->
|
|
|
|
<div class="tab-content">
|
|
|
|
{{ Widget::latestPireps(['count' => 5]) }}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="card">
|
|
|
|
<div class="nav nav-tabs" role="tablist" style="background: #067ec1; color: #FFF;">
|
|
|
|
Newest Pilots
|
|
|
|
</div>
|
|
|
|
<div class="card-block">
|
|
|
|
<!-- Tab panes -->
|
|
|
|
<div class="tab-content">
|
|
|
|
{{ Widget::latestPilots(['count' => 5]) }}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2017-08-03 02:13:08 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
@endsection
|