phpvms/resources/views/layouts/default/dashboard/index.blade.php

123 lines
4.9 KiB
PHP
Raw Normal View History

@extends('layouts.default.app')
@section('title', 'dashboard')
@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">
<div style="float: left; position: absolute; display:block; top: 0px;font-size: 150px">
<i class="fa fa-plane " style="opacity: .1;"></i>
</div>
2017-08-05 09:17:04 +08:00
<h4 class="">{!! $user->flights !!}</h4>
<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">
<div style="float: left; position: absolute; display:block; top: 0px;font-size: 150px">
<i class="fa fa-clock-o" style="opacity: .1;"></i>
</div>
2017-12-24 01:17:29 +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">
<div style="float: left; position: absolute; display:block; top: 0px;font-size: 150px">
<i class="fa fa-location-arrow" style="opacity: .1;"></i>
</div>
2017-08-05 09:17:04 +08:00
<h4 class="">{!! $user->current_airport->icao !!}</h4>
<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;">
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>
@include('layouts.default.pireps.pirep_card', ['pirep' => $last_pirep])
@endif
2017-08-05 09:20:30 +08:00
<div class="card">
2017-08-05 09:17:04 +08:00
<div class="nav nav-tabs" role="tablist" style="background: #067ec1; color: #FFF;">
News
</div>
<div class="card-block">
<!-- Tab panes -->
<div class="tab-content">
News goes here!
</div>
</div>
</div>
2017-08-05 09:20:30 +08:00
</div>
2017-08-05 09:17:04 +08:00
<div class="col-sm-4">
<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">
<table>
@foreach($pireps as $p)
<tr>
2018-01-04 22:26:07 +08:00
<td style="padding-right: 10px;">
<span class="title">{!! $p->airline->code !!}</span>
</td>
2017-08-05 09:17:04 +08:00
<td>
2018-01-04 22:26:07 +08:00
{!! $p->dpt_airport_id !!}-
{!! $p->arr_airport_id !!}&nbsp;
{!! $p->aircraft->name !!}
2017-08-05 09:17:04 +08:00
</td>
</tr>
@endforeach
</table>
</div>
</div>
</div>
2017-08-05 09:17:04 +08:00
<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">
<table>
@foreach($users as $u)
<tr>
2018-01-04 22:26:07 +08:00
<td style="padding-right: 10px;">
<span class="title">{!! $u->pilot_id !!}</span>
</td>
<td>{!! $u->name !!}</td>
2017-08-05 09:17:04 +08:00
</tr>
@endforeach
</table>
</div>
</div>
</div>
</div>
</div>
@endsection