This repository has been archived by the owner on Sep 14, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added a lot of features I cannot track. Better tracking next time.
- Loading branch information
1 parent
364857e
commit 2e483d7
Showing
19 changed files
with
250 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -120,4 +120,8 @@ public function destroy($id) | |
{ | ||
// | ||
} | ||
public function addHub(Request $request) | ||
{ | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
@extends('layouts.admin') | ||
@section('head') | ||
<link href="{{URL::asset('https://cdn.datatables.net/1.10.13/css/dataTables.bootstrap4.min.css')}}" rel="stylesheet"> | ||
<link href="{{URL::asset('/crewops/vendor/datatables-responsive/dataTables.responsive.css')}}" rel="stylesheet"> | ||
@endsection | ||
@section('breadcrumb') | ||
<li class="breadcrumb-item">Home</li> | ||
<li class="breadcrumb-item"><a href="{{ url('admin/') }}">Admin</a> | ||
</li> | ||
<li class="breadcrumb-item active">Hubs</li> | ||
@endsection | ||
|
||
@section('content') | ||
<div class="col-sm-12"> | ||
<div class="card"> | ||
<div class="card-header"> | ||
<i class="fa fa-align-justify"></i> Airline Hubs | ||
</div> | ||
<div class="card-block"> | ||
<div class="card-block"> | ||
|
||
@if(session('hub_created')) | ||
<div class="alert alert-success">Hub successfully created.</div> | ||
@elseif(session('hub_updated')) | ||
<div class="alert alert-success">Hub successfully updated.</div> | ||
@endif | ||
|
||
<a href="{{ url('admin/airlines/hub/create') }}" role="button" class="button btn btn-primary"><i class="fa fa-plus"></i> New Hub</a> | ||
</div> | ||
@if($fleet == '[]') | ||
<div class="alert alert-info" role="alert"> | ||
<strong>No Hubs Found:</strong> The server returned no hubs in the system. | ||
</div> | ||
@else | ||
<table id="table_id" class="table table-striped table-hover"> | ||
<thead> | ||
<tr> | ||
<th>Airline</th> | ||
<th>Airport</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
@foreach($hub as $a) | ||
<tr> | ||
@if($a->airline != null) | ||
<td>{{$a->airline->icao}}</td> | ||
@else | ||
<td>N/A</td> | ||
@endif | ||
<td>{{$a->icao}}</td> | ||
<td>{{$a->manufacturer}}</td> | ||
<td>{{$a->name}}</td> | ||
<td>{{$a->registration}}</td> | ||
@if($a->hub == null) | ||
<td>Not Assigned</td> | ||
@else | ||
<td>{{$a->hub->icao}}</td> | ||
@endif | ||
@if($a->location == null) | ||
<td>N/A</td> | ||
@else | ||
<td>{{$a->location->icao}}</td> | ||
@endif | ||
|
||
<td> | ||
<a href="{{ url('/admin/fleet/'.$a->id.'/edit') }}" class="btn btn-primary btn-sm">Edit</a> | ||
</td> | ||
|
||
</tr> | ||
@endforeach | ||
</tbody> | ||
</table> | ||
@endif | ||
</div> | ||
</div> | ||
</div> | ||
@endsection | ||
@section('js') | ||
<script type="text/javascript"> | ||
$(document).ready( function () { | ||
$('#table_id').DataTable( { | ||
responsive: true, | ||
"autoWidth": false | ||
}); | ||
/* | ||
$(".clickable-row").click(function() { | ||
window.document.location = $(this).data("href"); | ||
}); | ||
*/ | ||
$(".clickable-row").click(function() { | ||
return false; | ||
}).dblclick(function() { | ||
window.document.location = this.href; | ||
return false; | ||
}); | ||
}); | ||
</script> | ||
<script src="{{URL::asset('/crewops/vendor/datatables/js/jquery.dataTables.min.js')}}"></script> | ||
<script src="{{URL::asset('/crewops/vendor/datatables-plugins/dataTables.bootstrap.min.js')}}"></script> | ||
<script src="{{URL::asset('/crewops/vendor/datatables-responsive/dataTables.responsive.js')}}"></script> | ||
@endsection |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
@extends('layouts.crewops') | ||
|
||
@section('content') | ||
<div class="z-depth-2" style="position: relative; width: 100%; height: 300px; overflow: hidden; background: url('{{ Auth::user()->cover_url }}'), url(http://i.imgur.com/3UZDNCM.png); background-repeat: no-repeat; | ||
background-position: center; | ||
background-size: cover;"> | ||
<div style="height: 100%; background: linear-gradient(rgba(255,0,0,0), rgba(255,0,0,0), rgba(69,69,69,0.9))"> | ||
</div> | ||
<div class="container" style="position: inherit;"> | ||
<div style="position: absolute; right: 0; bottom: 1rem;"> | ||
<div id="status" class="card"> | ||
<div id="status-text" class="card-content white-text"></div> | ||
</div> | ||
</div> | ||
</div> | ||
<h3 class="white-text" style="position: absolute; bottom: 0; left: 2rem;">{{ $p->airline->icao }}{{ $p->flightnum }} Details</h3> | ||
</div> | ||
<div class="container"> | ||
<div class="row"> | ||
<div class="col l6 s12"> | ||
<div class="card"> | ||
<div class="card-content"> | ||
<h4>Crew Information</h4> | ||
<div id="captain"> | ||
<ul class="collection with-header"> | ||
<li class="collection-item"><div>Username<div class="secondary-content">{{ $p->user->username }}</div></div></li> | ||
<li class="collection-item"><div>Pilot ID<div class="secondary-content">{{ $p->user->pilotid }}</div></div></li> | ||
<li class="collection-item"><div>Full Name<div class="secondary-content">{{ $p->user->first_name }} {{ $p->user->last_name }}</div></div></li> | ||
<li class="collection-item"><div>Join Date<div class="secondary-content">{{ date('d/m/Y', strtotime($p->user->created_at)) }}</div></div></li> | ||
<li class="collection-item"><div>Avg Landing Rate<div class="secondary-content">{{ \App\PIREP::where('user_id', $p->user->id)->avg('landingrate') }}</div></div></li> | ||
<li class="collection-item"><div>Total Hours<div class="secondary-content">{{ \App\PIREP::where('user_id', $p->user->id)->sum('flighttime') }}</div></div></li> | ||
|
||
</ul> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="col l6 s12"> | ||
<div class="card"> | ||
<div class="card-content"> | ||
<h4>Flight Information</h4> | ||
<ul class="tabs tabs-fixed-width"> | ||
<li class="tab"><a href="#basic">Basic Information</a></li> | ||
@if($p->acars_client === "smartCARS") | ||
<li class="tab"><a href="#sclogtab">smartCARS Logs</a></li> | ||
@endif | ||
</ul> | ||
<div id="basic"> | ||
<ul class="collection with-header"> | ||
<li class="collection-item"><div>Airline<div class="secondary-content">{{ $p->airline->name }}</div></div></li> | ||
<li class="collection-item"><div>Flight<div class="secondary-content">{{ $p->flightnum }}</div></div></li> | ||
<li class="collection-item"><div>Departure<div class="secondary-content">{{ $p->depapt->icao }} {{ $p->depapt->name }}</div></div></li> | ||
<li class="collection-item"><div>Arrival<div class="secondary-content">{{ $p->arrapt->icao }} {{ $p->arrapt->name }}</div></div></li> | ||
<li class="collection-item"><div>Aircraft<div class="secondary-content">{{ $p->aircraft->name }} - {{ $p->aircraft->registration }}</div></div></li> | ||
<li class="collection-item"><div>Distance Flown<div class="secondary-content">{{ $p->distance }}</div></div></li> | ||
<li class="collection-item"><div>Fuel Used<div class="secondary-content">{{ $p->fuel_used }}</div></div></li> | ||
<li class="collection-item"><div>Flight Time<div class="secondary-content">{{ $p->flighttime }}</div></div></li> | ||
<li class="collection-item"><div>Landing Rate<div class="secondary-content">{{ $p->landingrate }}</div></div></li> | ||
<li class="collection-item"><div>Aircraft<div class="secondary-content">{{ $p->aircraft->name }} - {{ $p->aircraft->registration }}</div></div></li> | ||
</ul> | ||
</div> | ||
<div id="sclogtab"> | ||
@if($p->acars_client === "smartCARS") | ||
<ul id="scLogs" class="collection with-header"> | ||
|
||
</ul> | ||
@endif | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
@endsection | ||
|
||
@section('js') | ||
<script> | ||
$(document).ready(function () { | ||
// Pull the data from the API so we can add stuff | ||
$.getJSON( "{{ config('app.url') }}api/v1/logbook/{{$p->id}}", function( data ) { | ||
console.log(data); | ||
if(data.acars_client = "smartCARS") { | ||
var logSplit = data.flight_data.split("*"); | ||
$.each(logSplit, function( index, value) { | ||
$("#scLogs").append('<li class="collection-item"><div>'+ value +'</div></li>') | ||
}); | ||
} | ||
// time to apply the flight status. | ||
switch(data.status) { | ||
case 0: | ||
$("#status").addClass("yellow darken-2"); | ||
$("#status-text").append('STATUS: <b>PENDING</b>'); | ||
break; | ||
case 1: | ||
$("#status").addClass("green"); | ||
$("#status-text").append('STATUS: <b>APPROVED</b>'); | ||
break; | ||
case 2: | ||
$("#status").addClass("red"); | ||
$("#status-text").append('STATUS: <b>DENIED</b>'); | ||
break; | ||
} | ||
}); | ||
}); | ||
</script> | ||
@endsection |
Oops, something went wrong.