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

120 lines
4.6 KiB
PHP
Raw Normal View History

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