Add flight route map; algorithm for picking from multiple nav points; some tests
This commit is contained in:
18
resources/views/layouts/default/flights/map.blade.php
Normal file
18
resources/views/layouts/default/flights/map.blade.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<h3 class="description">map</h3>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<div class="box-body">
|
||||
<div id="map" style="width: 100%; height: 800px"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@section('scripts')
|
||||
<script type="text/javascript">
|
||||
phpvms.render_route_map({
|
||||
features: {!! json_encode($coords['features']); !!},
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
@@ -1,23 +1,53 @@
|
||||
@extends('layouts.default.app')
|
||||
@section('title', 'Flight '.$flight->ident)
|
||||
|
||||
@section('content')
|
||||
<div class="row">
|
||||
@include('layouts.default.flights.show_fields')
|
||||
<div class="col-md-12">
|
||||
<h3 class="description">{!! $flight->ident !!} - {!! $flight->dpt_airport->full_name !!} to {!! $flight->arr_airport->full_name !!}</h3>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
@section('scripts')
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
$(".select2_dropdown").select2();
|
||||
|
||||
$(document).on('submit', 'form.pjax_form', function (event) {
|
||||
event.preventDefault();
|
||||
$.pjax.submit(event, '#subfleet_flight_wrapper', {push: false});
|
||||
});
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<table class="table">
|
||||
<tr>
|
||||
<td>Departure</td>
|
||||
<td>{!! $flight->dpt_airport->icao !!} @ {!! $flight->dpt_time !!}</td>
|
||||
</tr>
|
||||
|
||||
$(document).on('pjax:complete', function() {
|
||||
$(".select2_dropdown").select2();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<tr>
|
||||
<td>Arrival</td>
|
||||
<td>{!! $flight->arr_airport->icao !!} @ {!! $flight->arr_time !!}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Route Code/Leg:</td>
|
||||
<td>{!! $flight->route_code ?: '-' !!}/{!! $flight->route_leg ?: '-' !!}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Alternate Airport</td>
|
||||
<td>
|
||||
@if($flight->alt_airport_id)
|
||||
{!! $flight->alt_airport->full_name !!}
|
||||
@else
|
||||
-
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Route</td>
|
||||
<td>{!! $flight->route !!}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Notes</td>
|
||||
<td>{!! $flight->notes !!}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
@include('layouts.default.flights.map')
|
||||
@endsection
|
||||
|
||||
@@ -1,81 +0,0 @@
|
||||
<div class="form-group col-sm-6">
|
||||
<div class="box box-solid">
|
||||
<div class="box-header with-border">
|
||||
{{--<i class="fa fa-text-width"></i>--}}
|
||||
<h3 class="box-title">{!! Form::label('dpt_airport_id', 'Dep ICAO') !!}</h3>
|
||||
</div>
|
||||
<div class="box-body"><p class="lead">
|
||||
{!! $flight->dpt_airport->icao !!} - {!! $flight->dpt_airport->name !!}
|
||||
</p></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-sm-6">
|
||||
<div class="box box-solid">
|
||||
<div class="box-header with-border">
|
||||
{{--<i class="fa fa-text-width"></i>--}}
|
||||
<h3 class="box-title">{!! Form::label('arr_airport_id', 'Arrival ICAO') !!}</h3>
|
||||
</div>
|
||||
<div class="box-body"><p class="lead">
|
||||
{!! $flight->arr_airport->icao !!} - {!! $flight->arr_airport->name !!}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group col-sm-12">
|
||||
<div class="box box-primary">
|
||||
<div class="box-body">
|
||||
<!-- Route Code Field -->
|
||||
<div class="form-group">
|
||||
{!! Form::label('route_code', 'Route Code:') !!}
|
||||
{!! $flight->route_code !!}
|
||||
</div>
|
||||
|
||||
<!-- Route Leg Field -->
|
||||
<div class="form-group">
|
||||
{!! Form::label('route_leg', 'Route Leg:') !!}
|
||||
{!! $flight->route_leg !!}
|
||||
</div>
|
||||
|
||||
<!-- Alt Airport Id Field -->
|
||||
@if($flight->alt_airport_id)
|
||||
<div class="form-group">
|
||||
{!! Form::label('alt_airport_id', 'Alt Airport Id:') !!}
|
||||
<p>{!! $flight->alt_airport->icao !!}</p>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<!-- Route Field -->
|
||||
<div class="form-group">
|
||||
{!! Form::label('route', 'Route:') !!}
|
||||
<p>{!! $flight->route !!}</p>
|
||||
</div>
|
||||
|
||||
<!-- Dpt Time Field -->
|
||||
<div class="form-group">
|
||||
{!! Form::label('dpt_time', 'Departure Time:') !!}
|
||||
{!! $flight->dpt_time !!}
|
||||
</div>
|
||||
|
||||
<!-- Arr Time Field -->
|
||||
<div class="form-group">
|
||||
{!! Form::label('arr_time', 'Arrival Time:') !!}
|
||||
{!! $flight->arr_time !!}
|
||||
</div>
|
||||
|
||||
<!-- Notes Field -->
|
||||
<div class="form-group">
|
||||
{!! Form::label('notes', 'Notes:') !!}
|
||||
<p>{!! $flight->notes !!}</p>
|
||||
</div>
|
||||
|
||||
<!-- Active Field -->
|
||||
<div class="form-group">
|
||||
{!! Form::label('active', 'Active:') !!}
|
||||
<p>{!! $flight->active !!}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -11,11 +11,8 @@
|
||||
|
||||
@section('scripts')
|
||||
<script type="text/javascript">
|
||||
let opts = {
|
||||
features: {!! json_encode($coords['features']); !!},
|
||||
|
||||
};
|
||||
|
||||
phpvms.render_route_map(opts);
|
||||
phpvms.render_route_map({
|
||||
features: {!! json_encode($coords['features']); !!},
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
|
||||
Reference in New Issue
Block a user