Fix saving PIREPs as draft

This commit is contained in:
Nabeel Shahzad
2018-05-29 11:04:28 -05:00
parent e02ae682a8
commit d76b264238
12 changed files with 125 additions and 56 deletions

View File

@@ -21,6 +21,7 @@ return [
'download' => 'Download|Downloads',
'from' => 'from',
'to' => 'to',
'state' => 'State',
'status' => 'Status',
'departure' => 'Departure',
'arrival' => 'Arrival',

View File

@@ -21,6 +21,7 @@ return [
'download' => 'Download|Downloads',
'from' => 'da',
'to' => 'a',
'state' => 'Stato',
'status' => 'Stato',
'departure' => 'Partenza',
'arrival' => 'Arrivo',

View File

@@ -38,11 +38,13 @@
{{ Utils::minutesToTimeString($pirep->flight_time) }}
</span>
</div>
<div><span class="description"><b>Aircraft</b>&nbsp;
{{ $pirep->aircraft->registration }}
({{ $pirep->aircraft->name }})
</span>
</div>
@if($pirep->aircraft)
<div><span class="description"><b>Aircraft</b>&nbsp;
{{ $pirep->aircraft->registration }}
({{ $pirep->aircraft->name }})
</span>
</div>
@endif
@if(filled($pirep->level))
<div>
<span class="description"><b>Flight Level</b>&nbsp;

View File

@@ -95,7 +95,7 @@
<li class="nav-item">
<a class="nav-link" href="{{ url('/logout') }}">
<i class="fas fa-sign-out-alt"></i>
<p>@lang('auth.logout')</p>
<p>@lang('common.logout')</p>
</a>
</li>
@endif

View File

@@ -6,16 +6,7 @@
<div class="col-8">
<div class="row">
<div class="col-12">
<p>
<h2 style="margin-bottom: 5px;">{{$pirep->airline->code}}{{ $pirep->ident }}</h2>
<p>
@if($pirep->state === PirepState::IN_PROGRESS)
@else
@lang('pireps.arrived') {{$pirep->created_at->diffForHumans()}}
@endif
</p>
</p>
<h2 style="margin-bottom: 5px;">{{$pirep->airline->code}}{{ $pirep->ident }}</h2>
</div>
</div>
<div class="row">
@@ -101,6 +92,16 @@
</div>
@endif
<table class="table table-striped">
<tr>
<td width="30%">@lang('common.state')</td>
<td>
<div class="badge badge-info">
{{ PirepState::label($pirep->state) }}
</div>
</td>
</tr>
<tr>
<td width="30%">@lang('common.status')</td>
<td>

View File

@@ -33,7 +33,13 @@
'id' => $pirep->arr_airport->icao
])}}">{{$pirep->arr_airport->icao}}</a>)
</td>
<td>{{ $pirep->aircraft->name }}</td>
<td>
@if($pirep->aircraft)
{{ $pirep->aircraft->name }}
@else
-
@endif
</td>
<td class="text-center">
{{ (new \App\Support\Units\Time($pirep->flight_time)) }}
</td>

View File

@@ -7,7 +7,9 @@
<td>
{{ $p->dpt_airport_id }}-
{{ $p->arr_airport_id }}&nbsp;
{{ $p->aircraft->name }}
@if($p->aircraft)
{{ $p->aircraft->name }}
@endif
</td>
</tr>
@endforeach