Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b60251e7b8 | ||
|
|
6eef246b6a | ||
|
|
fc8ca69729 | ||
|
|
57277c558d | ||
|
|
b0f52ed1d0 | ||
|
|
d64e674c21 | ||
|
|
40c911ff17 | ||
|
|
b6abe8dd5b | ||
|
|
54c3c8f346 | ||
|
|
c250fce84b | ||
|
|
4125cdd373 | ||
|
|
6eb883de73 | ||
|
|
49528c9644 | ||
|
|
4475813a12 | ||
|
|
681e39650b | ||
|
|
bbbe8a8bd3 | ||
|
|
0acab21712 | ||
|
|
a17840d690 | ||
|
|
fe87f21599 | ||
|
|
2756c34702 | ||
|
|
564f9ec06e | ||
|
|
95e1df619e |
@@ -70,14 +70,22 @@ mkdir -p storage/framework/views
|
||||
|
||||
cd /tmp
|
||||
|
||||
echo "Current directory contents"
|
||||
ls -al $BASE_DIR
|
||||
|
||||
echo "Parent directory contents"
|
||||
ls -al $BASE_DIR/../
|
||||
|
||||
tar -czf $TAR_NAME -C $BASE_DIR .
|
||||
echo "Calling find"
|
||||
find $BASE_DIR/../ -type d -maxdepth 2
|
||||
|
||||
tar -czf $TAR_NAME -C $BASE_DIR --xform 's:^\./::' . [--show-transformed-names|--show-stored-names]
|
||||
sha256sum $TAR_NAME >"$TAR_NAME.sha256"
|
||||
|
||||
cd $BASE_DIR;
|
||||
zip -r $ZIP_NAME .* *
|
||||
zip -r $ZIP_NAME ./
|
||||
sha256sum $ZIP_NAME >"$ZIP_NAME.sha256"
|
||||
|
||||
mv $ZIP_NAME /tmp
|
||||
mv "$ZIP_NAME.sha256" /tmp
|
||||
|
||||
|
||||
@@ -116,7 +116,6 @@ jobs:
|
||||
- name: 'Install Release Dependencies'
|
||||
run: |
|
||||
rm -rf vendor
|
||||
sudo npm i tar-to-zip -g
|
||||
composer install --no-dev --prefer-dist --no-interaction --verbose
|
||||
sudo chmod +x ./.github/scripts/*
|
||||
|
||||
@@ -179,7 +178,6 @@ jobs:
|
||||
- name: 'Install Release Dependencies'
|
||||
run: |
|
||||
rm -rf vendor
|
||||
sudo npm i tar-to-zip -g
|
||||
composer install --no-dev --prefer-dist --no-interaction --verbose
|
||||
sudo chmod +x ./.github/scripts/*
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@ use Illuminate\Contracts\View\Factory;
|
||||
use Illuminate\Http\RedirectResponse;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Routing\Redirector;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Illuminate\View\View;
|
||||
|
||||
class ModulesController extends Controller
|
||||
@@ -29,6 +30,7 @@ class ModulesController extends Controller
|
||||
{
|
||||
$modules = $this->moduleSvc->getAllModules();
|
||||
$new_modules = $this->moduleSvc->scan();
|
||||
|
||||
return view('admin.modules.index', [
|
||||
'modules' => $modules,
|
||||
'new_modules' => $new_modules,
|
||||
@@ -97,7 +99,14 @@ class ModulesController extends Controller
|
||||
*/
|
||||
public function enable(Request $request)
|
||||
{
|
||||
$this->moduleSvc->addModule($request->input('name'));
|
||||
$moduleName = $request->input('name');
|
||||
|
||||
try {
|
||||
$this->moduleSvc->addModule($moduleName);
|
||||
} catch (\Exception $e) {
|
||||
Log::error('Error activating module '.$moduleName);
|
||||
}
|
||||
|
||||
return redirect(route('admin.modules.index'));
|
||||
}
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@ use App\Models\Enums\PirepSource;
|
||||
use App\Models\Enums\PirepState;
|
||||
use App\Models\Pirep;
|
||||
use App\Models\PirepComment;
|
||||
use App\Models\PirepFare;
|
||||
use App\Repositories\AircraftRepository;
|
||||
use App\Repositories\AirlineRepository;
|
||||
use App\Repositories\AirportRepository;
|
||||
@@ -151,10 +152,10 @@ class PirepController extends Controller
|
||||
$count = $request->input($field_name);
|
||||
}
|
||||
|
||||
$fares[] = [
|
||||
$fares[] = new PirepFare([
|
||||
'fare_id' => $fare->id,
|
||||
'count' => $count,
|
||||
];
|
||||
]);
|
||||
}
|
||||
|
||||
$this->fareSvc->saveForPirep($pirep, $fares);
|
||||
|
||||
@@ -13,6 +13,7 @@ use App\Repositories\FlightRepository;
|
||||
use App\Repositories\SubfleetRepository;
|
||||
use App\Repositories\UserRepository;
|
||||
use App\Services\GeoService;
|
||||
use App\Services\ModuleService;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
@@ -25,6 +26,7 @@ class FlightController extends Controller
|
||||
private $airlineRepo;
|
||||
private $airportRepo;
|
||||
private $flightRepo;
|
||||
private $moduleSvc;
|
||||
private $subfleetRepo;
|
||||
private $geoSvc;
|
||||
private $userRepo;
|
||||
@@ -34,6 +36,7 @@ class FlightController extends Controller
|
||||
* @param AirportRepository $airportRepo
|
||||
* @param FlightRepository $flightRepo
|
||||
* @param GeoService $geoSvc
|
||||
* @param ModuleService $moduleSvc
|
||||
* @param SubfleetRepository $subfleetRepo
|
||||
* @param UserRepository $userRepo
|
||||
*/
|
||||
@@ -42,6 +45,7 @@ class FlightController extends Controller
|
||||
AirportRepository $airportRepo,
|
||||
FlightRepository $flightRepo,
|
||||
GeoService $geoSvc,
|
||||
ModuleService $moduleSvc,
|
||||
SubfleetRepository $subfleetRepo,
|
||||
UserRepository $userRepo
|
||||
) {
|
||||
@@ -49,6 +53,7 @@ class FlightController extends Controller
|
||||
$this->airportRepo = $airportRepo;
|
||||
$this->flightRepo = $flightRepo;
|
||||
$this->geoSvc = $geoSvc;
|
||||
$this->moduleSvc = $moduleSvc;
|
||||
$this->subfleetRepo = $subfleetRepo;
|
||||
$this->userRepo = $userRepo;
|
||||
}
|
||||
@@ -108,7 +113,12 @@ class FlightController extends Controller
|
||||
|
||||
// Get only used Flight Types for the search form
|
||||
// And filter according to settings
|
||||
$usedtypes = Flight::select('flight_type')->where($where)->groupby('flight_type')->orderby('flight_type', 'asc')->get();
|
||||
$usedtypes = Flight::select('flight_type')
|
||||
->where($where)
|
||||
->groupby('flight_type')
|
||||
->orderby('flight_type')
|
||||
->get();
|
||||
|
||||
// Build collection with type codes and labels
|
||||
$flight_types = collect('', '');
|
||||
foreach ($usedtypes as $ftype) {
|
||||
@@ -123,12 +133,20 @@ class FlightController extends Controller
|
||||
'simbrief' => function ($query) use ($user) {
|
||||
$query->where('user_id', $user->id);
|
||||
}, ])
|
||||
->orderBy('flight_number', 'asc')
|
||||
->orderBy('route_leg', 'asc')
|
||||
->orderBy('flight_number')
|
||||
->orderBy('route_leg')
|
||||
->paginate();
|
||||
|
||||
$saved_flights = Bid::where('user_id', Auth::id())
|
||||
->pluck('flight_id')->toArray();
|
||||
$saved_flights = [];
|
||||
$bids = Bid::where('user_id', Auth::id())->get();
|
||||
foreach ($bids as $bid) {
|
||||
if (!$bid->flight) {
|
||||
$bid->delete();
|
||||
continue;
|
||||
}
|
||||
|
||||
$saved_flights[$bid->flight_id] = $bid->id;
|
||||
}
|
||||
|
||||
return view('flights.index', [
|
||||
'user' => $user,
|
||||
@@ -145,6 +163,7 @@ class FlightController extends Controller
|
||||
'subfleet_id' => $request->input('subfleet_id'),
|
||||
'simbrief' => !empty(setting('simbrief.api_key')),
|
||||
'simbrief_bids' => setting('simbrief.only_bids'),
|
||||
'acars_plugin' => $this->moduleSvc->isModuleActive('VMSAcars'),
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -171,7 +190,7 @@ class FlightController extends Controller
|
||||
}
|
||||
|
||||
$flights->add($bid->flight);
|
||||
$saved_flights[] = $bid->flight->id;
|
||||
$saved_flights[$bid->flight_id] = $bid->id;
|
||||
}
|
||||
|
||||
return view('flights.bids', [
|
||||
@@ -183,6 +202,7 @@ class FlightController extends Controller
|
||||
'subfleets' => $this->subfleetRepo->selectBoxList(true),
|
||||
'simbrief' => !empty(setting('simbrief.api_key')),
|
||||
'simbrief_bids' => setting('simbrief.only_bids'),
|
||||
'acars_plugin' => $this->moduleSvc->isModuleActive('VMSAcars'),
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -203,9 +223,14 @@ class FlightController extends Controller
|
||||
|
||||
$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', [
|
||||
'flight' => $flight,
|
||||
'map_features' => $map_features,
|
||||
'bid' => $bid,
|
||||
'acars_plugin' => $this->moduleSvc->isModuleActive('VMSAcars'),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -123,7 +123,7 @@ class ProfileController extends Controller
|
||||
|
||||
$airlines = $this->airlineRepo->selectBoxList();
|
||||
$airports = $this->airportRepo->selectBoxList(false, setting('pilots.home_hubs_only'));
|
||||
$userFields = $this->userRepo->getUserFields($user, true);
|
||||
$userFields = $this->userRepo->getUserFields($user);
|
||||
|
||||
return view('profile.edit', [
|
||||
'user' => $user,
|
||||
|
||||
@@ -4,6 +4,7 @@ namespace App\Http\Controllers\Frontend;
|
||||
|
||||
use App\Exceptions\AssetNotFound;
|
||||
use App\Models\Aircraft;
|
||||
use App\Models\Bid;
|
||||
use App\Models\Enums\AircraftState;
|
||||
use App\Models\Enums\AircraftStatus;
|
||||
use App\Models\Enums\FareType;
|
||||
@@ -14,6 +15,7 @@ use App\Models\SimBrief;
|
||||
use App\Models\User;
|
||||
use App\Repositories\FlightRepository;
|
||||
use App\Services\FareService;
|
||||
use App\Services\ModuleService;
|
||||
use App\Services\SimBriefService;
|
||||
use App\Services\UserService;
|
||||
use Exception;
|
||||
@@ -24,17 +26,20 @@ class SimBriefController
|
||||
{
|
||||
private $fareSvc;
|
||||
private $flightRepo;
|
||||
private $moduleSvc;
|
||||
private $simBriefSvc;
|
||||
private $userSvc;
|
||||
|
||||
public function __construct(
|
||||
FareService $fareSvc,
|
||||
FlightRepository $flightRepo,
|
||||
ModuleService $moduleSvc,
|
||||
SimBriefService $simBriefSvc,
|
||||
UserService $userSvc
|
||||
) {
|
||||
$this->fareSvc = $fareSvc;
|
||||
$this->flightRepo = $flightRepo;
|
||||
$this->moduleSvc = $moduleSvc;
|
||||
$this->simBriefSvc = $simBriefSvc;
|
||||
$this->userSvc = $userSvc;
|
||||
}
|
||||
@@ -106,6 +111,7 @@ class SimBriefController
|
||||
if (setting('simbrief.block_aircraft')) {
|
||||
// Build a list of aircraft_id's being used for active sb packs
|
||||
$sb_aircraft = SimBrief::whereNotNull('flight_id')->pluck('aircraft_id');
|
||||
|
||||
// Filter aircraft list to non used/blocked ones
|
||||
$aircrafts = $aircrafts->whereNotIn('id', $sb_aircraft);
|
||||
}
|
||||
@@ -225,7 +231,7 @@ class SimBriefController
|
||||
|
||||
// Show the main simbrief form
|
||||
return view('flights.simbrief_form', [
|
||||
'user' => Auth::user(),
|
||||
'user' => $user,
|
||||
'flight' => $flight,
|
||||
'aircraft' => $aircraft,
|
||||
'pax_weight' => $pax_weight,
|
||||
@@ -253,7 +259,11 @@ class SimBriefController
|
||||
*/
|
||||
public function briefing($id)
|
||||
{
|
||||
$simbrief = SimBrief::find($id);
|
||||
/** @var User $user */
|
||||
$user = Auth::user();
|
||||
|
||||
/** @var SimBrief $simbrief */
|
||||
$simbrief = SimBrief::with(['flight'])->find($id);
|
||||
if (!$simbrief) {
|
||||
flash()->error('SimBrief briefing not found');
|
||||
return redirect(route('frontend.flights.index'));
|
||||
@@ -266,11 +276,18 @@ class SimBriefController
|
||||
$equipment = substr($str, $wc + 1, $tr - 2);
|
||||
$transponder = substr($str, $tr + 1);
|
||||
|
||||
// See if a bid exists for this flight
|
||||
$bid = Bid::where(['user_id' => $user->id, 'flight_id' => $simbrief->flight_id])->first();
|
||||
|
||||
return view('flights.simbrief_briefing', [
|
||||
'simbrief' => $simbrief,
|
||||
'wakecat' => $wakecat,
|
||||
'equipment' => $equipment,
|
||||
'transponder' => $transponder,
|
||||
'user' => $user,
|
||||
'simbrief' => $simbrief,
|
||||
'wakecat' => $wakecat,
|
||||
'equipment' => $equipment,
|
||||
'transponder' => $transponder,
|
||||
'bid' => $bid,
|
||||
'flight' => $simbrief->flight,
|
||||
'acars_plugin' => $this->moduleSvc->isModuleActive('VMSAcars'),
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
+11
-11
@@ -195,22 +195,22 @@ class Pirep extends Model
|
||||
/**
|
||||
* Create a new PIREP from a SimBrief instance
|
||||
*
|
||||
* @param \App\Models\SimBrief $simBrief
|
||||
* @param \App\Models\SimBrief $simbrief
|
||||
*
|
||||
* @return \App\Models\Pirep
|
||||
*/
|
||||
public static function fromSimBrief(SimBrief $simBrief): self
|
||||
public static function fromSimBrief(SimBrief $simbrief): self
|
||||
{
|
||||
return new self([
|
||||
'flight_id' => $simBrief->flight->id,
|
||||
'airline_id' => $simBrief->flight->airline_id,
|
||||
'flight_number' => $simBrief->flight->flight_number,
|
||||
'route_code' => $simBrief->flight->route_code,
|
||||
'route_leg' => $simBrief->flight->route_leg,
|
||||
'dpt_airport_id' => $simBrief->flight->dpt_airport_id,
|
||||
'arr_airport_id' => $simBrief->flight->arr_airport_id,
|
||||
'route' => $simBrief->xml->getRouteString(),
|
||||
'level' => $simBrief->xml->getFlightLevel(),
|
||||
'flight_id' => $simbrief->flight->id,
|
||||
'airline_id' => $simbrief->flight->airline_id,
|
||||
'flight_number' => $simbrief->flight->flight_number,
|
||||
'route_code' => $simbrief->flight->route_code,
|
||||
'route_leg' => $simbrief->flight->route_leg,
|
||||
'dpt_airport_id' => $simbrief->flight->dpt_airport_id,
|
||||
'arr_airport_id' => $simbrief->flight->arr_airport_id,
|
||||
'route' => $simbrief->xml->getRouteString(),
|
||||
'level' => $simbrief->xml->getFlightLevel(),
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
@@ -41,6 +41,10 @@ class SimBrief extends Model
|
||||
'updated_at',
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
'user_id' => 'integer',
|
||||
];
|
||||
|
||||
/** @var \App\Models\SimBriefXML Store a cached version of the XML object */
|
||||
private $xml_instance;
|
||||
|
||||
@@ -92,13 +96,12 @@ class SimBrief extends Model
|
||||
|
||||
public function flight()
|
||||
{
|
||||
if (!empty($this->attributes['flight_id'])) {
|
||||
return $this->belongsTo(Flight::class, 'flight_id');
|
||||
}
|
||||
return $this->belongsTo(Flight::class, 'flight_id');
|
||||
}
|
||||
|
||||
if (!empty($this->attributes['pirep_id'])) {
|
||||
return $this->belongsTo(Pirep::class, 'pirep_id');
|
||||
}
|
||||
public function pirep()
|
||||
{
|
||||
return $this->belongsTo(Pirep::class, 'pirep_id');
|
||||
}
|
||||
|
||||
public function user()
|
||||
|
||||
@@ -36,9 +36,14 @@ class UserRepository extends Repository
|
||||
*
|
||||
* @return \App\Models\UserField[]|\Illuminate\Database\Eloquent\Collection|\Illuminate\Support\Collection
|
||||
*/
|
||||
public function getUserFields(User $user, $only_public_fields = true): Collection
|
||||
public function getUserFields(User $user, $only_public_fields = null): Collection
|
||||
{
|
||||
$fields = UserField::where(['private' => !$only_public_fields])->get();
|
||||
if (is_bool($only_public_fields)) {
|
||||
$fields = UserField::where(['private' => !$only_public_fields])->get();
|
||||
} else {
|
||||
$fields = UserField::get();
|
||||
}
|
||||
|
||||
return $fields->map(function ($field, $_) use ($user) {
|
||||
foreach ($user->fields as $userFieldValue) {
|
||||
if ($userFieldValue->field->slug === $field->slug) {
|
||||
|
||||
@@ -8,6 +8,7 @@ use App\Exceptions\UserBidLimit;
|
||||
use App\Models\Bid;
|
||||
use App\Models\Flight;
|
||||
use App\Models\Pirep;
|
||||
use App\Models\SimBrief;
|
||||
use App\Models\User;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
|
||||
@@ -164,6 +165,14 @@ class BidService extends Service
|
||||
$bid->forceDelete();
|
||||
}
|
||||
|
||||
// Remove SimBrief OFP when removing the bid if it is not flown
|
||||
if (setting('simbrief.only_bids')) {
|
||||
$simbrief = SimBrief::where([
|
||||
'user_id' => $user->id,
|
||||
'flight_id' => $flight->id,
|
||||
])->whereNull('pirep_id')->delete();
|
||||
}
|
||||
|
||||
// Only flip the flag if there are no bids left for this flight
|
||||
$bid_count = Bid::where(['flight_id' => $flight->id])->count();
|
||||
if ($bid_count === 0) {
|
||||
|
||||
@@ -309,7 +309,7 @@ class GeoService extends Service
|
||||
foreach ($all_route_points as $point) {
|
||||
$route->addPoint($point->lat, $point->lon, [
|
||||
'name' => $point->name,
|
||||
'popup' => $point->name.' ('.$point->name.')',
|
||||
'popup' => $point->name.' ('.$point->lat.', '.$point->lon.')',
|
||||
'icon' => '',
|
||||
]);
|
||||
}
|
||||
@@ -351,7 +351,7 @@ class GeoService extends Service
|
||||
foreach ($planned_route as $point) {
|
||||
$planned->addPoint($point->lat, $point->lon, [
|
||||
'name' => $point->name,
|
||||
'popup' => $point->name.' ('.$point->name.')',
|
||||
'popup' => $point->name.' ('.$point->lat.', '.$point->lon.')',
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -369,7 +369,7 @@ class GeoService extends Service
|
||||
$actual->addPoint($point->lat, $point->lon, [
|
||||
'pirep_id' => $pirep->id,
|
||||
'name' => $point->altitude,
|
||||
'popup' => 'GS: '.$point->gs.'<br />Alt: '.$point->altitude,
|
||||
'popup' => 'Spd: '.$point->gs.' kts<br />Alt: '.$point->altitude.' ft<br />Pos: '.$point->lat.', '.$point->lon,
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
@@ -88,13 +88,56 @@ class ModuleService extends Service
|
||||
}
|
||||
|
||||
/**
|
||||
* Get All modules from Database
|
||||
* Get all of the modules from database but make sure they also exist on disk
|
||||
*
|
||||
* @return object
|
||||
*/
|
||||
public function getAllModules(): object
|
||||
public function getAllModules(): array
|
||||
{
|
||||
return Module::all();
|
||||
$modules = [];
|
||||
$moduleList = Module::all();
|
||||
|
||||
/** @var Module $module */
|
||||
foreach ($moduleList as $module) {
|
||||
/** @var \Nwidart\Modules\Module $moduleInstance */
|
||||
$moduleInstance = \Nwidart\Modules\Facades\Module::find($module->name);
|
||||
if (empty($moduleInstance)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (file_exists($moduleInstance->getPath())) {
|
||||
$modules[] = $module;
|
||||
}
|
||||
}
|
||||
|
||||
return $modules;
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine if a module is active - also checks that the module exists properly
|
||||
*
|
||||
* @param string $name
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function isModuleActive(string $name): bool
|
||||
{
|
||||
$module = Module::where('name', $name)->first();
|
||||
if (empty($module)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
/** @var \Nwidart\Modules\Module $moduleInstance */
|
||||
$moduleInstance = \Nwidart\Modules\Facades\Module::find($module->name);
|
||||
if (empty($moduleInstance)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!file_exists($moduleInstance->getPath())) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return $moduleInstance->isEnabled();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -102,9 +145,9 @@ class ModuleService extends Service
|
||||
*
|
||||
* @param $id
|
||||
*
|
||||
* @return object
|
||||
* @return Module
|
||||
*/
|
||||
public function getModule($id): object
|
||||
public function getModule($id): Module
|
||||
{
|
||||
return Module::find($id);
|
||||
}
|
||||
@@ -148,22 +191,20 @@ class ModuleService extends Service
|
||||
*/
|
||||
public function installModule(UploadedFile $file): FlashNotifier
|
||||
{
|
||||
$file_ext = $file->getClientOriginalExtension();
|
||||
$file_ext = strtolower($file->getClientOriginalExtension());
|
||||
$allowed_extensions = ['zip', 'tar', 'gz'];
|
||||
|
||||
if (!in_array($file_ext, $allowed_extensions, true)) {
|
||||
throw new ModuleInvalidFileType();
|
||||
}
|
||||
|
||||
$module = null;
|
||||
|
||||
$new_dir = rand();
|
||||
|
||||
File::makeDirectory(
|
||||
storage_path('app/tmp/modules/'.$new_dir),
|
||||
0777,
|
||||
true
|
||||
);
|
||||
|
||||
$temp_ext_folder = storage_path('app/tmp/modules/'.$new_dir);
|
||||
$temp = storage_path('app/tmp/modules/'.$new_dir);
|
||||
|
||||
@@ -219,7 +260,6 @@ class ModuleService extends Service
|
||||
}
|
||||
|
||||
File::moveDirectory($temp, $toCopy);
|
||||
|
||||
File::deleteDirectory($temp_ext_folder);
|
||||
|
||||
try {
|
||||
|
||||
@@ -41,6 +41,7 @@
|
||||
"laravel/helpers": "^1.4",
|
||||
"laravelcollective/html": "~6.2.0",
|
||||
"jeremykendall/php-domain-parser": "~5.7.2",
|
||||
"league/commonmark": "~1.6",
|
||||
"league/csv": "9.2.*",
|
||||
"league/geotools": "0.8.*",
|
||||
"league/iso3166": "^3.0.0",
|
||||
|
||||
Generated
+354
-265
File diff suppressed because it is too large
Load Diff
@@ -8,7 +8,7 @@ return [
|
||||
/*
|
||||
* Set Ajax widget middleware
|
||||
*/
|
||||
'route_middleware' => [],
|
||||
'route_middleware' => ['web'],
|
||||
|
||||
'widget_stub' => 'resources/stubs/widgets/widget.stub',
|
||||
'widget_plain_stub' => 'resources/stubs/widgets/widget_plain.stub',
|
||||
|
||||
Generated
+10
-10
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "phpvms",
|
||||
"name": "npm-proj-1630891903110-0.06417380357287183uaTTYD",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
@@ -8,7 +8,7 @@
|
||||
"@turf/center": "^6.0.1",
|
||||
"acorn": "^7.4.1",
|
||||
"animate.css": "~3.6",
|
||||
"axios": "^0.21.1",
|
||||
"axios": "^0.21.3",
|
||||
"bootstrap": "~4.3",
|
||||
"bootstrap-sass": "^3.4.1",
|
||||
"bootstrap3": "npm:bootstrap@~3.4",
|
||||
@@ -2366,11 +2366,11 @@
|
||||
}
|
||||
},
|
||||
"node_modules/axios": {
|
||||
"version": "0.21.1",
|
||||
"resolved": "https://registry.npmjs.org/axios/-/axios-0.21.1.tgz",
|
||||
"integrity": "sha512-dKQiRHxGD9PPRIUNIWvZhPTPpl1rf/OxTYKsqKUDjBwYylTvV7SjSHJb9ratfyzM6wCdLCOYLzs73qpg5c4iGA==",
|
||||
"version": "0.21.3",
|
||||
"resolved": "https://registry.npmjs.org/axios/-/axios-0.21.3.tgz",
|
||||
"integrity": "sha512-JtoZ3Ndke/+Iwt5n+BgSli/3idTvpt5OjKyoCmz4LX5+lPiY5l7C1colYezhlxThjNa/NhngCUWZSZFypIFuaA==",
|
||||
"dependencies": {
|
||||
"follow-redirects": "^1.10.0"
|
||||
"follow-redirects": "^1.14.0"
|
||||
}
|
||||
},
|
||||
"node_modules/axobject-query": {
|
||||
@@ -15927,11 +15927,11 @@
|
||||
"dev": true
|
||||
},
|
||||
"axios": {
|
||||
"version": "0.21.1",
|
||||
"resolved": "https://registry.npmjs.org/axios/-/axios-0.21.1.tgz",
|
||||
"integrity": "sha512-dKQiRHxGD9PPRIUNIWvZhPTPpl1rf/OxTYKsqKUDjBwYylTvV7SjSHJb9ratfyzM6wCdLCOYLzs73qpg5c4iGA==",
|
||||
"version": "0.21.3",
|
||||
"resolved": "https://registry.npmjs.org/axios/-/axios-0.21.3.tgz",
|
||||
"integrity": "sha512-JtoZ3Ndke/+Iwt5n+BgSli/3idTvpt5OjKyoCmz4LX5+lPiY5l7C1colYezhlxThjNa/NhngCUWZSZFypIFuaA==",
|
||||
"requires": {
|
||||
"follow-redirects": "^1.10.0"
|
||||
"follow-redirects": "^1.14.0"
|
||||
}
|
||||
},
|
||||
"axobject-query": {
|
||||
|
||||
+1
-1
@@ -13,7 +13,7 @@
|
||||
"@turf/center": "^6.0.1",
|
||||
"acorn": "^7.4.1",
|
||||
"animate.css": "~3.6",
|
||||
"axios": "^0.21.1",
|
||||
"axios": "^0.21.3",
|
||||
"bootstrap": "~4.3",
|
||||
"bootstrap-sass": "^3.4.1",
|
||||
"bootstrap3": "npm:bootstrap@~3.4",
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
'stored' => '保存',
|
||||
@@ -17,6 +17,11 @@
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<div>
|
||||
<span class="description">
|
||||
<b>Pilot</b> {{ $pirep->user->name }}
|
||||
</span>
|
||||
</div>
|
||||
<div>
|
||||
<span class="description">
|
||||
<b>DEP</b> {{ $pirep->dpt_airport_id }}
|
||||
<b>ARR</b> {{ $pirep->arr_airport_id }}
|
||||
|
||||
@@ -6,7 +6,14 @@
|
||||
<div class="col-8">
|
||||
<div class="row">
|
||||
<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 class="row">
|
||||
|
||||
@@ -7,26 +7,39 @@
|
||||
<h2>{{ $simbrief->xml->general->icao_airline }}{{ $simbrief->xml->general->flight_number }}
|
||||
: {{ $simbrief->xml->origin->icao_code }} to {{ $simbrief->xml->destination->icao_code }}</h2>
|
||||
</div>
|
||||
<div class="col-sm-2">
|
||||
<div class="col">
|
||||
@if (empty($simbrief->pirep_id))
|
||||
<a class="btn btn-outline-info pull-right btn-lg"
|
||||
style="margin-top: -10px; margin-bottom: 5px"
|
||||
href="{{ url(route('frontend.simbrief.prefile', [$simbrief->id])) }}">Prefile PIREP</a>
|
||||
@endif
|
||||
</div>
|
||||
<div class="col-sm-2">
|
||||
@if (!empty($simbrief->xml->params->static_id) && Auth::id() == $simbrief->user_id)
|
||||
<a class="btn btn-secondary pull-right btn-lg"
|
||||
@if (!empty($simbrief->xml->params->static_id) && $user->id === $simbrief->user_id)
|
||||
<div class="col">
|
||||
<a class="btn btn-secondary btn-lg"
|
||||
style="margin-top: -10px; margin-bottom: 5px"
|
||||
href="#"
|
||||
data-toggle="modal" data-target="#OFP_Edit">Edit OFP</a>
|
||||
@endif
|
||||
</div>
|
||||
<div class="col-sm-2">
|
||||
<a class="btn btn-primary pull-right btn-lg"
|
||||
@endif
|
||||
<div class="col">
|
||||
<a class="btn btn-primary btn-lg"
|
||||
style="margin-top: -10px; margin-bottom: 5px"
|
||||
href="{{ url(route('frontend.simbrief.generate_new', [$simbrief->id])) }}">Generate New OFP</a>
|
||||
</div>
|
||||
<div class="col">
|
||||
@if ($acars_plugin)
|
||||
@if ($bid)
|
||||
<a href="vmsacars:bid/{{$bid->id}}"
|
||||
style="margin-top: -10px; margin-bottom: 5px"
|
||||
class="btn btn-info btn-lg">Load in vmsACARS</a>
|
||||
@else
|
||||
<a href="vmsacars:flight/{{$flight->id}}"
|
||||
style="margin-top: -10px; margin-bottom: 5px"
|
||||
class="btn btn-info btn-lg">Load in vmsACARS</a>
|
||||
@endif
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
@@ -307,7 +320,7 @@
|
||||
</div>
|
||||
<div class="modal-footer text-right p-1">
|
||||
<a
|
||||
class="btn btn-success btn-sm m-1 p-1"
|
||||
class="btn btn-success btn-sm m-1 p-1"
|
||||
href="{{ route('frontend.simbrief.update_ofp') }}?ofp_id={{ $simbrief->id }}&flight_id={{ $simbrief->flight_id }}&aircraft_id={{ $simbrief->aircraft_id }}&sb_userid={{ $simbrief->xml->params->user_id }}&sb_static_id={{ $simbrief->xml->params->static_id }}">
|
||||
Download Updated OFP & Close
|
||||
</a>
|
||||
|
||||
@@ -22,9 +22,9 @@
|
||||
"x-saved-class" is the class to add/remove if the bid exists or not
|
||||
If you change it, remember to change it in the in-array line as well
|
||||
--}}
|
||||
@if (!setting('pilots.only_flights_from_current') || $flight->dpt_airport_id == Auth::user()->current_airport->icao)
|
||||
@if (!setting('pilots.only_flights_from_current') || $flight->dpt_airport_id == $user->current_airport->icao)
|
||||
<button class="btn btn-round btn-icon btn-icon-mini save_flight
|
||||
{{ in_array($flight->id, $saved, true) ? 'btn-info':'' }}"
|
||||
{{ isset($saved[$flight->id]) ? 'btn-info':'' }}"
|
||||
x-id="{{ $flight->id }}"
|
||||
x-saved-class="btn-info"
|
||||
type="button"
|
||||
@@ -39,16 +39,12 @@
|
||||
{{--<table class="table-condensed"></table>--}}
|
||||
<span class="title">{{ strtoupper(__('flights.dep')) }} </span>
|
||||
{{ optional($flight->dpt_airport)->name ?? $flight->dpt_airport_id }}
|
||||
(<a href="{{route('frontend.airports.show', [
|
||||
'id' => $flight->dpt_airport_id
|
||||
])}}">{{$flight->dpt_airport_id}}</a>)
|
||||
(<a href="{{route('frontend.airports.show', ['id' => $flight->dpt_airport_id])}}">{{$flight->dpt_airport_id}}</a>)
|
||||
@if($flight->dpt_time), {{ $flight->dpt_time }}@endif
|
||||
<br/>
|
||||
<span class="title">{{ strtoupper(__('flights.arr')) }} </span>
|
||||
{{ optional($flight->arr_airport)->name ?? $flight->arr_airport_id }}
|
||||
(<a href="{{route('frontend.airports.show', [
|
||||
'id' => $flight->arr_airport_id
|
||||
])}}">{{$flight->arr_airport_id}}</a>)
|
||||
(<a href="{{route('frontend.airports.show', ['id' => $flight->arr_airport_id])}}">{{$flight->arr_airport_id}}</a>)
|
||||
@if($flight->arr_time), {{ $flight->arr_time }}@endif
|
||||
<br/>
|
||||
@if(filled($flight->callsign))
|
||||
@@ -76,6 +72,13 @@
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-12 text-right">
|
||||
@if ($acars_plugin)
|
||||
@if (isset($saved[$flight->id]))
|
||||
<a href="vmsacars:bid/{{ $saved[$flight->id] }}" class="btn btn-sm btn-outline-primary">Load in vmsACARS</a>
|
||||
@else
|
||||
<a href="vmsacars:flight/{{ $flight->id }}" class="btn btn-sm btn-outline-primary">Load in vmsACARS</a>
|
||||
@endif
|
||||
@endif
|
||||
<!-- Simbrief enabled -->
|
||||
@if ($simbrief !== false)
|
||||
<!-- If this flight has a briefing, show the link to view it-->
|
||||
@@ -86,7 +89,7 @@
|
||||
</a>
|
||||
@else
|
||||
<!-- Show button if the bids-only is disable, or if bids-only is enabled, they've saved it -->
|
||||
@if ($simbrief_bids === false || ($simbrief_bids === true && in_array($flight->id, $saved, true)))
|
||||
@if ($simbrief_bids === false || ($simbrief_bids === true && isset($saved[$flight->id])))
|
||||
<a href="{{ route('frontend.simbrief.generate') }}?flight_id={{ $flight->id }}"
|
||||
class="btn btn-sm btn-outline-primary">
|
||||
Create Simbrief Flight Plan
|
||||
@@ -94,7 +97,6 @@
|
||||
@endif
|
||||
@endif
|
||||
@endif
|
||||
|
||||
<a href="{{ route('frontend.pireps.create') }}?flight_id={{ $flight->id }}"
|
||||
class="btn btn-sm btn-outline-info">
|
||||
{{ __('pireps.newpirep') }}
|
||||
|
||||
Reference in New Issue
Block a user