Bid check for flights/show (#1278)
* Update FlightController.php Add missing $bid to flight/show so when needed Load In Acars button can be placed there too. * Update show.blade.php Add Load In Acars button to flight details page (flights/show.blade.php)
This commit is contained in:
@@ -223,9 +223,13 @@ class FlightController extends Controller
|
|||||||
|
|
||||||
$map_features = $this->geoSvc->flightGeoJson($flight);
|
$map_features = $this->geoSvc->flightGeoJson($flight);
|
||||||
|
|
||||||
|
// See if the user has a bid for this flight
|
||||||
|
$bid = Bid::where(['user_id' => Auth::id(), 'flight_id' => $flight->id])->first();
|
||||||
|
|
||||||
return view('flights.show', [
|
return view('flights.show', [
|
||||||
'flight' => $flight,
|
'flight' => $flight,
|
||||||
'map_features' => $map_features,
|
'map_features' => $map_features,
|
||||||
|
'bid' => $bid,
|
||||||
'acars_plugin' => $this->moduleSvc->isModuleActive('VMSAcars'),
|
'acars_plugin' => $this->moduleSvc->isModuleActive('VMSAcars'),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,7 +6,14 @@
|
|||||||
<div class="col-8">
|
<div class="col-8">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<h2>{{ $flight->ident }}</h2>
|
<h2>
|
||||||
|
{{ $flight->ident }}
|
||||||
|
@if ($acars_plugin && $bid)
|
||||||
|
<a href="vmsacars:bid/{{$bid->id}}" class="btn btn-info btn-sm float-right">Load in vmsACARS</a>
|
||||||
|
@elseif ($acars_plugin)
|
||||||
|
<a href="vmsacars:flight/{{$flight->id}}" class="btn btn-info btn-sm float-right">Load in vmsACARS</a>
|
||||||
|
@endif
|
||||||
|
</h2>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|||||||
Reference in New Issue
Block a user