Compare commits
14
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1f78434b71 | ||
|
|
723f66a382 | ||
|
|
27be992395 | ||
|
|
6160d57790 | ||
|
|
7fabd57e13 | ||
|
|
09453becf8 | ||
|
|
023313c681 | ||
|
|
d3b7d25abd | ||
|
|
7799867302 | ||
|
|
fd7c1b8314 | ||
|
|
c12cf0964a | ||
|
|
2202d5bf99 | ||
|
|
064682b71f | ||
|
|
3c9d419ebb |
@@ -76,3 +76,4 @@ error_log
|
|||||||
/config.php
|
/config.php
|
||||||
/config.bak.php
|
/config.bak.php
|
||||||
/VERSION
|
/VERSION
|
||||||
|
sync.sh
|
||||||
|
|||||||
@@ -0,0 +1,4 @@
|
|||||||
|
This file was added by Shift #54503 in order to open a
|
||||||
|
Pull Request since no other commits were made.
|
||||||
|
|
||||||
|
You should remove this file.
|
||||||
@@ -166,6 +166,27 @@ class ImportExport
|
|||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (strpos($split_values[0], '?') !== false) {
|
||||||
|
// This contains the query string, which turns it into a multi-level array
|
||||||
|
$query_str = explode('?', $split_values[0]);
|
||||||
|
$parent = trim($query_str[0]);
|
||||||
|
|
||||||
|
$children = [];
|
||||||
|
$kvp = explode('&', trim($query_str[1]));
|
||||||
|
foreach ($kvp as $items) {
|
||||||
|
if (!$items) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->kvpToArray($items, $children);
|
||||||
|
}
|
||||||
|
|
||||||
|
$ret[$parent] = $children;
|
||||||
|
|
||||||
|
return $ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
// This is not a query string, return it back untouched
|
||||||
return [$split_values[0]];
|
return [$split_values[0]];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,15 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use App\Contracts\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
class UpdateAwardsAddActive extends Migration
|
||||||
|
{
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
Schema::table('awards', function (Blueprint $table) {
|
||||||
|
$table->boolean('active')->default(true)->nullable()->after('ref_model_params');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -36,7 +36,8 @@ acars:
|
|||||||
sim_time: now
|
sim_time: now
|
||||||
created_at: 'now'
|
created_at: 'now'
|
||||||
updated_at: 'now'
|
updated_at: 'now'
|
||||||
- pirep_id: b68R5gwVzpVe
|
- id: 9aAN4mxlK9zb1
|
||||||
|
pirep_id: b68R5gwVzpVe
|
||||||
type: '0'
|
type: '0'
|
||||||
nav_type: null
|
nav_type: null
|
||||||
order: '0'
|
order: '0'
|
||||||
@@ -54,7 +55,8 @@ acars:
|
|||||||
sim_time: now
|
sim_time: now
|
||||||
created_at: 'now'
|
created_at: 'now'
|
||||||
updated_at: 'now'
|
updated_at: 'now'
|
||||||
- pirep_id: b68R5gwVzpVe
|
- id: 9aAN4mxlK9zb2
|
||||||
|
pirep_id: b68R5gwVzpVe
|
||||||
type: '0'
|
type: '0'
|
||||||
nav_type: null
|
nav_type: null
|
||||||
order: '0'
|
order: '0'
|
||||||
@@ -72,7 +74,8 @@ acars:
|
|||||||
sim_time: now
|
sim_time: now
|
||||||
created_at: 'now'
|
created_at: 'now'
|
||||||
updated_at: 'now'
|
updated_at: 'now'
|
||||||
- pirep_id: b68R5gwVzpVe
|
- id: 9aAN4mxlK9zb3
|
||||||
|
pirep_id: b68R5gwVzpVe
|
||||||
type: '0'
|
type: '0'
|
||||||
nav_type: null
|
nav_type: null
|
||||||
order: '0'
|
order: '0'
|
||||||
@@ -90,7 +93,8 @@ acars:
|
|||||||
sim_time: now
|
sim_time: now
|
||||||
created_at: 'now'
|
created_at: 'now'
|
||||||
updated_at: 'now'
|
updated_at: 'now'
|
||||||
- pirep_id: b68R5gwVzpVe
|
- id: 9aAN4mxlK9zb34
|
||||||
|
pirep_id: b68R5gwVzpVe
|
||||||
type: '0'
|
type: '0'
|
||||||
nav_type: null
|
nav_type: null
|
||||||
order: '0'
|
order: '0'
|
||||||
@@ -108,7 +112,8 @@ acars:
|
|||||||
sim_time: now
|
sim_time: now
|
||||||
created_at: 'now'
|
created_at: 'now'
|
||||||
updated_at: 'now'
|
updated_at: 'now'
|
||||||
- pirep_id: b68R5gwVzpVe
|
- id: 9aAN4mxlK9zb35
|
||||||
|
pirep_id: b68R5gwVzpVe
|
||||||
type: '0'
|
type: '0'
|
||||||
nav_type: null
|
nav_type: null
|
||||||
order: '0'
|
order: '0'
|
||||||
@@ -126,7 +131,8 @@ acars:
|
|||||||
sim_time: now
|
sim_time: now
|
||||||
created_at: 'now'
|
created_at: 'now'
|
||||||
updated_at: 'now'
|
updated_at: 'now'
|
||||||
- pirep_id: b68R5gwVzpVe
|
- id: 9aAN4mxlK9zb36
|
||||||
|
pirep_id: b68R5gwVzpVe
|
||||||
type: '0'
|
type: '0'
|
||||||
nav_type: null
|
nav_type: null
|
||||||
order: '0'
|
order: '0'
|
||||||
@@ -144,7 +150,8 @@ acars:
|
|||||||
sim_time: now
|
sim_time: now
|
||||||
created_at: 'now'
|
created_at: 'now'
|
||||||
updated_at: 'now'
|
updated_at: 'now'
|
||||||
- pirep_id: b68R5gwVzpVe
|
- id: 9aAN4mxlK9zb37
|
||||||
|
pirep_id: b68R5gwVzpVe
|
||||||
type: '0'
|
type: '0'
|
||||||
nav_type: null
|
nav_type: null
|
||||||
order: '0'
|
order: '0'
|
||||||
@@ -162,7 +169,8 @@ acars:
|
|||||||
sim_time: now
|
sim_time: now
|
||||||
created_at: 'now'
|
created_at: 'now'
|
||||||
updated_at: 'now'
|
updated_at: 'now'
|
||||||
- pirep_id: b68R5gwVzpVe
|
- id: 9aAN4mxlK9zb38
|
||||||
|
pirep_id: b68R5gwVzpVe
|
||||||
type: '0'
|
type: '0'
|
||||||
nav_type: null
|
nav_type: null
|
||||||
order: '0'
|
order: '0'
|
||||||
@@ -180,7 +188,8 @@ acars:
|
|||||||
sim_time: now
|
sim_time: now
|
||||||
created_at: 'now'
|
created_at: 'now'
|
||||||
updated_at: 'now'
|
updated_at: 'now'
|
||||||
- pirep_id: b68R5gwVzpVe
|
- id: 9aAN4mxlK9zb39
|
||||||
|
pirep_id: b68R5gwVzpVe
|
||||||
type: '0'
|
type: '0'
|
||||||
nav_type: null
|
nav_type: null
|
||||||
order: '0'
|
order: '0'
|
||||||
|
|||||||
@@ -34,6 +34,17 @@ airports:
|
|||||||
lon: -97.6698889
|
lon: -97.6698889
|
||||||
hub: 1
|
hub: 1
|
||||||
ground_handling_cost: 100
|
ground_handling_cost: 100
|
||||||
|
- id: KPHN
|
||||||
|
iata: HPN
|
||||||
|
icao: KPHN
|
||||||
|
name: Westchester County Airport
|
||||||
|
location: White Plains
|
||||||
|
country: United States
|
||||||
|
timezone: America/New_York
|
||||||
|
lat: 41.067
|
||||||
|
lon: -73.7076
|
||||||
|
hub: 1
|
||||||
|
ground_handling_cost: 100
|
||||||
- id: KJFK
|
- id: KJFK
|
||||||
iata: JFK
|
iata: JFK
|
||||||
icao: KJFK
|
icao: KJFK
|
||||||
@@ -448,6 +459,21 @@ flights:
|
|||||||
- id: flightid_1
|
- id: flightid_1
|
||||||
airline_id: 1
|
airline_id: 1
|
||||||
flight_number: 100
|
flight_number: 100
|
||||||
|
dpt_airport_id: KHPN
|
||||||
|
arr_airport_id: KJFK
|
||||||
|
route: DCT CMK V374 DENNA V44 BELTT/N0346F140 V44 DPK DCT
|
||||||
|
distance: 113
|
||||||
|
level: 110
|
||||||
|
dpt_time: 6PM CST
|
||||||
|
arr_time: 11PM EST
|
||||||
|
flight_time: 240
|
||||||
|
flight_type: J
|
||||||
|
load_factor: 100
|
||||||
|
created_at: NOW
|
||||||
|
updated_at: NOW
|
||||||
|
- id: flightid_2
|
||||||
|
airline_id: 1
|
||||||
|
flight_number: 101
|
||||||
dpt_airport_id: KAUS
|
dpt_airport_id: KAUS
|
||||||
arr_airport_id: KJFK
|
arr_airport_id: KJFK
|
||||||
route: KAUS SID TNV J87 IAH J2 LCH J22 MEI J239 ATL J52 AJFEB J14 BYJAC Q60 JAXSN J14 COLIN J61 HUBBS J55 SIE STAR KJFK
|
route: KAUS SID TNV J87 IAH J2 LCH J22 MEI J239 ATL J52 AJFEB J14 BYJAC Q60 JAXSN J14 COLIN J61 HUBBS J55 SIE STAR KJFK
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -137,6 +137,13 @@
|
|||||||
options: ''
|
options: ''
|
||||||
type: int
|
type: int
|
||||||
description: 'Initial zoom level on the map'
|
description: 'Initial zoom level on the map'
|
||||||
|
- key: acars.update_interval
|
||||||
|
name: 'Refresh Interval'
|
||||||
|
group: acars
|
||||||
|
value: 60
|
||||||
|
options: ''
|
||||||
|
type: int
|
||||||
|
description: 'How often the live map updates its data'
|
||||||
- key: airports.default_ground_handling_cost
|
- key: airports.default_ground_handling_cost
|
||||||
name: 'Default Ground Handling Cost'
|
name: 'Default Ground Handling Cost'
|
||||||
group: airports
|
group: airports
|
||||||
|
|||||||
@@ -300,14 +300,18 @@ class FlightController extends Controller
|
|||||||
public function export(Request $request)
|
public function export(Request $request)
|
||||||
{
|
{
|
||||||
$exporter = app(ExportService::class);
|
$exporter = app(ExportService::class);
|
||||||
$flights = $this->flightRepo->all();
|
|
||||||
|
$where = [];
|
||||||
|
$file_name = 'flights.csv';
|
||||||
|
if ($request->input('airline_id')) {
|
||||||
|
$airline_id = $request->input('airline_id');
|
||||||
|
$where['airline_id'] = $airline_id;
|
||||||
|
$file_name = 'flights-'.$airline_id.'.csv';
|
||||||
|
}
|
||||||
|
$flights = $this->flightRepo->where($where)->get();
|
||||||
|
|
||||||
$path = $exporter->exportFlights($flights);
|
$path = $exporter->exportFlights($flights);
|
||||||
return response()
|
return response()->download($path, $file_name, ['content-type' => 'text/csv'])->deleteFileAfterSend(true);
|
||||||
->download($path, 'flights.csv', [
|
|
||||||
'content-type' => 'text/csv',
|
|
||||||
])
|
|
||||||
->deleteFileAfterSend(true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -148,10 +148,10 @@ class AcarsController extends Controller
|
|||||||
$pirep = Pirep::find($id);
|
$pirep = Pirep::find($id);
|
||||||
$this->checkCancelled($pirep);
|
$this->checkCancelled($pirep);
|
||||||
|
|
||||||
Log::debug(
|
/*Log::debug(
|
||||||
'Posting ACARS update (user: '.Auth::user()->ident.', pirep id :'.$id.'): ',
|
'Posting ACARS update (user: '.Auth::user()->ident.', pirep id :'.$id.'): ',
|
||||||
$request->post()
|
$request->post()
|
||||||
);
|
);*/
|
||||||
|
|
||||||
$count = 0;
|
$count = 0;
|
||||||
$positions = $request->post('positions');
|
$positions = $request->post('positions');
|
||||||
@@ -223,7 +223,7 @@ class AcarsController extends Controller
|
|||||||
$pirep = Pirep::find($id);
|
$pirep = Pirep::find($id);
|
||||||
$this->checkCancelled($pirep);
|
$this->checkCancelled($pirep);
|
||||||
|
|
||||||
Log::debug('Posting ACARS log, PIREP: '.$id, $request->post());
|
// Log::debug('Posting ACARS log, PIREP: '.$id, $request->post());
|
||||||
|
|
||||||
$count = 0;
|
$count = 0;
|
||||||
$logs = $request->post('logs');
|
$logs = $request->post('logs');
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ use App\Models\Pirep;
|
|||||||
use App\Models\PirepComment;
|
use App\Models\PirepComment;
|
||||||
use App\Models\PirepFare;
|
use App\Models\PirepFare;
|
||||||
use App\Models\PirepFieldValue;
|
use App\Models\PirepFieldValue;
|
||||||
|
use App\Models\User;
|
||||||
use App\Repositories\JournalRepository;
|
use App\Repositories\JournalRepository;
|
||||||
use App\Repositories\PirepRepository;
|
use App\Repositories\PirepRepository;
|
||||||
use App\Services\Finance\PirepFinanceService;
|
use App\Services\Finance\PirepFinanceService;
|
||||||
@@ -235,8 +236,12 @@ class PirepController extends Controller
|
|||||||
Log::info('PIREP Update, user '.Auth::id());
|
Log::info('PIREP Update, user '.Auth::id());
|
||||||
Log::info($request->getContent());
|
Log::info($request->getContent());
|
||||||
|
|
||||||
|
/** @var User $user */
|
||||||
$user = Auth::user();
|
$user = Auth::user();
|
||||||
|
|
||||||
|
/** @var Pirep $pirep */
|
||||||
$pirep = Pirep::find($pirep_id);
|
$pirep = Pirep::find($pirep_id);
|
||||||
|
|
||||||
$this->checkCancelled($pirep);
|
$this->checkCancelled($pirep);
|
||||||
|
|
||||||
$attrs = $this->parsePirep($request);
|
$attrs = $this->parsePirep($request);
|
||||||
@@ -278,6 +283,7 @@ class PirepController extends Controller
|
|||||||
{
|
{
|
||||||
Log::info('PIREP file, user '.Auth::id(), $request->post());
|
Log::info('PIREP file, user '.Auth::id(), $request->post());
|
||||||
|
|
||||||
|
/** @var User $user */
|
||||||
$user = Auth::user();
|
$user = Auth::user();
|
||||||
|
|
||||||
// Check if the status is cancelled...
|
// Check if the status is cancelled...
|
||||||
@@ -332,7 +338,7 @@ class PirepController extends Controller
|
|||||||
*/
|
*/
|
||||||
public function cancel($pirep_id, Request $request)
|
public function cancel($pirep_id, Request $request)
|
||||||
{
|
{
|
||||||
Log::info('PIREP Cancel, user '.Auth::id(), $request->post());
|
Log::info('PIREP '.$pirep_id.' Cancel, user '.Auth::id(), $request->post());
|
||||||
|
|
||||||
$pirep = Pirep::find($pirep_id);
|
$pirep = Pirep::find($pirep_id);
|
||||||
$this->pirepSvc->cancel($pirep);
|
$this->pirepSvc->cancel($pirep);
|
||||||
|
|||||||
@@ -138,7 +138,7 @@ class RegisterController extends Controller
|
|||||||
|
|
||||||
Log::info('User registered: ', $user->toArray());
|
Log::info('User registered: ', $user->toArray());
|
||||||
|
|
||||||
$userFields = UserField::all();
|
$userFields = UserField::where(['show_on_registration' => true, 'active' => true])->get();
|
||||||
foreach ($userFields as $field) {
|
foreach ($userFields as $field) {
|
||||||
$field_name = 'field_'.$field->slug;
|
$field_name = 'field_'.$field->slug;
|
||||||
UserFieldValue::updateOrCreate([
|
UserFieldValue::updateOrCreate([
|
||||||
|
|||||||
@@ -91,8 +91,12 @@ class PirepController extends Controller
|
|||||||
*/
|
*/
|
||||||
public function aircraftList($add_blank = false)
|
public function aircraftList($add_blank = false)
|
||||||
{
|
{
|
||||||
|
$user = Auth::user();
|
||||||
|
$user_loc = filled($user->curr_airport_id) ? $user->curr_airport_id : $user->home_airport_id;
|
||||||
|
$location_check = setting('pireps.only_aircraft_at_dpt_airport', false);
|
||||||
|
|
||||||
$aircraft = [];
|
$aircraft = [];
|
||||||
$subfleets = $this->userSvc->getAllowableSubfleets(Auth::user());
|
$subfleets = $this->userSvc->getAllowableSubfleets($user);
|
||||||
|
|
||||||
if ($add_blank) {
|
if ($add_blank) {
|
||||||
$aircraft[''] = '';
|
$aircraft[''] = '';
|
||||||
@@ -100,7 +104,9 @@ class PirepController extends Controller
|
|||||||
|
|
||||||
foreach ($subfleets as $subfleet) {
|
foreach ($subfleets as $subfleet) {
|
||||||
$tmp = [];
|
$tmp = [];
|
||||||
foreach ($subfleet->aircraft as $ac) {
|
foreach ($subfleet->aircraft->when($location_check, function ($query) use ($user_loc) {
|
||||||
|
return $query->where('airport_id', $user_loc);
|
||||||
|
}) as $ac) {
|
||||||
$tmp[$ac->id] = $ac['name'].' - '.$ac['registration'];
|
$tmp[$ac->id] = $ac['name'].' - '.$ac['registration'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ class AwardHandler extends Listener
|
|||||||
*/
|
*/
|
||||||
public function checkForAwards($user)
|
public function checkForAwards($user)
|
||||||
{
|
{
|
||||||
$awards = Award::all();
|
$awards = Award::where('active', 1)->get();
|
||||||
foreach ($awards as $award) {
|
foreach ($awards as $award) {
|
||||||
$klass = $award->getReference($award, $user);
|
$klass = $award->getReference($award, $user);
|
||||||
if ($klass) {
|
if ($klass) {
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ class Award extends Model
|
|||||||
'image_url',
|
'image_url',
|
||||||
'ref_model',
|
'ref_model',
|
||||||
'ref_model_params',
|
'ref_model_params',
|
||||||
|
'active',
|
||||||
];
|
];
|
||||||
|
|
||||||
public static $rules = [
|
public static $rules = [
|
||||||
@@ -29,6 +30,7 @@ class Award extends Model
|
|||||||
'image_url' => 'nullable',
|
'image_url' => 'nullable',
|
||||||
'ref_model' => 'required',
|
'ref_model' => 'required',
|
||||||
'ref_model_params' => 'nullable',
|
'ref_model_params' => 'nullable',
|
||||||
|
'active' => 'nullable',
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ class Typerating extends Model
|
|||||||
'type',
|
'type',
|
||||||
'description',
|
'description',
|
||||||
'image_url',
|
'image_url',
|
||||||
|
'active',
|
||||||
];
|
];
|
||||||
|
|
||||||
// Validation
|
// Validation
|
||||||
|
|||||||
@@ -253,8 +253,9 @@ class FlightImporter extends ImportExport
|
|||||||
$fare_attributes = [];
|
$fare_attributes = [];
|
||||||
}
|
}
|
||||||
|
|
||||||
$fare = Fare::updateOrCreate(['code' => $fare_code], ['name' => $fare_code]);
|
$fare = Fare::firstOrCreate(['code' => $fare_code], ['name' => $fare_code]);
|
||||||
$this->fareSvc->setForFlight($flight, $fare, $fare_attributes);
|
$this->fareSvc->setForFlight($flight, $fare, $fare_attributes);
|
||||||
|
$fare->save();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -84,8 +84,9 @@ class SubfleetImporter extends ImportExport
|
|||||||
$fare_attributes = [];
|
$fare_attributes = [];
|
||||||
}
|
}
|
||||||
|
|
||||||
$fare = Fare::updateOrCreate(['code' => $fare_code], ['name' => $fare_code]);
|
$fare = Fare::firstOrCreate(['code' => $fare_code], ['name' => $fare_code]);
|
||||||
$this->fareSvc->setForSubfleet($subfleet, $fare, $fare_attributes);
|
$this->fareSvc->setForSubfleet($subfleet, $fare, $fare_attributes);
|
||||||
|
$fare->save();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -134,6 +134,11 @@ class Database
|
|||||||
->where($id_col, $row[$id_col])
|
->where($id_col, $row[$id_col])
|
||||||
->update($row);
|
->update($row);
|
||||||
} else {
|
} else {
|
||||||
|
// Remove ID column if it exists and its empty, let the DB set it
|
||||||
|
/*if (array_key_exists($id_col, $row) && empty($row[$id_col])) {
|
||||||
|
unset($row[$id_col]);
|
||||||
|
}*/
|
||||||
|
|
||||||
DB::table($table)->insert($row);
|
DB::table($table)->insert($row);
|
||||||
}
|
}
|
||||||
} catch (QueryException $e) {
|
} catch (QueryException $e) {
|
||||||
|
|||||||
+1
-1
@@ -2,7 +2,7 @@
|
|||||||
version: '3'
|
version: '3'
|
||||||
services:
|
services:
|
||||||
app:
|
app:
|
||||||
image: phpvms:latest
|
image: nabeelio/phpvms
|
||||||
environment:
|
environment:
|
||||||
DB_HOST: mysql
|
DB_HOST: mysql
|
||||||
REDIS_HOST: redis
|
REDIS_HOST: redis
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
@extends('admin.app')
|
@extends('admin.app')
|
||||||
@section('title', "Edit \"$award->title\" Award")
|
@section('title', "Edit \"$award->name\" Award")
|
||||||
@section('content')
|
@section('content')
|
||||||
<div class="card border-blue-bottom">
|
<div class="card border-blue-bottom">
|
||||||
<div class="content">
|
<div class="content">
|
||||||
|
|||||||
@@ -18,17 +18,13 @@
|
|||||||
<p class="text-danger">{{ $errors->first('name') }}</p>
|
<p class="text-danger">{{ $errors->first('name') }}</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="form-group col-sm-6">
|
<div class="form-group col-sm-6">
|
||||||
{!! Form::label('image', 'Image:') !!}
|
{!! Form::label('image', 'Image:') !!}
|
||||||
<div class="callout callout-info">
|
<div class="callout callout-info">
|
||||||
<i class="icon fa fa-info"> </i>
|
<i class="icon fa fa-info"> </i>
|
||||||
This is the image of the award. Be creative!
|
This is the image of the award. Be creative!
|
||||||
</div>
|
</div>
|
||||||
{!! Form::text('image_url', null, [
|
{!! Form::text('image_url', null, ['class' => 'form-control', 'placeholder' => 'Enter the url of the image location']) !!}
|
||||||
'class' => 'form-control',
|
|
||||||
'placeholder' => 'Enter the url of the image location'
|
|
||||||
]) !!}
|
|
||||||
<p class="text-danger">{{ $errors->first('image_url') }}</p>
|
<p class="text-danger">{{ $errors->first('image_url') }}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -47,29 +43,31 @@
|
|||||||
<div class="form-group col-sm-6">
|
<div class="form-group col-sm-6">
|
||||||
<div>
|
<div>
|
||||||
{{ Form::label('ref_model', 'Award Class:') }}
|
{{ Form::label('ref_model', 'Award Class:') }}
|
||||||
{{ Form::select('ref_model', $award_classes, null , [
|
{{ Form::select('ref_model', $award_classes, null, ['class' => 'form-control select2', 'id' => 'award_class_select']) }}
|
||||||
'class' => 'form-control select2',
|
|
||||||
'id' => 'award_class_select',
|
|
||||||
]) }}
|
|
||||||
<p class="text-danger">{{ $errors->first('ref_model') }}</p>
|
<p class="text-danger">{{ $errors->first('ref_model') }}</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
{{ Form::label('ref_model_params', 'Award Class parameters') }}
|
{{ Form::label('ref_model_params', 'Award Class parameters') }}
|
||||||
{{ Form::text('ref_model_params', null, ['class' => 'form-control']) }}
|
{{ Form::text('ref_model_params', null, ['class' => 'form-control']) }}
|
||||||
<p class="text-danger">{{ $errors->first('ref_model_params') }}</p>
|
<p class="text-danger">{{ $errors->first('ref_model_params') }}</p>
|
||||||
|
<p id="ref_model_param_description"></p>
|
||||||
<p id="ref_model_param_description">
|
|
||||||
|
|
||||||
</p>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<!-- Submit Field -->
|
{{-- Active/Deactive Checkbox --}}
|
||||||
<div class="form-group col-sm-12">
|
<div class="form-group col-sm-6 text-left">
|
||||||
|
<div class="checkbox">
|
||||||
|
<label class="checkbox-inline">
|
||||||
|
{{ Form::label('active', 'Active: ') }}
|
||||||
|
{{ Form::hidden('active', false) }}
|
||||||
|
{{ Form::checkbox('active') }}
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{{-- Form Actions --}}
|
||||||
|
<div class="form-group col-sm-6">
|
||||||
<div class="pull-right">
|
<div class="pull-right">
|
||||||
{!! Form::button('Save', ['type' => 'submit', 'class' => 'btn btn-success']) !!}
|
{!! Form::button('Save', ['type' => 'submit', 'class' => 'btn btn-success']) !!}
|
||||||
<a href="{!! route('admin.awards.index') !!}" class="btn btn-warn">Cancel</a>
|
<a href="{!! route('admin.awards.index') !!}" class="btn btn-warn">Cancel</a>
|
||||||
|
|||||||
@@ -1,40 +1,47 @@
|
|||||||
<table class="table table-hover table-responsive" id="awards-table">
|
<table class="table table-hover table-responsive" id="awards-table">
|
||||||
<thead>
|
<thead>
|
||||||
<th>Name</th>
|
<th>Name</th>
|
||||||
<th>Description</th>
|
<th>Description</th>
|
||||||
<th>Image</th>
|
<th>Image</th>
|
||||||
<th class="text-right">Action</th>
|
<th class="text-center">Active</th>
|
||||||
|
<th class="text-right">Action</th>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@foreach($awards as $award)
|
@foreach($awards->sortby('name', SORT_NATURAL) as $award)
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<a href="{{ route('admin.awards.edit', [$award->id]) }}">
|
<a href="{{ route('admin.awards.edit', [$award->id]) }}">{{ $award->name }}</a>
|
||||||
{{ $award->name }}</a>
|
</td>
|
||||||
</td>
|
<td>
|
||||||
<td>{{ $award->description }}</td>
|
{{ $award->description }}
|
||||||
<td>
|
</td>
|
||||||
|
<td>
|
||||||
@if($award->image_url)
|
@if($award->image_url)
|
||||||
<img src="{{ $award->image_url }}" name="{{ $award->name }}" alt="No Image Available" style="height: 100px"/>
|
<img src="{{ $award->image_url }}" name="{{ $award->name }}" alt="No Image Available" style="height: 100px"/>
|
||||||
@else
|
@else
|
||||||
-
|
-
|
||||||
@endif
|
@endif
|
||||||
</td>
|
</td>
|
||||||
<td class="text-right">
|
<td class="text-center">
|
||||||
{{ Form::open(['route' => ['admin.awards.destroy', $award->id], 'method' => 'delete']) }}
|
@if($award->active)
|
||||||
<a href="{{ route('admin.awards.edit', [$award->id]) }}" class='btn btn-sm btn-success btn-icon'>
|
<i class="fas fa-check-circle fa-2x text-success"></i>
|
||||||
<i class="fas fa-pencil-alt"></i></a>
|
@else
|
||||||
|
<i class="fas fa-times-circle fa-2x text-danger"></i>
|
||||||
{{ Form::button('<i class="fa fa-times"></i>', [
|
@endif
|
||||||
'type' => 'submit',
|
</td>
|
||||||
'class' => 'btn btn-sm btn-danger btn-icon',
|
<td class="text-right">
|
||||||
'onclick' => "return confirm('Are you sure you want to delete this award?')"
|
{{ Form::open(['route' => ['admin.awards.destroy', $award->id], 'method' => 'delete']) }}
|
||||||
]) }}
|
<a href="{{ route('admin.awards.edit', [$award->id]) }}" class='btn btn-sm btn-success btn-icon'>
|
||||||
|
<i class="fas fa-pencil-alt"></i>
|
||||||
{{ Form::close() }}
|
</a>
|
||||||
</td>
|
{{ Form::button('<i class="fa fa-times"></i>', [
|
||||||
</tr>
|
'type' => 'submit',
|
||||||
@endforeach
|
'class' => 'btn btn-sm btn-danger btn-icon',
|
||||||
|
'onclick' => "return confirm('Are you sure you want to delete this award?')"
|
||||||
|
]) }}
|
||||||
|
{{ Form::close() }}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
@endforeach
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
@@ -2,8 +2,15 @@
|
|||||||
@section('title', 'Flights')
|
@section('title', 'Flights')
|
||||||
|
|
||||||
@section('actions')
|
@section('actions')
|
||||||
<li><a href="{{ route('admin.flights.export') }}"><i class="ti-plus"></i>Export to CSV</a></li>
|
<li>
|
||||||
<li><a href="{{ route('admin.flights.import') }}"><i class="ti-plus"></i>Import from CSV</a></li>
|
<a href="{{ route('admin.flights.export') }}@if(request()->get('airline_id')){{ '?airline_id='.request()->get('airline_id') }}@endif">
|
||||||
|
<i class="ti-plus"></i>
|
||||||
|
Export to CSV @if(request()->get('airline_id')) (Selected Airline) @endif
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="{{ route('admin.flights.import') }}"><i class="ti-plus"></i>Import from CSV</a>
|
||||||
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="{{ route('admin.flights.create') }}">
|
<a href="{{ route('admin.flights.create') }}">
|
||||||
<i class="ti-plus"></i>
|
<i class="ti-plus"></i>
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="form-group col-sm-6">
|
<div class="form-group col-sm-7">
|
||||||
{{ Form::label('name', 'Name:') }}
|
{{ Form::label('name', 'Name:') }}
|
||||||
{{ Form::text('name', null, ['class' => 'form-control']) }}
|
{{ Form::text('name', null, ['class' => 'form-control']) }}
|
||||||
<p class="text-danger">{{ $errors->first('name') }}</p>
|
<p class="text-danger">{{ $errors->first('name') }}</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group col-sm-6">
|
<div class="form-group col-sm-5">
|
||||||
{{ Form::label('type', 'Type Code:') }}
|
{{ Form::label('type', 'Type Code:') }}
|
||||||
{{ Form::text('type', null, ['class' => 'form-control']) }}
|
{{ Form::text('type', null, ['class' => 'form-control']) }}
|
||||||
<p class="text-danger">{{ $errors->first('type') }}</p>
|
<p class="text-danger">{{ $errors->first('type') }}</p>
|
||||||
@@ -12,12 +12,12 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="form-group col-md-7">
|
<div class="form-group col-sm-7">
|
||||||
{{ Form::label('description', 'Description:') }}
|
{{ Form::label('description', 'Description:') }}
|
||||||
{{ Form::text('description', null, ['class' => 'form-control']) }}
|
{{ Form::text('description', null, ['class' => 'form-control']) }}
|
||||||
<p class="text-danger">{{ $errors->first('description') }}</p>
|
<p class="text-danger">{{ $errors->first('description') }}</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group col-md-5">
|
<div class="form-group col-sm-5">
|
||||||
{{ Form::label('image_url', 'Image Link:') }}
|
{{ Form::label('image_url', 'Image Link:') }}
|
||||||
{{ Form::text('image_url', null, ['class' => 'form-control']) }}
|
{{ Form::text('image_url', null, ['class' => 'form-control']) }}
|
||||||
<p class="text-danger">{{ $errors->first('image_url') }}</p>
|
<p class="text-danger">{{ $errors->first('image_url') }}</p>
|
||||||
@@ -25,19 +25,16 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="form-group col-md-3">
|
<div class="form-group col-sm-3">
|
||||||
<div class="checkbox">
|
<div class="checkbox">
|
||||||
<label class="checkbox-inline">
|
<label class="checkbox-inline">
|
||||||
|
{{ Form::label('active', 'Active:') }}
|
||||||
{{ Form::hidden('active', false) }}
|
{{ Form::hidden('active', false) }}
|
||||||
{{ Form::checkbox('active') }}
|
{{ Form::checkbox('active') }}
|
||||||
{{ Form::label('active', 'Active:') }}
|
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div class="col-sm-9">
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-sm-12">
|
|
||||||
<div class="text-right">
|
<div class="text-right">
|
||||||
{{ Form::button('Save', ['type' => 'submit', 'class' => 'btn btn-success']) }}
|
{{ Form::button('Save', ['type' => 'submit', 'class' => 'btn btn-success']) }}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -114,6 +114,7 @@ and being mindful of the rivets bindings
|
|||||||
center: ['{{ $center[0] }}', '{{ $center[1] }}'],
|
center: ['{{ $center[0] }}', '{{ $center[1] }}'],
|
||||||
zoom: '{{ $zoom }}',
|
zoom: '{{ $zoom }}',
|
||||||
aircraft_icon: '{!! public_asset('/assets/img/acars/aircraft.png') !!}',
|
aircraft_icon: '{!! public_asset('/assets/img/acars/aircraft.png') !!}',
|
||||||
|
refresh_interval: {{ setting('acars.update_interval', 60) }},
|
||||||
units: '{{ setting('units.distance') }}',
|
units: '{{ setting('units.distance') }}',
|
||||||
leafletOptions: {
|
leafletOptions: {
|
||||||
scrollWheelZoom: false,
|
scrollWheelZoom: false,
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ https://api.checkwx.com/#metar-decoded
|
|||||||
<td>@lang('widgets.weather.wind')</td>
|
<td>@lang('widgets.weather.wind')</td>
|
||||||
<td>
|
<td>
|
||||||
@if($metar['wind_speed'] < '1') Calm @else {{ $metar['wind_speed'] }} kts @lang('common.from') {{ $metar['wind_direction_label'] }} ({{ $metar['wind_direction']}}°) @endif
|
@if($metar['wind_speed'] < '1') Calm @else {{ $metar['wind_speed'] }} kts @lang('common.from') {{ $metar['wind_direction_label'] }} ({{ $metar['wind_direction']}}°) @endif
|
||||||
@if($metar['wind_gust_speed']) @lang('widgets.weather.guststo') {{ $metar['wind_gust_speed'] }} @endif
|
@if($metar['wind_gust_speed']) @lang('widgets.weather.guststo') {{ $metar['wind_gust_speed'] }} @endif
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@if($metar['visibility'])
|
@if($metar['visibility'])
|
||||||
@@ -24,58 +24,62 @@ https://api.checkwx.com/#metar-decoded
|
|||||||
</tr>
|
</tr>
|
||||||
@endif
|
@endif
|
||||||
@if($metar['runways_visual_range'])
|
@if($metar['runways_visual_range'])
|
||||||
<tr>
|
<tr>
|
||||||
<td>Runway Visual Range</td>
|
<td>Runway Visual Range</td>
|
||||||
<td>
|
<td>
|
||||||
@foreach($metar['runways_visual_range'] as $rvr)
|
@foreach($metar['runways_visual_range'] as $rvr)
|
||||||
<b>RWY{{ $rvr['runway'] }}</b>; {{ $rvr['report'] }}<br>
|
<b>RWY{{ $rvr['runway'] }}</b>; {{ $rvr['report'] }}<br>
|
||||||
@endforeach
|
@endforeach
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@endif
|
@endif
|
||||||
@if($metar['present_weather_report'] <> 'Dry')
|
@if($metar['present_weather_report'] && $metar['present_weather_report'] <> 'Dry')
|
||||||
<tr>
|
<tr>
|
||||||
<td>Phenomena</td>
|
<td>Phenomena</td>
|
||||||
<td>{{ $metar['present_weather_report'] }}</td>
|
<td>{{ $metar['present_weather_report'] }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
@endif
|
@endif
|
||||||
@if($metar['clouds'] || $metar['cavok'])
|
@if($metar['clouds'] || $metar['cavok'])
|
||||||
<tr>
|
<tr>
|
||||||
<td>@lang('widgets.weather.clouds')</td>
|
<td>@lang('widgets.weather.clouds')</td>
|
||||||
<td>
|
<td>
|
||||||
@if($unit_alt === 'ft') {{ $metar['clouds_report_ft'] }} @else {{ $metar['clouds_report'] }} @endif
|
@if($unit_alt === 'ft') {{ $metar['clouds_report_ft'] }} @else {{ $metar['clouds_report'] }} @endif
|
||||||
@if($metar['cavok'] == 1) Ceiling and Visibility OK @endif
|
@if($metar['cavok'] == 1) Ceiling and Visibility OK @endif
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@endif
|
@endif
|
||||||
<tr>
|
@if($metar['temperature'])
|
||||||
<td>@lang('widgets.weather.temp')</td>
|
<tr>
|
||||||
<td>
|
<td>@lang('widgets.weather.temp')</td>
|
||||||
@if($metar['temperature'][$unit_temp]) {{ $metar['temperature'][$unit_temp] }} @else 0 @endif °{{strtoupper($unit_temp)}}
|
<td>
|
||||||
@if($metar['dew_point']), @lang('widgets.weather.dewpoint') @if($metar['dew_point'][$unit_temp]) {{ $metar['dew_point'][$unit_temp] }} @else 0 @endif °{{strtoupper($unit_temp)}} @endif
|
@if($metar['temperature'][$unit_temp]) {{ $metar['temperature'][$unit_temp] }} @else 0 @endif °{{strtoupper($unit_temp)}}
|
||||||
@if($metar['humidity']), @lang('widgets.weather.humidity') {{ $metar['humidity'] }}% @endif
|
@if($metar['dew_point']), @lang('widgets.weather.dewpoint') @if($metar['dew_point'][$unit_temp]) {{ $metar['dew_point'][$unit_temp] }} @else 0 @endif °{{strtoupper($unit_temp)}} @endif
|
||||||
</td>
|
@if($metar['humidity']), @lang('widgets.weather.humidity') {{ $metar['humidity'] }}% @endif
|
||||||
</tr>
|
</td>
|
||||||
<tr>
|
</tr>
|
||||||
<td>@lang('widgets.weather.barometer')</td>
|
@endif
|
||||||
<td>{{ number_format($metar['barometer']['hPa']) }} hPa / {{ number_format($metar['barometer']['inHg'], 2) }} inHg</td>
|
@if($metar['barometer'])
|
||||||
</tr>
|
<tr>
|
||||||
|
<td>@lang('widgets.weather.barometer')</td>
|
||||||
|
<td>{{ number_format($metar['barometer']['hPa']) }} hPa / {{ number_format($metar['barometer']['inHg'], 2) }} inHg</td>
|
||||||
|
</tr>
|
||||||
|
@endif
|
||||||
@if($metar['recent_weather_report'])
|
@if($metar['recent_weather_report'])
|
||||||
<tr>
|
<tr>
|
||||||
<td>Recent Phenomena</td>
|
<td>Recent Phenomena</td>
|
||||||
<td>{{ $metar['recent_weather_report'] }}</td>
|
<td>{{ $metar['recent_weather_report'] }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
@endif
|
@endif
|
||||||
@if($metar['runways_report'])
|
@if($metar['runways_report'])
|
||||||
<tr>
|
<tr>
|
||||||
<td>Runway Condition</td>
|
<td>Runway Condition</td>
|
||||||
<td>
|
<td>
|
||||||
@foreach($metar['runways_report'] as $runway)
|
@foreach($metar['runways_report'] as $runway)
|
||||||
<b>RWY{{ $runway['runway'] }}</b>; {{ $runway['report'] }}<br>
|
<b>RWY{{ $runway['runway'] }}</b>; {{ $runway['report'] }}<br>
|
||||||
@endforeach
|
@endforeach
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@endif
|
@endif
|
||||||
@if($metar['remarks'])
|
@if($metar['remarks'])
|
||||||
<tr>
|
<tr>
|
||||||
<td>@lang('widgets.weather.remarks')</td>
|
<td>@lang('widgets.weather.remarks')</td>
|
||||||
|
|||||||
Reference in New Issue
Block a user