Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0c492b62e3 | ||
|
|
9e080d544a | ||
|
|
cb38f2ad90 | ||
|
|
6cfbd91328 | ||
|
|
9253d39848 | ||
|
|
737b2f137f | ||
|
|
c518175244 | ||
|
|
08624042f2 | ||
|
|
94735103aa | ||
|
|
e4782c40f3 | ||
|
|
670cb5d811 | ||
|
|
88ffee16be | ||
|
|
cc5a6db427 | ||
|
|
74a1b4d753 | ||
|
|
8a94d8db7b | ||
|
|
c2cc067329 | ||
|
|
723f66a382 | ||
|
|
27be992395 | ||
|
|
6160d57790 | ||
|
|
7fabd57e13 | ||
|
|
09453becf8 | ||
|
|
023313c681 | ||
|
|
d3b7d25abd | ||
|
|
7799867302 | ||
|
|
fd7c1b8314 | ||
|
|
c12cf0964a | ||
|
|
2202d5bf99 | ||
|
|
064682b71f | ||
|
|
3c9d419ebb | ||
|
|
a3f110c0c0 | ||
|
|
c45d52dffa | ||
|
|
4d21ca0982 | ||
|
|
52e716d6ee | ||
|
|
66d83c0ce6 | ||
|
|
4ea8357952 | ||
|
|
b9c29fbe08 | ||
|
|
4e7149a51c | ||
|
|
4c60e5da69 | ||
|
|
2dbe19fdcc | ||
|
|
358f0b663e | ||
|
|
9146c4a68f | ||
|
|
addfa68016 | ||
|
|
571768b39d | ||
|
|
9956929df7 | ||
|
|
f498ad3bba | ||
|
|
471464272f | ||
|
|
85703e1aff | ||
|
|
930d4cfa08 | ||
|
|
91d68308aa | ||
|
|
4eca1f671f | ||
|
|
1e7e8cc5e5 | ||
|
|
c65b5c1b05 | ||
|
|
87886f2419 | ||
|
|
9a28cf22ff | ||
|
|
7a29630f57 | ||
|
|
0b27635fcb | ||
|
|
f3b032e56b | ||
|
|
f99af4cfc3 | ||
|
|
14e33574fc | ||
|
|
bd892f5407 | ||
|
|
96e63f1572 | ||
|
|
a0309b6303 | ||
|
|
e13a019a40 | ||
|
|
91f928ecf4 | ||
|
|
226ae6d109 | ||
|
|
90d1708aab |
@@ -15,7 +15,10 @@ declare -a remove_files=(
|
||||
.idea
|
||||
.travis
|
||||
docker
|
||||
node_modules
|
||||
vendor/willdurand/geocoder/tests
|
||||
_ide_helper.php
|
||||
.env
|
||||
.dockerignore
|
||||
.dpl
|
||||
.editorconfig
|
||||
@@ -23,6 +26,7 @@ declare -a remove_files=(
|
||||
.eslintrc
|
||||
.php_cs
|
||||
.php_cs.cache
|
||||
.php-cs-fixer.php
|
||||
.phpstorm.meta.php
|
||||
.styleci.yml
|
||||
.phpunit.result.cache
|
||||
@@ -37,9 +41,8 @@ declare -a remove_files=(
|
||||
phpvms.iml
|
||||
Procfile
|
||||
phpstan.neon
|
||||
node_modules
|
||||
symfony.lock
|
||||
composer.phar
|
||||
vendor/willdurand/geocoder/tests
|
||||
)
|
||||
|
||||
for file in "${remove_files[@]}"; do
|
||||
|
||||
@@ -2,12 +2,12 @@ name: 'Build'
|
||||
on: ['push', 'pull_request', 'workflow_dispatch', 'release']
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-18.04
|
||||
runs-on: ubuntu-20.04
|
||||
if: github.repository == 'nabeelio/phpvms'
|
||||
strategy:
|
||||
fail-fast: true
|
||||
matrix:
|
||||
php-versions: ['7.3', '7.4', '8.0']
|
||||
php-versions: ['7.3', '7.4', '8.0', '8.1']
|
||||
name: PHP ${{ matrix.php-versions }}
|
||||
env:
|
||||
extensions: intl, pcov, mbstring
|
||||
@@ -78,7 +78,8 @@ jobs:
|
||||
|
||||
- name: Run Tests
|
||||
run: |
|
||||
vendor/bin/php-cs-fixer fix --config=.php_cs -v --dry-run --diff --using-cache=no
|
||||
export PHP_CS_FIXER_IGNORE_ENV=1
|
||||
vendor/bin/php-cs-fixer fix --config=.php-cs-fixer.php -v --dry-run --diff --using-cache=no
|
||||
vendor/bin/phpunit --debug --verbose
|
||||
|
||||
# This runs after all of the tests, run have run. Creates a cleaned up version of the
|
||||
|
||||
@@ -76,3 +76,4 @@ error_log
|
||||
/config.php
|
||||
/config.bak.php
|
||||
/VERSION
|
||||
sync.sh
|
||||
|
||||
@@ -0,0 +1,69 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* This file is part of PHP CS Fixer.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
* Dariusz Rumiński <dariusz.ruminski@gmail.com>
|
||||
*
|
||||
* This source file is subject to the MIT license that is bundled
|
||||
* with this source code in the file LICENSE.
|
||||
*/
|
||||
|
||||
$header = <<<'EOF'
|
||||
This file is part of PHP CS Fixer.
|
||||
(c) Fabien Potencier <fabien@symfony.com>
|
||||
Dariusz Rumiński <dariusz.ruminski@gmail.com>
|
||||
This source file is subject to the MIT license that is bundled
|
||||
with this source code in the file LICENSE.
|
||||
EOF;
|
||||
|
||||
$finder = PhpCsFixer\Finder::create()
|
||||
->ignoreVCSIgnored(true)
|
||||
->exclude('tests/data')
|
||||
->exclude('storage')
|
||||
->exclude('resources')
|
||||
->in(__DIR__)
|
||||
->append([
|
||||
__DIR__.'/dev-tools/doc.php',
|
||||
// __DIR__.'/php-cs-fixer', disabled, as we want to be able to run bootstrap file even on lower PHP version, to show nice message
|
||||
__FILE__,
|
||||
])
|
||||
;
|
||||
|
||||
$config = new PhpCsFixer\Config();
|
||||
$config
|
||||
->setRiskyAllowed(true)
|
||||
->setRules([
|
||||
'@PSR2' => true,
|
||||
'strict_param' => true,
|
||||
'no_php4_constructor' => true,
|
||||
'no_extra_blank_lines' => true,
|
||||
'no_superfluous_elseif' => true,
|
||||
'single_line_comment_style' => false,
|
||||
'simple_to_complex_string_variable' => true,
|
||||
'array_syntax' => [
|
||||
'syntax' => 'short',
|
||||
],
|
||||
'binary_operator_spaces' => [
|
||||
'operators' => [
|
||||
'=>' => 'align_single_space_minimal'
|
||||
]
|
||||
],
|
||||
/*
|
||||
'blank_line_before_statement' => [
|
||||
'statements' => [
|
||||
'declare',
|
||||
'for',
|
||||
'return',
|
||||
'throw',
|
||||
'try',
|
||||
],
|
||||
],
|
||||
*/
|
||||
])
|
||||
->setFinder($finder);
|
||||
|
||||
return $config;
|
||||
@@ -1,37 +0,0 @@
|
||||
<?php
|
||||
|
||||
$finder = PhpCsFixer\Finder::create()
|
||||
->in('app')
|
||||
->in('config');
|
||||
|
||||
return PhpCsFixer\Config::create()
|
||||
->setHideProgress(true)
|
||||
->setUsingCache(false)
|
||||
->setRiskyAllowed(true)
|
||||
->setRules([
|
||||
'@PSR2' => true,
|
||||
'strict_param' => true,
|
||||
'no_php4_constructor' => true,
|
||||
'no_extra_blank_lines' => true,
|
||||
'no_superfluous_elseif' => true,
|
||||
'single_line_comment_style' => false,
|
||||
'simple_to_complex_string_variable' => true,
|
||||
'array_syntax' => [
|
||||
'syntax' => 'short',
|
||||
],
|
||||
'binary_operator_spaces' => [
|
||||
'align_double_arrow' => true,
|
||||
],
|
||||
/*
|
||||
'blank_line_before_statement' => [
|
||||
'statements' => [
|
||||
'declare',
|
||||
'for',
|
||||
'return',
|
||||
'throw',
|
||||
'try',
|
||||
],
|
||||
],
|
||||
*/
|
||||
])
|
||||
->setFinder($finder);
|
||||
+11
-6
@@ -1,8 +1,11 @@
|
||||
FROM php:7.4-fpm-alpine
|
||||
FROM php:8.0.9-fpm-alpine3.14
|
||||
|
||||
WORKDIR /var/www/
|
||||
|
||||
RUN apk add gmp-dev icu-dev zlib-dev libpng-dev
|
||||
# Setup composer
|
||||
COPY --from=composer:2.1.5 /usr/bin/composer /usr/local/bin/composer
|
||||
|
||||
RUN apk add gmp-dev icu-dev zlib-dev libpng-dev libzip-dev zip
|
||||
RUN curl --silent --show-error https://getcomposer.org/installer | php
|
||||
|
||||
# Copy any config files in
|
||||
@@ -16,17 +19,19 @@ RUN docker-php-ext-install \
|
||||
pdo_mysql \
|
||||
gd \
|
||||
gmp \
|
||||
opcache && \
|
||||
docker-php-ext-enable pdo_mysql opcache
|
||||
bcmath \
|
||||
opcache \
|
||||
zip && \
|
||||
docker-php-ext-enable pdo_mysql opcache bcmath zip
|
||||
|
||||
COPY . /var/www/
|
||||
RUN php composer.phar install \
|
||||
RUN composer install \
|
||||
--ignore-platform-reqs \
|
||||
--no-interaction \
|
||||
--no-plugins \
|
||||
--no-scripts \
|
||||
--prefer-dist
|
||||
|
||||
RUN chown -R www-data:www-data /var/www
|
||||
#RUN chown -R www-data:www-data /var/www
|
||||
|
||||
EXPOSE 9000
|
||||
|
||||
@@ -102,7 +102,7 @@ reset-installer:
|
||||
|
||||
.PHONY: docker-test
|
||||
docker-test:
|
||||
@docker-compose -f docker-compose.yml -f docker-compose.local.yml up
|
||||
@docker compose -f docker-compose.yml -f docker-compose.local.yml up
|
||||
|
||||
.PHONY: docker-clean
|
||||
docker-clean:
|
||||
|
||||
@@ -166,6 +166,27 @@ class ImportExport
|
||||
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]];
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
namespace App\Contracts;
|
||||
|
||||
use App\Notifications\Channels\Discord\DiscordMessage;
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
|
||||
@@ -26,24 +25,4 @@ class Notification extends \Illuminate\Notifications\Notification implements Sho
|
||||
|
||||
$this->channels = $notif_config[$klass];*/
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the notification's delivery channels.
|
||||
*
|
||||
* @param mixed $notifiable
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
/*public function via($notifiable)
|
||||
{
|
||||
return $this->channels;
|
||||
}*/
|
||||
|
||||
/**
|
||||
* @return DiscordMessage|null
|
||||
*/
|
||||
public function toDiscordChannel($notifiable): ?DiscordMessage
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
<?php
|
||||
|
||||
use App\Contracts\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddTypeRatingTables extends Migration
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
if (!Schema::hasTable('typeratings')) {
|
||||
Schema::create('typeratings', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->string('name');
|
||||
$table->string('type');
|
||||
$table->string('description')->nullable();
|
||||
$table->string('image_url')->nullable();
|
||||
$table->boolean('active')->default(true);
|
||||
$table->timestamps();
|
||||
|
||||
$table->unique('id');
|
||||
$table->unique('name');
|
||||
});
|
||||
}
|
||||
|
||||
if (!Schema::hasTable('typerating_user')) {
|
||||
Schema::create('typerating_user', function (Blueprint $table) {
|
||||
$table->unsignedInteger('typerating_id');
|
||||
$table->unsignedInteger('user_id');
|
||||
|
||||
$table->primary(['typerating_id', 'user_id']);
|
||||
$table->index(['typerating_id', 'user_id']);
|
||||
});
|
||||
}
|
||||
|
||||
if (!Schema::hasTable('typerating_subfleet')) {
|
||||
Schema::create('typerating_subfleet', function (Blueprint $table) {
|
||||
$table->unsignedInteger('typerating_id');
|
||||
$table->unsignedInteger('subfleet_id');
|
||||
|
||||
$table->primary(['typerating_id', 'subfleet_id']);
|
||||
$table->index(['typerating_id', 'subfleet_id']);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('typeratings');
|
||||
Schema::dropIfExists('typerating_user');
|
||||
Schema::dropIfExists('typerating_subfleet');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
use App\Contracts\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddHubToAircraft extends Migration
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
Schema::table('aircraft', function (Blueprint $table) {
|
||||
$table->string('hub_id', 5)->nullable()->after('airport_id');
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
created_at: 'now'
|
||||
updated_at: 'now'
|
||||
- pirep_id: b68R5gwVzpVe
|
||||
- id: 9aAN4mxlK9zb1
|
||||
pirep_id: b68R5gwVzpVe
|
||||
type: '0'
|
||||
nav_type: null
|
||||
order: '0'
|
||||
@@ -54,7 +55,8 @@ acars:
|
||||
sim_time: now
|
||||
created_at: 'now'
|
||||
updated_at: 'now'
|
||||
- pirep_id: b68R5gwVzpVe
|
||||
- id: 9aAN4mxlK9zb2
|
||||
pirep_id: b68R5gwVzpVe
|
||||
type: '0'
|
||||
nav_type: null
|
||||
order: '0'
|
||||
@@ -72,7 +74,8 @@ acars:
|
||||
sim_time: now
|
||||
created_at: 'now'
|
||||
updated_at: 'now'
|
||||
- pirep_id: b68R5gwVzpVe
|
||||
- id: 9aAN4mxlK9zb3
|
||||
pirep_id: b68R5gwVzpVe
|
||||
type: '0'
|
||||
nav_type: null
|
||||
order: '0'
|
||||
@@ -90,7 +93,8 @@ acars:
|
||||
sim_time: now
|
||||
created_at: 'now'
|
||||
updated_at: 'now'
|
||||
- pirep_id: b68R5gwVzpVe
|
||||
- id: 9aAN4mxlK9zb34
|
||||
pirep_id: b68R5gwVzpVe
|
||||
type: '0'
|
||||
nav_type: null
|
||||
order: '0'
|
||||
@@ -108,7 +112,8 @@ acars:
|
||||
sim_time: now
|
||||
created_at: 'now'
|
||||
updated_at: 'now'
|
||||
- pirep_id: b68R5gwVzpVe
|
||||
- id: 9aAN4mxlK9zb35
|
||||
pirep_id: b68R5gwVzpVe
|
||||
type: '0'
|
||||
nav_type: null
|
||||
order: '0'
|
||||
@@ -126,7 +131,8 @@ acars:
|
||||
sim_time: now
|
||||
created_at: 'now'
|
||||
updated_at: 'now'
|
||||
- pirep_id: b68R5gwVzpVe
|
||||
- id: 9aAN4mxlK9zb36
|
||||
pirep_id: b68R5gwVzpVe
|
||||
type: '0'
|
||||
nav_type: null
|
||||
order: '0'
|
||||
@@ -144,7 +150,8 @@ acars:
|
||||
sim_time: now
|
||||
created_at: 'now'
|
||||
updated_at: 'now'
|
||||
- pirep_id: b68R5gwVzpVe
|
||||
- id: 9aAN4mxlK9zb37
|
||||
pirep_id: b68R5gwVzpVe
|
||||
type: '0'
|
||||
nav_type: null
|
||||
order: '0'
|
||||
@@ -162,7 +169,8 @@ acars:
|
||||
sim_time: now
|
||||
created_at: 'now'
|
||||
updated_at: 'now'
|
||||
- pirep_id: b68R5gwVzpVe
|
||||
- id: 9aAN4mxlK9zb38
|
||||
pirep_id: b68R5gwVzpVe
|
||||
type: '0'
|
||||
nav_type: null
|
||||
order: '0'
|
||||
@@ -180,7 +188,8 @@ acars:
|
||||
sim_time: now
|
||||
created_at: 'now'
|
||||
updated_at: 'now'
|
||||
- pirep_id: b68R5gwVzpVe
|
||||
- id: 9aAN4mxlK9zb39
|
||||
pirep_id: b68R5gwVzpVe
|
||||
type: '0'
|
||||
nav_type: null
|
||||
order: '0'
|
||||
|
||||
@@ -34,6 +34,28 @@ airports:
|
||||
lon: -97.6698889
|
||||
hub: 1
|
||||
ground_handling_cost: 100
|
||||
- id: KHPN
|
||||
iata: HPN
|
||||
icao: KHPN
|
||||
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: KLGA
|
||||
iata: LGA
|
||||
icao: KLGA
|
||||
name: La Guardia Airport
|
||||
location: New York, New York, USA
|
||||
country: United States
|
||||
timezone: America/New_York
|
||||
lat: 40.7772
|
||||
lon: -73.8726
|
||||
hub: 1
|
||||
ground_handling_cost: 250
|
||||
- id: KJFK
|
||||
iata: JFK
|
||||
icao: KJFK
|
||||
@@ -448,6 +470,21 @@ flights:
|
||||
- id: flightid_1
|
||||
airline_id: 1
|
||||
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
|
||||
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
|
||||
@@ -549,6 +586,21 @@ flights:
|
||||
visible: 1
|
||||
created_at: now
|
||||
updated_at: now
|
||||
- id: flightid_4
|
||||
airline_id: 1
|
||||
flight_number: 100
|
||||
dpt_airport_id: KHPN
|
||||
arr_airport_id: KLGA
|
||||
route: DCT CMK V374 DENNA V44 BELTT/N0346F140 V44 DPK DCT
|
||||
distance: 75
|
||||
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
|
||||
|
||||
flight_fields:
|
||||
- name: Departure Terminal
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -42,6 +42,9 @@
|
||||
- name: ranks
|
||||
display_name: Ranks
|
||||
description: Create/edit ranks
|
||||
- name: typeratings
|
||||
display_name: Type Ratings
|
||||
description: Create/edit type ratings
|
||||
- name: users
|
||||
display_name: Users
|
||||
description: Create/edit users
|
||||
|
||||
@@ -137,6 +137,13 @@
|
||||
options: ''
|
||||
type: int
|
||||
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
|
||||
name: 'Default Ground Handling Cost'
|
||||
group: airports
|
||||
@@ -283,7 +290,14 @@
|
||||
value: true
|
||||
options: ''
|
||||
type: boolean
|
||||
description: 'Aircraft that can be flown are restricted to a user''s rank'
|
||||
description: 'Aircraft restricted to user''s rank'
|
||||
- key: pireps.restrict_aircraft_to_typerating
|
||||
name: 'Restrict Aircraft by Type Ratings'
|
||||
group: pireps
|
||||
value: false
|
||||
options: ''
|
||||
type: boolean
|
||||
description: 'Aircraft restricted to user type ratings'
|
||||
- key: pireps.only_aircraft_at_dpt_airport
|
||||
name: 'Restrict Aircraft At Departure'
|
||||
group: pireps
|
||||
@@ -319,6 +333,13 @@
|
||||
options: ''
|
||||
type: int
|
||||
description: 'The length of a pilot''s ID'
|
||||
- key: pilots.id_code
|
||||
name: 'Pilot ID Code'
|
||||
group: pilots
|
||||
value: ''
|
||||
options: ''
|
||||
type: text
|
||||
description: 'Fixed ICAO code for pilot IDs'
|
||||
- key: pilots.auto_accept
|
||||
name: 'Auto Accept New Pilot'
|
||||
group: pilots
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
namespace App\Events;
|
||||
|
||||
use App\Contracts\Event;
|
||||
use App\Models\Pirep;
|
||||
|
||||
/**
|
||||
* This event is dispatched when the fares for a flight report
|
||||
* are collected. Your listeners should return a list of Fare
|
||||
* models. Don't call save on the model!
|
||||
*
|
||||
* Example return:
|
||||
*
|
||||
* new Fare([
|
||||
* 'name' => '', # displayed as the memo
|
||||
* 'type' => [INTEGER], # from FareType enum class
|
||||
* 'price' => [DECIMAL],
|
||||
* 'cost' => [DECIMAL], # optional
|
||||
* 'notes' => '', # used as Transaction Group
|
||||
* ]);
|
||||
*
|
||||
* The event caller will check the 'type' to make sure that it
|
||||
* will filter out fares that only apply to the current process
|
||||
*
|
||||
* The event will have a copy of the PIREP model, if it's applicable
|
||||
*/
|
||||
class Fares extends Event
|
||||
{
|
||||
public $pirep;
|
||||
|
||||
/**
|
||||
* @param Pirep|null $pirep
|
||||
*/
|
||||
public function __construct(Pirep $pirep = null)
|
||||
{
|
||||
$this->pirep = $pirep;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exceptions;
|
||||
|
||||
class BidNotFound extends AbstractHttpException
|
||||
{
|
||||
private $bid_id;
|
||||
|
||||
public function __construct($bid_id)
|
||||
{
|
||||
$this->bid_id = $bid_id;
|
||||
parent::__construct(
|
||||
404,
|
||||
'The bid '.$bid_id.' was not found'
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the RFC 7807 error type (without the URL root)
|
||||
*/
|
||||
public function getErrorType(): string
|
||||
{
|
||||
return 'bid-not-found';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the detailed error string
|
||||
*/
|
||||
public function getErrorDetails(): string
|
||||
{
|
||||
return $this->getMessage();
|
||||
}
|
||||
|
||||
/**
|
||||
* Return an array with the error details, merged with the RFC7807 response
|
||||
*/
|
||||
public function getErrorMetadata(): array
|
||||
{
|
||||
return [
|
||||
'bid_id' => $this->bid_id,
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -79,6 +79,7 @@ class AircraftController extends Controller
|
||||
{
|
||||
return view('admin.aircraft.create', [
|
||||
'airports' => $this->airportRepo->selectBoxList(),
|
||||
'hubs' => $this->airportRepo->selectBoxList(true, true),
|
||||
'subfleets' => Subfleet::all()->pluck('name', 'id'),
|
||||
'statuses' => AircraftStatus::select(false),
|
||||
'subfleet_id' => $request->query('subfleet'),
|
||||
@@ -143,6 +144,7 @@ class AircraftController extends Controller
|
||||
return view('admin.aircraft.edit', [
|
||||
'aircraft' => $aircraft,
|
||||
'airports' => $this->airportRepo->selectBoxList(),
|
||||
'hubs' => $this->airportRepo->selectBoxList(true, true),
|
||||
'subfleets' => Subfleet::all()->pluck('name', 'id'),
|
||||
'statuses' => AircraftStatus::select(false),
|
||||
]);
|
||||
|
||||
@@ -300,14 +300,18 @@ class FlightController extends Controller
|
||||
public function export(Request $request)
|
||||
{
|
||||
$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);
|
||||
return response()
|
||||
->download($path, 'flights.csv', [
|
||||
'content-type' => 'text/csv',
|
||||
])
|
||||
->deleteFileAfterSend(true);
|
||||
return response()->download($path, $file_name, ['content-type' => 'text/csv'])->deleteFileAfterSend(true);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -17,6 +17,7 @@ use App\Repositories\AircraftRepository;
|
||||
use App\Repositories\FareRepository;
|
||||
use App\Repositories\RankRepository;
|
||||
use App\Repositories\SubfleetRepository;
|
||||
use App\Repositories\TypeRatingRepository;
|
||||
use App\Services\ExportService;
|
||||
use App\Services\FareService;
|
||||
use App\Services\FleetService;
|
||||
@@ -36,26 +37,29 @@ class SubfleetController extends Controller
|
||||
private $importSvc;
|
||||
private $rankRepo;
|
||||
private $subfleetRepo;
|
||||
private $typeratingRepo;
|
||||
|
||||
/**
|
||||
* SubfleetController constructor.
|
||||
*
|
||||
* @param AircraftRepository $aircraftRepo
|
||||
* @param FleetService $fleetSvc
|
||||
* @param FareRepository $fareRepo
|
||||
* @param FareService $fareSvc
|
||||
* @param ImportService $importSvc
|
||||
* @param RankRepository $rankRepo
|
||||
* @param SubfleetRepository $subfleetRepo
|
||||
* @param AircraftRepository $aircraftRepo
|
||||
* @param FareRepository $fareRepo
|
||||
* @param FareService $fareSvc
|
||||
* @param FleetService $fleetSvc
|
||||
* @param ImportService $importSvc
|
||||
* @param RankRepository $rankRepo
|
||||
* @param SubfleetRepository $subfleetRepo
|
||||
* @param TypeRatingRepository $typeratingRepo
|
||||
*/
|
||||
public function __construct(
|
||||
AircraftRepository $aircraftRepo,
|
||||
FleetService $fleetSvc,
|
||||
FareRepository $fareRepo,
|
||||
FareService $fareSvc,
|
||||
FleetService $fleetSvc,
|
||||
ImportService $importSvc,
|
||||
RankRepository $rankRepo,
|
||||
SubfleetRepository $subfleetRepo
|
||||
SubfleetRepository $subfleetRepo,
|
||||
TypeRatingRepository $typeratingRepo
|
||||
) {
|
||||
$this->aircraftRepo = $aircraftRepo;
|
||||
$this->fareRepo = $fareRepo;
|
||||
@@ -64,48 +68,7 @@ class SubfleetController extends Controller
|
||||
$this->importSvc = $importSvc;
|
||||
$this->rankRepo = $rankRepo;
|
||||
$this->subfleetRepo = $subfleetRepo;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the ranks that are available to the subfleet
|
||||
*
|
||||
* @param $subfleet
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected function getAvailRanks($subfleet)
|
||||
{
|
||||
$retval = [];
|
||||
$all_ranks = $this->rankRepo->all();
|
||||
$avail_ranks = $all_ranks->except($subfleet->ranks->modelKeys());
|
||||
foreach ($avail_ranks as $rank) {
|
||||
$retval[$rank->id] = $rank->name;
|
||||
}
|
||||
|
||||
return $retval;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all the fares that haven't been assigned to a given subfleet
|
||||
*
|
||||
* @param mixed $subfleet
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected function getAvailFares($subfleet)
|
||||
{
|
||||
$retval = [];
|
||||
$all_fares = $this->fareRepo->all();
|
||||
$avail_fares = $all_fares->except($subfleet->fares->modelKeys());
|
||||
foreach ($avail_fares as $fare) {
|
||||
$retval[$fare->id] = $fare->name.
|
||||
' (price: '.$fare->price.
|
||||
', type: '.FareType::label($fare->type).
|
||||
', cost: '.$fare->cost.
|
||||
', capacity: '.$fare->capacity.')';
|
||||
}
|
||||
|
||||
return $retval;
|
||||
$this->typeratingRepo = $typeratingRepo;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -152,8 +115,8 @@ class SubfleetController extends Controller
|
||||
{
|
||||
$input = $request->all();
|
||||
$subfleet = $this->subfleetRepo->create($input);
|
||||
|
||||
Flash::success('Subfleet saved successfully.');
|
||||
|
||||
return redirect(route('admin.subfleets.edit', [$subfleet->id]));
|
||||
}
|
||||
|
||||
@@ -172,10 +135,12 @@ class SubfleetController extends Controller
|
||||
|
||||
if (empty($subfleet)) {
|
||||
Flash::error('Subfleet not found');
|
||||
|
||||
return redirect(route('admin.subfleets.index'));
|
||||
}
|
||||
|
||||
$avail_fares = $this->getAvailFares($subfleet);
|
||||
|
||||
return view('admin.subfleets.show', [
|
||||
'subfleet' => $subfleet,
|
||||
'avail_fares' => $avail_fares,
|
||||
@@ -192,24 +157,27 @@ class SubfleetController extends Controller
|
||||
public function edit($id)
|
||||
{
|
||||
$subfleet = $this->subfleetRepo
|
||||
->with(['fares', 'ranks'])
|
||||
->with(['fares', 'ranks', 'typeratings'])
|
||||
->findWithoutFail($id);
|
||||
|
||||
if (empty($subfleet)) {
|
||||
Flash::error('Subfleet not found');
|
||||
|
||||
return redirect(route('admin.subfleets.index'));
|
||||
}
|
||||
|
||||
$avail_fares = $this->getAvailFares($subfleet);
|
||||
$avail_ranks = $this->getAvailRanks($subfleet);
|
||||
$avail_ratings = $this->getAvailTypeRatings($subfleet);
|
||||
|
||||
return view('admin.subfleets.edit', [
|
||||
'airlines' => Airline::all()->pluck('name', 'id'),
|
||||
'hubs' => Airport::where('hub', 1)->pluck('name', 'id'),
|
||||
'fuel_types' => FuelType::labels(),
|
||||
'avail_fares' => $avail_fares,
|
||||
'avail_ranks' => $avail_ranks,
|
||||
'subfleet' => $subfleet,
|
||||
'airlines' => Airline::all()->pluck('name', 'id'),
|
||||
'hubs' => Airport::where('hub', 1)->pluck('name', 'id'),
|
||||
'fuel_types' => FuelType::labels(),
|
||||
'avail_fares' => $avail_fares,
|
||||
'avail_ranks' => $avail_ranks,
|
||||
'avail_ratings' => $avail_ratings,
|
||||
'subfleet' => $subfleet,
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -229,12 +197,13 @@ class SubfleetController extends Controller
|
||||
|
||||
if (empty($subfleet)) {
|
||||
Flash::error('Subfleet not found');
|
||||
|
||||
return redirect(route('admin.subfleets.index'));
|
||||
}
|
||||
|
||||
$this->subfleetRepo->update($request->all(), $id);
|
||||
|
||||
Flash::success('Subfleet updated successfully.');
|
||||
|
||||
return redirect(route('admin.subfleets.index'));
|
||||
}
|
||||
|
||||
@@ -251,6 +220,7 @@ class SubfleetController extends Controller
|
||||
|
||||
if (empty($subfleet)) {
|
||||
Flash::error('Subfleet not found');
|
||||
|
||||
return redirect(route('admin.subfleets.index'));
|
||||
}
|
||||
|
||||
@@ -259,12 +229,13 @@ class SubfleetController extends Controller
|
||||
$aircraft = $this->aircraftRepo->findWhere(['subfleet_id' => $id], ['id']);
|
||||
if ($aircraft->count() > 0) {
|
||||
Flash::error('There are aircraft still assigned to this subfleet, you can\'t delete it!')->important();
|
||||
|
||||
return redirect(route('admin.subfleets.index'));
|
||||
}
|
||||
|
||||
$this->subfleetRepo->delete($id);
|
||||
|
||||
Flash::success('Subfleet deleted successfully.');
|
||||
|
||||
return redirect(route('admin.subfleets.index'));
|
||||
}
|
||||
|
||||
@@ -281,11 +252,8 @@ class SubfleetController extends Controller
|
||||
$subfleets = $this->subfleetRepo->all();
|
||||
|
||||
$path = $exporter->exportSubfleets($subfleets);
|
||||
return response()
|
||||
->download($path, 'subfleets.csv', [
|
||||
'content-type' => 'text/csv',
|
||||
])
|
||||
->deleteFileAfterSend(true);
|
||||
|
||||
return response()->download($path, 'subfleets.csv', ['content-type' => 'text/csv'])->deleteFileAfterSend(true);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -312,77 +280,64 @@ class SubfleetController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Subfleet $subfleet
|
||||
* Get all the fares that haven't been assigned to a given subfleet
|
||||
*
|
||||
* @return mixed
|
||||
* @param mixed $subfleet
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected function return_ranks_view(?Subfleet $subfleet)
|
||||
protected function getAvailFares($subfleet)
|
||||
{
|
||||
$subfleet->refresh();
|
||||
$retval = [];
|
||||
$all_fares = $this->fareRepo->all();
|
||||
$avail_fares = $all_fares->except($subfleet->fares->modelKeys());
|
||||
foreach ($avail_fares as $fare) {
|
||||
$retval[$fare->id] = $fare->name.
|
||||
' (price: '.$fare->price.
|
||||
', type: '.FareType::label($fare->type).
|
||||
', cost: '.$fare->cost.
|
||||
', capacity: '.$fare->capacity.')';
|
||||
}
|
||||
|
||||
$avail_ranks = $this->getAvailRanks($subfleet);
|
||||
return view('admin.subfleets.ranks', [
|
||||
'subfleet' => $subfleet,
|
||||
'avail_ranks' => $avail_ranks,
|
||||
]);
|
||||
return $retval;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Subfleet $subfleet
|
||||
* Get the ranks that are available to the subfleet
|
||||
*
|
||||
* @return mixed
|
||||
* @param $subfleet
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected function return_fares_view(?Subfleet $subfleet)
|
||||
protected function getAvailRanks($subfleet)
|
||||
{
|
||||
$subfleet->refresh();
|
||||
$retval = [];
|
||||
$all_ranks = $this->rankRepo->all();
|
||||
$avail_ranks = $all_ranks->except($subfleet->ranks->modelKeys());
|
||||
foreach ($avail_ranks as $rank) {
|
||||
$retval[$rank->id] = $rank->name;
|
||||
}
|
||||
|
||||
$avail_fares = $this->getAvailFares($subfleet);
|
||||
return view('admin.subfleets.fares', [
|
||||
'subfleet' => $subfleet,
|
||||
'avail_fares' => $avail_fares,
|
||||
]);
|
||||
return $retval;
|
||||
}
|
||||
|
||||
/**
|
||||
* Operations for associating ranks to the subfleet
|
||||
* Get the type ratings that are available to the subfleet
|
||||
*
|
||||
* @param $id
|
||||
* @param Request $request
|
||||
* @param $subfleet
|
||||
*
|
||||
* @return mixed
|
||||
* @return array
|
||||
*/
|
||||
public function ranks($id, Request $request)
|
||||
protected function getAvailTypeRatings($subfleet)
|
||||
{
|
||||
$subfleet = $this->subfleetRepo->findWithoutFail($id);
|
||||
if (empty($subfleet)) {
|
||||
return $this->return_ranks_view($subfleet);
|
||||
$retval = [];
|
||||
$all_ratings = $this->typeratingRepo->all();
|
||||
$avail_ratings = $all_ratings->except($subfleet->typeratings->modelKeys());
|
||||
foreach ($avail_ratings as $tr) {
|
||||
$retval[$tr->id] = $tr->name.' ('.$tr->type.')';
|
||||
}
|
||||
|
||||
if ($request->isMethod('get')) {
|
||||
return $this->return_ranks_view($subfleet);
|
||||
}
|
||||
|
||||
/*
|
||||
* update specific rank data
|
||||
*/
|
||||
if ($request->isMethod('post')) {
|
||||
$rank = $this->rankRepo->find($request->input('rank_id'));
|
||||
$this->fleetSvc->addSubfleetToRank($subfleet, $rank);
|
||||
} elseif ($request->isMethod('put')) {
|
||||
$override = [];
|
||||
$rank = $this->rankRepo->find($request->input('rank_id'));
|
||||
$override[$request->name] = $request->value;
|
||||
|
||||
$this->fleetSvc->addSubfleetToRank($subfleet, $rank, $override);
|
||||
} // dissassociate fare from teh aircraft
|
||||
elseif ($request->isMethod('delete')) {
|
||||
$rank = $this->rankRepo->find($request->input('rank_id'));
|
||||
$this->fleetSvc->removeSubfleetFromRank($subfleet, $rank);
|
||||
}
|
||||
|
||||
$subfleet->save();
|
||||
|
||||
return $this->return_ranks_view($subfleet);
|
||||
return $retval;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -398,6 +353,54 @@ class SubfleetController extends Controller
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Subfleet $subfleet
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
protected function return_fares_view(?Subfleet $subfleet)
|
||||
{
|
||||
$subfleet->refresh();
|
||||
$avail_fares = $this->getAvailFares($subfleet);
|
||||
|
||||
return view('admin.subfleets.fares', [
|
||||
'subfleet' => $subfleet,
|
||||
'avail_fares' => $avail_fares,
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Subfleet $subfleet
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
protected function return_ranks_view(?Subfleet $subfleet)
|
||||
{
|
||||
$subfleet->refresh();
|
||||
$avail_ranks = $this->getAvailRanks($subfleet);
|
||||
|
||||
return view('admin.subfleets.ranks', [
|
||||
'subfleet' => $subfleet,
|
||||
'avail_ranks' => $avail_ranks,
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Subfleet $subfleet
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
protected function return_typeratings_view(?Subfleet $subfleet)
|
||||
{
|
||||
$subfleet->refresh();
|
||||
$avail_ratings = $this->getAvailTypeRatings($subfleet);
|
||||
|
||||
return view('admin.subfleets.type_ratings', [
|
||||
'subfleet' => $subfleet,
|
||||
'avail_ratings' => $avail_ratings,
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Operations for associating ranks to the subfleet
|
||||
*
|
||||
@@ -479,4 +482,79 @@ class SubfleetController extends Controller
|
||||
|
||||
return $this->return_fares_view($subfleet);
|
||||
}
|
||||
|
||||
/**
|
||||
* Operations for associating ranks to the subfleet
|
||||
*
|
||||
* @param $id
|
||||
* @param Request $request
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function ranks($id, Request $request)
|
||||
{
|
||||
$subfleet = $this->subfleetRepo->findWithoutFail($id);
|
||||
if (empty($subfleet)) {
|
||||
return $this->return_ranks_view($subfleet);
|
||||
}
|
||||
|
||||
if ($request->isMethod('get')) {
|
||||
return $this->return_ranks_view($subfleet);
|
||||
}
|
||||
|
||||
// associate rank with the subfleet
|
||||
if ($request->isMethod('post')) {
|
||||
$rank = $this->rankRepo->find($request->input('rank_id'));
|
||||
$this->fleetSvc->addSubfleetToRank($subfleet, $rank);
|
||||
} // override definitions
|
||||
elseif ($request->isMethod('put')) {
|
||||
$override = [];
|
||||
$rank = $this->rankRepo->find($request->input('rank_id'));
|
||||
$override[$request->name] = $request->value;
|
||||
|
||||
$this->fleetSvc->addSubfleetToRank($subfleet, $rank, $override);
|
||||
} // dissassociate rank from the subfleet
|
||||
elseif ($request->isMethod('delete')) {
|
||||
$rank = $this->rankRepo->find($request->input('rank_id'));
|
||||
$this->fleetSvc->removeSubfleetFromRank($subfleet, $rank);
|
||||
}
|
||||
|
||||
$subfleet->save();
|
||||
|
||||
return $this->return_ranks_view($subfleet);
|
||||
}
|
||||
|
||||
/**
|
||||
* Operations for associating type ratings to the subfleet
|
||||
*
|
||||
* @param $id
|
||||
* @param Request $request
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function typeratings($id, Request $request)
|
||||
{
|
||||
$subfleet = $this->subfleetRepo->findWithoutFail($id);
|
||||
if (empty($subfleet)) {
|
||||
return $this->return_typeratings_view($subfleet);
|
||||
}
|
||||
|
||||
if ($request->isMethod('get')) {
|
||||
return $this->return_typeratings_view($subfleet);
|
||||
}
|
||||
|
||||
// associate subfleet with type rating
|
||||
if ($request->isMethod('post')) {
|
||||
$typerating = $this->typeratingRepo->find($request->input('typerating_id'));
|
||||
$this->fleetSvc->addSubfleetToTypeRating($subfleet, $typerating);
|
||||
} // dissassociate subfleet from the type rating
|
||||
elseif ($request->isMethod('delete')) {
|
||||
$typerating = $this->typeratingRepo->find($request->input('typerating_id'));
|
||||
$this->fleetSvc->removeSubfleetFromTypeRating($subfleet, $typerating);
|
||||
}
|
||||
|
||||
$subfleet->save();
|
||||
|
||||
return $this->return_typeratings_view($subfleet);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,168 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Admin;
|
||||
|
||||
use App\Contracts\Controller;
|
||||
use App\Http\Requests\CreateTypeRatingRequest;
|
||||
use App\Http\Requests\UpdateTypeRatingRequest;
|
||||
use App\Repositories\SubfleetRepository;
|
||||
use App\Repositories\TypeRatingRepository;
|
||||
use App\Services\FleetService;
|
||||
use Cache;
|
||||
use Illuminate\Http\Request;
|
||||
use Laracasts\Flash\Flash;
|
||||
use Prettus\Repository\Criteria\RequestCriteria;
|
||||
|
||||
class TypeRatingController extends Controller
|
||||
{
|
||||
private $fleetSvc;
|
||||
private $subfleetRepo;
|
||||
private $typeratingRepo;
|
||||
|
||||
public function __construct(
|
||||
FleetService $fleetSvc,
|
||||
SubfleetRepository $subfleetRepo,
|
||||
TypeRatingRepository $typeratingRepo
|
||||
) {
|
||||
$this->fleetSvc = $fleetSvc;
|
||||
$this->subfleetRepo = $subfleetRepo;
|
||||
$this->typeratingRepo = $typeratingRepo;
|
||||
}
|
||||
|
||||
public function index(Request $request)
|
||||
{
|
||||
$this->typeratingRepo->pushCriteria(new RequestCriteria($request));
|
||||
$typeratings = $this->typeratingRepo->all();
|
||||
|
||||
return view('admin.typeratings.index', [
|
||||
'typeratings' => $typeratings,
|
||||
]);
|
||||
}
|
||||
|
||||
public function create()
|
||||
{
|
||||
return view('admin.typeratings.create');
|
||||
}
|
||||
|
||||
public function store(CreateTypeRatingRequest $request)
|
||||
{
|
||||
$input = $request->all();
|
||||
|
||||
$model = $this->typeratingRepo->create($input);
|
||||
Flash::success('Type Rating saved successfully.');
|
||||
// Cache::forget(config('cache.keys.RANKS_PILOT_LIST.key'));
|
||||
|
||||
return redirect(route('admin.typeratings.edit', [$model->id]));
|
||||
}
|
||||
|
||||
public function show($id)
|
||||
{
|
||||
$typerating = $this->typeratingRepo->findWithoutFail($id);
|
||||
|
||||
if (empty($typerating)) {
|
||||
Flash::error('Type Rating not found');
|
||||
|
||||
return redirect(route('admin.typeratings.index'));
|
||||
}
|
||||
|
||||
return view('admin.typeratings.show', [
|
||||
'typerating' => $typerating,
|
||||
]);
|
||||
}
|
||||
|
||||
public function edit($id)
|
||||
{
|
||||
$typerating = $this->typeratingRepo->findWithoutFail($id);
|
||||
|
||||
if (empty($typerating)) {
|
||||
Flash::error('Type Rating not found');
|
||||
|
||||
return redirect(route('admin.typeratings.index'));
|
||||
}
|
||||
|
||||
$avail_subfleets = $this->getAvailSubfleets($typerating);
|
||||
|
||||
return view('admin.typeratings.edit', [
|
||||
'typerating' => $typerating,
|
||||
'avail_subfleets' => $avail_subfleets,
|
||||
]);
|
||||
}
|
||||
|
||||
public function update($id, UpdateTypeRatingRequest $request)
|
||||
{
|
||||
$typerating = $this->typeratingRepo->findWithoutFail($id);
|
||||
|
||||
if (empty($typerating)) {
|
||||
Flash::error('Type Rating not found');
|
||||
|
||||
return redirect(route('admin.typeratings.index'));
|
||||
}
|
||||
|
||||
$typerating = $this->typeratingRepo->update($request->all(), $id);
|
||||
// Cache::forget(config('cache.keys.RANKS_PILOT_LIST.key'));
|
||||
Flash::success('Type Rating updated successfully.');
|
||||
|
||||
return redirect(route('admin.typeratings.index'));
|
||||
}
|
||||
|
||||
public function destroy($id)
|
||||
{
|
||||
$typerating = $this->typeratingRepo->findWithoutFail($id);
|
||||
|
||||
if (empty($typerating)) {
|
||||
Flash::error('Type Rating not found');
|
||||
|
||||
return redirect(route('admin.typeratings.index'));
|
||||
}
|
||||
|
||||
$this->typeratingRepo->delete($id);
|
||||
|
||||
Flash::success('Type Rating deleted successfully.');
|
||||
|
||||
return redirect(route('admin.typeratings.index'));
|
||||
}
|
||||
|
||||
protected function getAvailSubfleets($typerating)
|
||||
{
|
||||
$retval = [];
|
||||
$all_subfleets = $this->subfleetRepo->all();
|
||||
$avail_subfleets = $all_subfleets->except($typerating->subfleets->modelKeys());
|
||||
foreach ($avail_subfleets as $subfleet) {
|
||||
$retval[$subfleet->id] = $subfleet->name.' (Airline: '.$subfleet->airline->code.')';
|
||||
}
|
||||
|
||||
return $retval;
|
||||
}
|
||||
|
||||
protected function return_subfleet_view($typerating)
|
||||
{
|
||||
$avail_subfleets = $this->getAvailSubfleets($typerating);
|
||||
|
||||
return view('admin.typeratings.subfleets', [
|
||||
'typerating' => $typerating,
|
||||
'avail_subfleets' => $avail_subfleets,
|
||||
]);
|
||||
}
|
||||
|
||||
public function subfleets($id, Request $request)
|
||||
{
|
||||
$typerating = $this->typeratingRepo->findWithoutFail($id);
|
||||
if (empty($typerating)) {
|
||||
Flash::error('Type Rating not found!');
|
||||
return redirect(route('admin.typeratings.index'));
|
||||
}
|
||||
|
||||
// add subfleet to type rating
|
||||
if ($request->isMethod('post')) {
|
||||
$subfleet = $this->subfleetRepo->find($request->input('subfleet_id'));
|
||||
$this->fleetSvc->addSubfleetToTypeRating($subfleet, $typerating);
|
||||
}
|
||||
// remove subfleet from type rating
|
||||
elseif ($request->isMethod('delete')) {
|
||||
$subfleet = $this->subfleetRepo->find($request->input('subfleet_id'));
|
||||
$this->fleetSvc->removeSubfleetFromTypeRating($subfleet, $typerating);
|
||||
}
|
||||
|
||||
return $this->return_subfleet_view($typerating);
|
||||
}
|
||||
}
|
||||
@@ -12,6 +12,7 @@ use App\Repositories\AirlineRepository;
|
||||
use App\Repositories\AirportRepository;
|
||||
use App\Repositories\PirepRepository;
|
||||
use App\Repositories\RoleRepository;
|
||||
use App\Repositories\TypeRatingRepository;
|
||||
use App\Repositories\UserRepository;
|
||||
use App\Services\UserService;
|
||||
use App\Support\Timezonelist;
|
||||
@@ -30,24 +31,27 @@ class UserController extends Controller
|
||||
private $airportRepo;
|
||||
private $pirepRepo;
|
||||
private $roleRepo;
|
||||
private $typeratingRepo;
|
||||
private $userRepo;
|
||||
private $userSvc;
|
||||
|
||||
/**
|
||||
* UserController constructor.
|
||||
*
|
||||
* @param AirlineRepository $airlineRepo
|
||||
* @param AirportRepository $airportRepo
|
||||
* @param PirepRepository $pirepRepo
|
||||
* @param RoleRepository $roleRepo
|
||||
* @param UserRepository $userRepo
|
||||
* @param UserService $userSvc
|
||||
* @param AirlineRepository $airlineRepo
|
||||
* @param AirportRepository $airportRepo
|
||||
* @param PirepRepository $pirepRepo
|
||||
* @param RoleRepository $roleRepo
|
||||
* @param TypeRatingRepository $typeratingRepo
|
||||
* @param UserRepository $userRepo
|
||||
* @param UserService $userSvc
|
||||
*/
|
||||
public function __construct(
|
||||
AirlineRepository $airlineRepo,
|
||||
AirportRepository $airportRepo,
|
||||
PirepRepository $pirepRepo,
|
||||
RoleRepository $roleRepo,
|
||||
TypeRatingRepository $typeratingRepo,
|
||||
UserRepository $userRepo,
|
||||
UserService $userSvc
|
||||
) {
|
||||
@@ -55,6 +59,7 @@ class UserController extends Controller
|
||||
$this->airportRepo = $airportRepo;
|
||||
$this->pirepRepo = $pirepRepo;
|
||||
$this->roleRepo = $roleRepo;
|
||||
$this->typeratingRepo = $typeratingRepo;
|
||||
$this->userSvc = $userSvc;
|
||||
$this->userRepo = $userRepo;
|
||||
}
|
||||
@@ -149,7 +154,7 @@ class UserController extends Controller
|
||||
public function edit($id)
|
||||
{
|
||||
$user = $this->userRepo
|
||||
->with(['awards', 'fields', 'rank'])
|
||||
->with(['awards', 'fields', 'rank', 'typeratings'])
|
||||
->findWithoutFail($id);
|
||||
|
||||
if (empty($user)) {
|
||||
@@ -169,17 +174,19 @@ class UserController extends Controller
|
||||
$airlines = $this->airlineRepo->selectBoxList();
|
||||
$airports = $this->airportRepo->selectBoxList(false);
|
||||
$roles = $this->roleRepo->selectBoxList(false, true);
|
||||
$avail_ratings = $this->getAvailTypeRatings($user);
|
||||
|
||||
return view('admin.users.edit', [
|
||||
'user' => $user,
|
||||
'pireps' => $pireps,
|
||||
'country' => new ISO3166(),
|
||||
'countries' => $countries,
|
||||
'timezones' => Timezonelist::toArray(),
|
||||
'airports' => $airports,
|
||||
'airlines' => $airlines,
|
||||
'ranks' => Rank::all()->pluck('name', 'id'),
|
||||
'roles' => $roles,
|
||||
'user' => $user,
|
||||
'pireps' => $pireps,
|
||||
'country' => new ISO3166(),
|
||||
'countries' => $countries,
|
||||
'timezones' => Timezonelist::toArray(),
|
||||
'airports' => $airports,
|
||||
'airlines' => $airlines,
|
||||
'ranks' => Rank::all()->pluck('name', 'id'),
|
||||
'roles' => $roles,
|
||||
'avail_ratings' => $avail_ratings,
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -260,6 +267,7 @@ class UserController extends Controller
|
||||
$user = $this->userRepo->findWithoutFail($id);
|
||||
if (empty($user)) {
|
||||
Flash::error('User not found');
|
||||
|
||||
return redirect(route('admin.users.index'));
|
||||
}
|
||||
|
||||
@@ -283,6 +291,7 @@ class UserController extends Controller
|
||||
$userAward = UserAward::where(['user_id' => $id, 'award_id' => $award_id]);
|
||||
if (empty($userAward)) {
|
||||
Flash::error('The user award could not be found');
|
||||
|
||||
return redirect()->back();
|
||||
}
|
||||
|
||||
@@ -311,4 +320,73 @@ class UserController extends Controller
|
||||
|
||||
return redirect(route('admin.users.edit', [$id]));
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the type ratings that are available to the user
|
||||
*
|
||||
* @param $user
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected function getAvailTypeRatings($user)
|
||||
{
|
||||
$retval = [];
|
||||
$all_ratings = $this->typeratingRepo->all();
|
||||
$avail_ratings = $all_ratings->except($user->typeratings->modelKeys());
|
||||
foreach ($avail_ratings as $tr) {
|
||||
$retval[$tr->id] = $tr->name.' ('.$tr->type.')';
|
||||
}
|
||||
|
||||
return $retval;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param User $user
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
protected function return_typeratings_view(?User $user)
|
||||
{
|
||||
$user->refresh();
|
||||
|
||||
$avail_ratings = $this->getAvailTypeRatings($user);
|
||||
return view('admin.users.type_ratings', [
|
||||
'user' => $user,
|
||||
'avail_ratings' => $avail_ratings,
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Operations for associating type ratings to the user
|
||||
*
|
||||
* @param $id
|
||||
* @param Request $request
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function typeratings($id, Request $request)
|
||||
{
|
||||
$user = $this->userRepo->findWithoutFail($id);
|
||||
if (empty($user)) {
|
||||
return $this->return_typeratings_view($user);
|
||||
}
|
||||
|
||||
if ($request->isMethod('get')) {
|
||||
return $this->return_typeratings_view($user);
|
||||
}
|
||||
|
||||
// associate user with type rating
|
||||
if ($request->isMethod('post')) {
|
||||
$typerating = $this->typeratingRepo->find($request->input('typerating_id'));
|
||||
$this->userSvc->addUserToTypeRating($user, $typerating);
|
||||
} // dissassociate user from the type rating
|
||||
elseif ($request->isMethod('delete')) {
|
||||
$typerating = $this->typeratingRepo->find($request->input('typerating_id'));
|
||||
$this->userSvc->removeUserFromTypeRating($user, $typerating);
|
||||
}
|
||||
|
||||
$user->save();
|
||||
|
||||
return $this->return_typeratings_view($user);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -148,10 +148,10 @@ class AcarsController extends Controller
|
||||
$pirep = Pirep::find($id);
|
||||
$this->checkCancelled($pirep);
|
||||
|
||||
Log::debug(
|
||||
/*Log::debug(
|
||||
'Posting ACARS update (user: '.Auth::user()->ident.', pirep id :'.$id.'): ',
|
||||
$request->post()
|
||||
);
|
||||
);*/
|
||||
|
||||
$count = 0;
|
||||
$positions = $request->post('positions');
|
||||
@@ -223,7 +223,7 @@ class AcarsController extends Controller
|
||||
$pirep = Pirep::find($id);
|
||||
$this->checkCancelled($pirep);
|
||||
|
||||
Log::debug('Posting ACARS log, PIREP: '.$id, $request->post());
|
||||
// Log::debug('Posting ACARS log, PIREP: '.$id, $request->post());
|
||||
|
||||
$count = 0;
|
||||
$logs = $request->post('logs');
|
||||
|
||||
@@ -25,6 +25,7 @@ use App\Models\Pirep;
|
||||
use App\Models\PirepComment;
|
||||
use App\Models\PirepFare;
|
||||
use App\Models\PirepFieldValue;
|
||||
use App\Models\User;
|
||||
use App\Repositories\JournalRepository;
|
||||
use App\Repositories\PirepRepository;
|
||||
use App\Services\Finance\PirepFinanceService;
|
||||
@@ -235,8 +236,12 @@ class PirepController extends Controller
|
||||
Log::info('PIREP Update, user '.Auth::id());
|
||||
Log::info($request->getContent());
|
||||
|
||||
/** @var User $user */
|
||||
$user = Auth::user();
|
||||
|
||||
/** @var Pirep $pirep */
|
||||
$pirep = Pirep::find($pirep_id);
|
||||
|
||||
$this->checkCancelled($pirep);
|
||||
|
||||
$attrs = $this->parsePirep($request);
|
||||
@@ -278,6 +283,7 @@ class PirepController extends Controller
|
||||
{
|
||||
Log::info('PIREP file, user '.Auth::id(), $request->post());
|
||||
|
||||
/** @var User $user */
|
||||
$user = Auth::user();
|
||||
|
||||
// Check if the status is cancelled...
|
||||
@@ -332,7 +338,7 @@ class PirepController extends Controller
|
||||
*/
|
||||
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);
|
||||
$this->pirepSvc->cancel($pirep);
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
namespace App\Http\Controllers\Api;
|
||||
|
||||
use App\Contracts\Controller;
|
||||
use App\Exceptions\BidNotFound;
|
||||
use App\Exceptions\Unauthorized;
|
||||
use App\Exceptions\UserNotFound;
|
||||
use App\Http\Resources\Bid as BidResource;
|
||||
@@ -160,6 +161,10 @@ class UserController extends Controller
|
||||
|
||||
// Return the current bid
|
||||
$bid = $this->bidSvc->getBid($user, $bid_id);
|
||||
if ($bid === null) {
|
||||
throw new BidNotFound($bid_id);
|
||||
}
|
||||
|
||||
if ($bid->user_id !== $user->id) {
|
||||
throw new Unauthorized(new \Exception('Bid not not belong to authenticated user'));
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@ class RegisterController extends Controller
|
||||
{
|
||||
$airports = $this->airportRepo->selectBoxList(false, setting('pilots.home_hubs_only'));
|
||||
$airlines = $this->airlineRepo->selectBoxList();
|
||||
$userFields = UserField::where(['show_on_registration' => true])->get();
|
||||
$userFields = UserField::where(['show_on_registration' => true, 'active' => true])->get();
|
||||
|
||||
return view('auth.register', [
|
||||
'airports' => $airports,
|
||||
@@ -138,7 +138,7 @@ class RegisterController extends Controller
|
||||
|
||||
Log::info('User registered: ', $user->toArray());
|
||||
|
||||
$userFields = UserField::all();
|
||||
$userFields = UserField::where(['show_on_registration' => true, 'active' => true])->get();
|
||||
foreach ($userFields as $field) {
|
||||
$field_name = 'field_'.$field->slug;
|
||||
UserFieldValue::updateOrCreate([
|
||||
|
||||
@@ -35,22 +35,23 @@ class AirportController extends Controller
|
||||
public function show($id, Request $request)
|
||||
{
|
||||
$id = strtoupper($id);
|
||||
$with_flights = ['airline', 'arr_airport', 'dpt_airport'];
|
||||
|
||||
$airport = $this->airportRepo->where('id', $id)->first();
|
||||
$airport = $this->airportRepo->with('files')->where('id', $id)->first();
|
||||
if (!$airport) {
|
||||
Flash::error('Airport not found!');
|
||||
return redirect(route('frontend.dashboard.index'));
|
||||
}
|
||||
|
||||
$inbound_flights = $this->flightRepo
|
||||
->with(['dpt_airport', 'arr_airport', 'airline'])
|
||||
->with($with_flights)
|
||||
->findWhere([
|
||||
'arr_airport_id' => $id,
|
||||
'active' => 1,
|
||||
])->all();
|
||||
|
||||
$outbound_flights = $this->flightRepo
|
||||
->with(['dpt_airport', 'arr_airport', 'airline'])
|
||||
->with($with_flights)
|
||||
->findWhere([
|
||||
'dpt_airport_id' => $id,
|
||||
'active' => 1,
|
||||
|
||||
@@ -28,14 +28,15 @@ class DashboardController extends Controller
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
//dd(config('backup'));
|
||||
$last_pirep = null;
|
||||
$with_pirep = ['aircraft', 'arr_airport', 'comments', 'dpt_airport'];
|
||||
|
||||
/** @var \App\Models\User $user */
|
||||
$user = Auth::user();
|
||||
$user->loadMissing('journal');
|
||||
|
||||
try {
|
||||
$last_pirep = $this->pirepRepo->find($user->last_pirep_id);
|
||||
$last_pirep = $this->pirepRepo->with($with_pirep)->find($user->last_pirep_id);
|
||||
} catch (\Exception $e) {
|
||||
}
|
||||
|
||||
|
||||
@@ -88,6 +88,7 @@ class FlightController extends Controller
|
||||
|
||||
/** @var \App\Models\User $user */
|
||||
$user = Auth::user();
|
||||
$user->loadMissing('current_airport');
|
||||
|
||||
if (setting('pilots.restrict_to_company')) {
|
||||
$where['airline_id'] = $user->airline_id;
|
||||
@@ -127,9 +128,11 @@ class FlightController extends Controller
|
||||
|
||||
$flights = $this->flightRepo->searchCriteria($request)
|
||||
->with([
|
||||
'dpt_airport',
|
||||
'arr_airport',
|
||||
'airline',
|
||||
'alt_airport',
|
||||
'arr_airport',
|
||||
'dpt_airport',
|
||||
'subfleets.airline',
|
||||
'simbrief' => function ($query) use ($user) {
|
||||
$query->where('user_id', $user->id);
|
||||
}, ])
|
||||
@@ -215,7 +218,19 @@ class FlightController extends Controller
|
||||
*/
|
||||
public function show($id)
|
||||
{
|
||||
$flight = $this->flightRepo->find($id);
|
||||
$user_id = Auth::id();
|
||||
$with_flight = [
|
||||
'airline',
|
||||
'alt_airport',
|
||||
'arr_airport',
|
||||
'dpt_airport',
|
||||
'subfleets.airline',
|
||||
'simbrief' => function ($query) use ($user_id) {
|
||||
$query->where('user_id', $user_id);
|
||||
},
|
||||
];
|
||||
|
||||
$flight = $this->flightRepo->with($with_flight)->find($id);
|
||||
if (empty($flight)) {
|
||||
Flash::error('Flight not found!');
|
||||
return redirect(route('frontend.dashboard.index'));
|
||||
@@ -224,7 +239,7 @@ 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();
|
||||
$bid = Bid::where(['user_id' => $user_id, 'flight_id' => $flight->id])->first();
|
||||
|
||||
return view('flights.show', [
|
||||
'flight' => $flight,
|
||||
|
||||
@@ -16,7 +16,7 @@ class HomeController extends Controller
|
||||
public function index()
|
||||
{
|
||||
try {
|
||||
$users = User::where('state', '!=', UserState::DELETED)->orderBy('created_at', 'desc')->take(4)->get();
|
||||
$users = User::with('home_airport')->where('state', '!=', UserState::DELETED)->orderBy('created_at', 'desc')->take(4)->get();
|
||||
} catch (\PDOException $e) {
|
||||
Log::emergency($e);
|
||||
return view('system/errors/database_error', [
|
||||
|
||||
@@ -91,8 +91,12 @@ class PirepController extends Controller
|
||||
*/
|
||||
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 = [];
|
||||
$subfleets = $this->userSvc->getAllowableSubfleets(Auth::user());
|
||||
$subfleets = $this->userSvc->getAllowableSubfleets($user);
|
||||
|
||||
if ($add_blank) {
|
||||
$aircraft[''] = '';
|
||||
@@ -100,7 +104,9 @@ class PirepController extends Controller
|
||||
|
||||
foreach ($subfleets as $subfleet) {
|
||||
$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'];
|
||||
}
|
||||
|
||||
@@ -182,7 +188,7 @@ class PirepController extends Controller
|
||||
|
||||
$where = [['user_id', $user->id]];
|
||||
$where[] = ['state', '<>', PirepState::CANCELLED];
|
||||
$with = ['airline', 'aircraft', 'dpt_airport', 'arr_airport', 'fares', 'comments'];
|
||||
$with = ['aircraft', 'airline', 'arr_airport', 'comments', 'dpt_airport'];
|
||||
|
||||
$this->pirepRepo->with($with)
|
||||
->pushCriteria(new WhereCriteria($request, $where));
|
||||
@@ -201,7 +207,20 @@ class PirepController extends Controller
|
||||
*/
|
||||
public function show($id)
|
||||
{
|
||||
$pirep = $this->pirepRepo->with(['simbrief'])->find($id);
|
||||
$with = [
|
||||
'acars_logs',
|
||||
'aircraft.airline',
|
||||
'airline.journal',
|
||||
'arr_airport',
|
||||
'comments',
|
||||
'dpt_airport',
|
||||
'fares.fare',
|
||||
'transactions',
|
||||
'simbrief',
|
||||
'user.rank',
|
||||
];
|
||||
|
||||
$pirep = $this->pirepRepo->with($with)->find($id);
|
||||
if (empty($pirep)) {
|
||||
Flash::error('Pirep not found');
|
||||
return redirect(route('frontend.pirep.index'));
|
||||
|
||||
@@ -80,22 +80,19 @@ class ProfileController extends Controller
|
||||
public function show($id)
|
||||
{
|
||||
/** @var \App\Models\User $user */
|
||||
$user = User::with(['awards', 'fields', 'fields.field'])
|
||||
->where('id', $id)
|
||||
->first();
|
||||
$with = ['airline', 'awards', 'current_airport', 'fields.field', 'home_airport', 'last_pirep', 'rank', 'typeratings'];
|
||||
$user = User::with($with)->where('id', $id)->first();
|
||||
|
||||
if (empty($user)) {
|
||||
Flash::error('User not found!');
|
||||
return redirect(route('frontend.dashboard.index'));
|
||||
}
|
||||
|
||||
$airports = $this->airportRepo->all();
|
||||
$userFields = $this->userRepo->getUserFields($user, true);
|
||||
|
||||
return view('profile.index', [
|
||||
'user' => $user,
|
||||
'userFields' => $userFields,
|
||||
'airports' => $airports,
|
||||
'acars' => $this->acarsEnabled(),
|
||||
]);
|
||||
}
|
||||
@@ -112,9 +109,7 @@ class ProfileController extends Controller
|
||||
public function edit(Request $request)
|
||||
{
|
||||
/** @var \App\Models\User $user */
|
||||
$user = User::with(['fields', 'fields.field'])
|
||||
->where('id', Auth::user()->id)
|
||||
->first();
|
||||
$user = User::with('fields.field')->where('id', Auth::id())->first();
|
||||
|
||||
if (empty($user)) {
|
||||
Flash::error('User not found!');
|
||||
|
||||
@@ -62,7 +62,7 @@ class SimBriefController
|
||||
$aircraft_id = $request->input('aircraft_id');
|
||||
|
||||
/** @var Flight $flight */
|
||||
$flight = $this->flightRepo->with(['fares', 'subfleets'])->find($flight_id);
|
||||
$flight = $this->flightRepo->with(['airline', 'arr_airport', 'dpt_airport', 'fares', 'subfleets'])->find($flight_id);
|
||||
|
||||
if (!$flight) {
|
||||
flash()->error('Unknown flight');
|
||||
@@ -80,46 +80,39 @@ class SimBriefController
|
||||
|
||||
// No aircraft selected, show selection form
|
||||
if (!$aircraft_id) {
|
||||
// If no subfleets defined for flight get them from user
|
||||
if ($flight->subfleets->count() > 0) {
|
||||
$subfleets = $flight->subfleets;
|
||||
} else {
|
||||
$subfleets = $this->userSvc->getAllowableSubfleets($user);
|
||||
}
|
||||
|
||||
// Build an array of subfleet id's from the subfleets collection
|
||||
$sf_ids = $subfleets->map(function ($subfleets) {
|
||||
return collect($subfleets->toArray())
|
||||
->only(['id'])
|
||||
->all();
|
||||
});
|
||||
// Get user's allowed subfleets and intersect it with flight subfleets
|
||||
// so we will have a proper list which the user is allowed to fly
|
||||
$user_subfleets = $this->userSvc->getAllowableSubfleets($user)->pluck('id')->toArray();
|
||||
$flight_subfleets = $flight->subfleets->pluck('id')->toArray();
|
||||
|
||||
// Now we can build a proper aircrafts collection
|
||||
// Contents will be either members of flight->subfleets
|
||||
// or members of user's allowable subfleets
|
||||
$aircrafts = Aircraft::whereIn('subfleet_id', $sf_ids)
|
||||
->where('state', AircraftState::PARKED)
|
||||
->where('status', AircraftStatus::ACTIVE)
|
||||
->orderby('icao')
|
||||
->orderby('registration')
|
||||
->get();
|
||||
$subfleet_ids = filled($flight_subfleets) ? array_intersect($user_subfleets, $flight_subfleets) : $user_subfleets;
|
||||
|
||||
// Prepare variables for single aircraft query
|
||||
$where = [];
|
||||
$where['state'] = AircraftState::PARKED;
|
||||
$where['status'] = AircraftStatus::ACTIVE;
|
||||
|
||||
if (setting('pireps.only_aircraft_at_dpt_airport')) {
|
||||
$aircrafts = $aircrafts->where('airport_id', $flight->dpt_airport_id);
|
||||
$where['airport_id'] = $flight->dpt_airport_id;
|
||||
}
|
||||
|
||||
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');
|
||||
$withCount = ['simbriefs' => function ($query) {
|
||||
$query->whereNull('pirep_id');
|
||||
}];
|
||||
|
||||
// Filter aircraft list to non used/blocked ones
|
||||
$aircrafts = $aircrafts->whereNotIn('id', $sb_aircraft);
|
||||
}
|
||||
// Build proper aircraft collection considering all possible settings
|
||||
// Flight subfleets, user subfleet restrictions, pirep restrictions, simbrief blocking etc
|
||||
$aircraft = Aircraft::withCount($withCount)->where($where)
|
||||
->when(setting('simbrief.block_aircraft'), function ($query) {
|
||||
return $query->having('simbriefs_count', 0);
|
||||
})->whereIn('subfleet_id', $subfleet_ids)
|
||||
->orderby('icao')->orderby('registration')
|
||||
->get();
|
||||
|
||||
return view('flights.simbrief_aircraft', [
|
||||
'flight' => $flight,
|
||||
'aircrafts' => $aircrafts,
|
||||
'subfleets' => $subfleets,
|
||||
'aircrafts' => $aircraft,
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -136,7 +129,7 @@ class SimBriefController
|
||||
// SimBrief profile does not exists and everything else is ok
|
||||
// Select aircraft which will be used for calculations and details
|
||||
/** @var Aircraft $aircraft */
|
||||
$aircraft = Aircraft::where('id', $aircraft_id)->first();
|
||||
$aircraft = Aircraft::with(['airline'])->where('id', $aircraft_id)->first();
|
||||
|
||||
// Figure out the proper fares to use for this flight/aircraft
|
||||
$all_fares = $this->fareSvc->getFareWithOverrides($aircraft->subfleet->fares, $flight->fares);
|
||||
@@ -263,7 +256,7 @@ class SimBriefController
|
||||
$user = Auth::user();
|
||||
|
||||
/** @var SimBrief $simbrief */
|
||||
$simbrief = SimBrief::with(['flight'])->find($id);
|
||||
$simbrief = SimBrief::with(['flight.airline', 'pirep.airline'])->find($id);
|
||||
if (!$simbrief) {
|
||||
flash()->error('SimBrief briefing not found');
|
||||
return redirect(route('frontend.flights.index'));
|
||||
|
||||
@@ -30,6 +30,9 @@ class UserController extends Controller
|
||||
*/
|
||||
public function index(Request $request)
|
||||
{
|
||||
$with = ['airline', 'current_airport', 'fields.field', 'home_airport', 'rank'];
|
||||
$with_count = ['awards'];
|
||||
|
||||
$where = [];
|
||||
|
||||
if (setting('pilots.hide_inactive')) {
|
||||
@@ -43,7 +46,8 @@ class UserController extends Controller
|
||||
}
|
||||
|
||||
$users = $this->userRepo
|
||||
->with(['airline', 'current_airport'])
|
||||
->withCount($with_count)
|
||||
->with($with)
|
||||
->orderBy('pilot_id', 'asc')
|
||||
->paginate();
|
||||
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests;
|
||||
|
||||
use App\Contracts\FormRequest;
|
||||
use App\Models\Typerating;
|
||||
|
||||
class CreateTypeRatingRequest extends FormRequest
|
||||
{
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules(): array
|
||||
{
|
||||
return Typerating::$rules;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests;
|
||||
|
||||
use App\Contracts\FormRequest;
|
||||
use App\Models\Typerating;
|
||||
|
||||
class UpdateTypeRatingRequest extends FormRequest
|
||||
{
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules(): array
|
||||
{
|
||||
return Typerating::$rules;
|
||||
}
|
||||
}
|
||||
@@ -60,7 +60,7 @@ class AwardHandler extends Listener
|
||||
*/
|
||||
public function checkForAwards($user)
|
||||
{
|
||||
$awards = Award::all();
|
||||
$awards = Award::where('active', 1)->get();
|
||||
foreach ($awards as $award) {
|
||||
$klass = $award->getReference($award, $user);
|
||||
if ($klass) {
|
||||
|
||||
@@ -4,6 +4,8 @@ namespace App\Listeners;
|
||||
|
||||
use App\Contracts\Listener;
|
||||
use App\Events\Expenses;
|
||||
use App\Models\Enums\ExpenseType;
|
||||
use App\Models\Expense;
|
||||
|
||||
class ExpenseListener extends Listener
|
||||
{
|
||||
@@ -23,7 +25,7 @@ class ExpenseListener extends Listener
|
||||
// The transaction group is how it will show as a line item
|
||||
/*$expenses[] = new Expense([
|
||||
'type' => ExpenseType::FLIGHT,
|
||||
'amount' => 15000, # $150
|
||||
'amount' => 150, # $150
|
||||
'transaction_group' => '',
|
||||
'charge_to_user' => true|false
|
||||
]);*/
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
namespace App\Listeners;
|
||||
|
||||
use App\Contracts\Listener;
|
||||
use App\Events\Fares;
|
||||
use App\Models\Enums\FareType;
|
||||
use App\Models\Fare;
|
||||
|
||||
class FareListener extends Listener
|
||||
{
|
||||
/**
|
||||
* Return a list of additional fares/income items
|
||||
*
|
||||
* @param Fares $event
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function handle(Fares $event)
|
||||
{
|
||||
$fares = [];
|
||||
|
||||
// This is an example of a fare to return
|
||||
// You have the pirep on $event->pirep and any associated data
|
||||
// Cost may be skipped at all if not needed
|
||||
// Notes will be used as transaction group and it is how it will show as a line item
|
||||
/*
|
||||
$fares[] = new Fare([
|
||||
'name' => 'Duty Free Sales',
|
||||
'type' => FareType::PASSENGER,
|
||||
'price' => 985,
|
||||
'cost' => 126,
|
||||
'notes' => 'InFlight Sales',
|
||||
]);
|
||||
*/
|
||||
|
||||
return $fares;
|
||||
}
|
||||
}
|
||||
@@ -7,11 +7,13 @@ use App\Models\Enums\AircraftStatus;
|
||||
use App\Models\Traits\ExpensableTrait;
|
||||
use App\Models\Traits\FilesTrait;
|
||||
use Carbon\Carbon;
|
||||
use Znck\Eloquent\Traits\BelongsToThrough;
|
||||
|
||||
/**
|
||||
* @property int id
|
||||
* @property mixed subfleet_id
|
||||
* @property string airport_id The apt where the aircraft is
|
||||
* @property string hub_id The apt where the aircraft is based
|
||||
* @property string ident
|
||||
* @property string name
|
||||
* @property string icao
|
||||
@@ -21,6 +23,7 @@ use Carbon\Carbon;
|
||||
* @property float zfw
|
||||
* @property string hex_code
|
||||
* @property Airport airport
|
||||
* @property Airport hub
|
||||
* @property Subfleet subfleet
|
||||
* @property int status
|
||||
* @property int state
|
||||
@@ -31,12 +34,14 @@ class Aircraft extends Model
|
||||
{
|
||||
use ExpensableTrait;
|
||||
use FilesTrait;
|
||||
use BelongsToThrough;
|
||||
|
||||
public $table = 'aircraft';
|
||||
|
||||
protected $fillable = [
|
||||
'subfleet_id',
|
||||
'airport_id',
|
||||
'hub_id',
|
||||
'iata',
|
||||
'icao',
|
||||
'name',
|
||||
@@ -100,14 +105,46 @@ class Aircraft extends Model
|
||||
$this->attributes['icao'] = strtoupper($icao);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the landing time in carbon format if provided
|
||||
*
|
||||
* @return Carbon|null
|
||||
*/
|
||||
public function getLandingTimeAttribute()
|
||||
{
|
||||
if (array_key_exists('landing_time', $this->attributes) && filled($this->attributes['landing_time'])) {
|
||||
return new Carbon($this->attributes['landing_time']);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* foreign keys
|
||||
*/
|
||||
public function airline()
|
||||
{
|
||||
return $this->belongsToThrough(Airline::class, Subfleet::class);
|
||||
}
|
||||
|
||||
public function airport()
|
||||
{
|
||||
return $this->belongsTo(Airport::class, 'airport_id');
|
||||
}
|
||||
|
||||
public function hub()
|
||||
{
|
||||
return $this->hasOne(Airport::class, 'id', 'hub_id');
|
||||
}
|
||||
|
||||
public function pireps()
|
||||
{
|
||||
return $this->hasMany(Pirep::class, 'aircraft_id');
|
||||
}
|
||||
|
||||
public function simbriefs()
|
||||
{
|
||||
return $this->hasMany(SimBrief::class, 'aircraft_id');
|
||||
}
|
||||
|
||||
public function subfleet()
|
||||
{
|
||||
return $this->belongsTo(Subfleet::class, 'subfleet_id');
|
||||
|
||||
@@ -103,6 +103,11 @@ class Airline extends Model
|
||||
return $this->hasMany(Subfleet::class, 'airline_id');
|
||||
}
|
||||
|
||||
public function aircraft()
|
||||
{
|
||||
return $this->hasManyThrough(Aircraft::class, Subfleet::class);
|
||||
}
|
||||
|
||||
public function flights()
|
||||
{
|
||||
return $this->belongsTo(Flight::class, 'airline_id');
|
||||
|
||||
@@ -21,6 +21,7 @@ class Award extends Model
|
||||
'image_url',
|
||||
'ref_model',
|
||||
'ref_model_params',
|
||||
'active',
|
||||
];
|
||||
|
||||
public static $rules = [
|
||||
@@ -29,6 +30,7 @@ class Award extends Model
|
||||
'image_url' => 'nullable',
|
||||
'ref_model' => 'required',
|
||||
'ref_model_params' => 'nullable',
|
||||
'active' => 'nullable',
|
||||
];
|
||||
|
||||
/**
|
||||
|
||||
@@ -10,6 +10,8 @@ use Carbon\Carbon;
|
||||
* @property string flight_id
|
||||
* @property Carbon created_at
|
||||
* @property Carbon updated_at
|
||||
* @property Flight flight
|
||||
* @property User user
|
||||
*/
|
||||
class Bid extends Model
|
||||
{
|
||||
|
||||
@@ -7,6 +7,7 @@ use App\Contracts\Enum;
|
||||
class AircraftStatus extends Enum
|
||||
{
|
||||
public const ACTIVE = 'A';
|
||||
public const MAINTENANCE = 'M';
|
||||
public const STORED = 'S';
|
||||
public const RETIRED = 'R';
|
||||
public const SCRAPPED = 'C';
|
||||
@@ -14,6 +15,7 @@ class AircraftStatus extends Enum
|
||||
|
||||
public static $labels = [
|
||||
self::ACTIVE => 'aircraft.status.active',
|
||||
self::MAINTENANCE => 'aircraft.status.maintenance',
|
||||
self::STORED => 'aircraft.status.stored',
|
||||
self::RETIRED => 'aircraft.status.retired',
|
||||
self::SCRAPPED => 'aircraft.status.scrapped',
|
||||
|
||||
@@ -24,6 +24,7 @@ use Illuminate\Support\Collection;
|
||||
* @property Collection subfleets
|
||||
* @property int days
|
||||
* @property int distance
|
||||
* @property int planned_distance
|
||||
* @property int flight_time
|
||||
* @property string route
|
||||
* @property string dpt_time
|
||||
@@ -136,19 +137,19 @@ class Flight extends Model
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the flight ident, e.,g JBU1900
|
||||
* Get the flight ident, e.,g JBU1900/C.nn/L.yy
|
||||
*/
|
||||
public function getIdentAttribute(): string
|
||||
{
|
||||
$flight_id = $this->airline->code;
|
||||
$flight_id = optional($this->airline)->code;
|
||||
$flight_id .= $this->flight_number;
|
||||
|
||||
if (filled($this->route_code)) {
|
||||
$flight_id .= '-'.$this->route_code;
|
||||
$flight_id .= '/C.'.$this->route_code;
|
||||
}
|
||||
|
||||
if (filled($this->route_leg)) {
|
||||
$flight_id .= '-'.$this->route_leg;
|
||||
$flight_id .= '/L.'.$this->route_leg;
|
||||
}
|
||||
|
||||
return $flight_id;
|
||||
|
||||
@@ -215,21 +215,19 @@ class Pirep extends Model
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the flight ident, e.,g JBU1900
|
||||
*
|
||||
* @return string
|
||||
* Get the flight ident, e.,g JBU1900/C.nn/L.yy
|
||||
*/
|
||||
public function getIdentAttribute(): string
|
||||
{
|
||||
//$flight_id = $this->airline->code;
|
||||
$flight_id = $this->flight_number;
|
||||
$flight_id = optional($this->airline)->code;
|
||||
$flight_id .= $this->flight_number;
|
||||
|
||||
if (filled($this->route_code)) {
|
||||
$flight_id .= '/C'.$this->route_code;
|
||||
$flight_id .= '/C.'.$this->route_code;
|
||||
}
|
||||
|
||||
if (filled($this->route_leg)) {
|
||||
$flight_id .= '/L'.$this->route_leg;
|
||||
$flight_id .= '/L.'.$this->route_leg;
|
||||
}
|
||||
|
||||
return $flight_id;
|
||||
|
||||
@@ -107,4 +107,9 @@ class Subfleet extends Model
|
||||
return $this->belongsToMany(Rank::class, 'subfleet_rank')
|
||||
->withPivot('acars_pay', 'manual_pay');
|
||||
}
|
||||
|
||||
public function typeratings()
|
||||
{
|
||||
return $this->belongsToMany(Typerating::class, 'typerating_subfleet', 'subfleet_id', 'typerating_id');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use App\Contracts\Model;
|
||||
|
||||
class Typerating extends Model
|
||||
{
|
||||
public $table = 'typeratings';
|
||||
|
||||
protected $fillable = [
|
||||
'name',
|
||||
'type',
|
||||
'description',
|
||||
'image_url',
|
||||
'active',
|
||||
];
|
||||
|
||||
// Validation
|
||||
public static $rules = [
|
||||
'name' => 'required',
|
||||
'type' => 'required',
|
||||
'description' => 'nullable',
|
||||
'image_url' => 'nullable',
|
||||
];
|
||||
|
||||
// Relationships
|
||||
public function subfleets()
|
||||
{
|
||||
return $this->belongsToMany(Subfleet::class, 'typerating_subfleet', 'typerating_id', 'subfleet_id');
|
||||
}
|
||||
|
||||
public function users()
|
||||
{
|
||||
return $this->belongsToMany(User::class, 'typerating_user', 'typerating_id', 'user_id');
|
||||
}
|
||||
}
|
||||
+20
-4
@@ -7,6 +7,7 @@ use App\Models\Traits\JournalTrait;
|
||||
use Illuminate\Foundation\Auth\User as Authenticatable;
|
||||
use Illuminate\Notifications\Notifiable;
|
||||
use Laratrust\Traits\LaratrustUserTrait;
|
||||
use Staudenmeir\EloquentHasManyDeep\HasRelationships;
|
||||
|
||||
/**
|
||||
* @property int id
|
||||
@@ -42,6 +43,7 @@ use Laratrust\Traits\LaratrustUserTrait;
|
||||
* @property UserFieldValue[] fields
|
||||
* @property Role[] roles
|
||||
* @property Subfleet[] subfleets
|
||||
* @property TypeRating[] typeratings
|
||||
*
|
||||
* @mixin \Illuminate\Database\Eloquent\Builder
|
||||
* @mixin \Illuminate\Notifications\Notifiable
|
||||
@@ -52,6 +54,7 @@ class User extends Authenticatable
|
||||
use JournalTrait;
|
||||
use LaratrustUserTrait;
|
||||
use Notifiable;
|
||||
use HasRelationships;
|
||||
|
||||
public $table = 'users';
|
||||
|
||||
@@ -94,7 +97,10 @@ class User extends Authenticatable
|
||||
*/
|
||||
protected $hidden = [
|
||||
'api_key',
|
||||
'email',
|
||||
'name',
|
||||
'discord_id',
|
||||
'discord_private_channel_id',
|
||||
'password',
|
||||
'last_ip',
|
||||
'remember_token',
|
||||
@@ -125,8 +131,9 @@ class User extends Authenticatable
|
||||
public function getIdentAttribute(): string
|
||||
{
|
||||
$length = setting('pilots.id_length');
|
||||
$ident_code = filled(setting('pilots.id_code')) ? setting('pilots.id_code') : optional($this->airline)->icao;
|
||||
|
||||
return $this->airline->icao.str_pad($this->pilot_id, $length, '0', STR_PAD_LEFT);
|
||||
return $ident_code.str_pad($this->pilot_id, $length, '0', STR_PAD_LEFT);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -145,7 +152,7 @@ class User extends Authenticatable
|
||||
$first_name = $name_parts[0];
|
||||
$last_name = $name_parts[$count - 1];
|
||||
|
||||
return $first_name.' '.$last_name[0];
|
||||
return $first_name.' '.mb_substr($last_name, 0, 1);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -191,8 +198,7 @@ class User extends Authenticatable
|
||||
{
|
||||
$default = config('gravatar.default');
|
||||
|
||||
$uri = config('gravatar.url')
|
||||
.md5(strtolower(trim($this->email))).'?d='.urlencode($default);
|
||||
$uri = config('gravatar.url').md5(strtolower(trim($this->email))).'?d='.urlencode($default);
|
||||
|
||||
if ($size !== null) {
|
||||
$uri .= '&s='.$size;
|
||||
@@ -265,4 +271,14 @@ class User extends Authenticatable
|
||||
{
|
||||
return $this->belongsTo(Rank::class, 'rank_id');
|
||||
}
|
||||
|
||||
public function typeratings()
|
||||
{
|
||||
return $this->belongsToMany(Typerating::class, 'typerating_user', 'user_id', 'typerating_id');
|
||||
}
|
||||
|
||||
public function rated_subfleets()
|
||||
{
|
||||
return $this->hasManyDeep(Subfleet::class, ['typerating_user', Typerating::class, 'typerating_subfleet']);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,6 +22,14 @@ class UserFieldValue extends Model
|
||||
|
||||
public static $rules = [];
|
||||
|
||||
/**
|
||||
* Return related field's name along with field values
|
||||
*/
|
||||
public function getNameAttribute(): string
|
||||
{
|
||||
return optional($this->field)->name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Foreign Keys
|
||||
*/
|
||||
|
||||
@@ -20,14 +20,23 @@ class DiscordWebhook
|
||||
public function send($notifiable, Notification $notification)
|
||||
{
|
||||
$message = $notification->toDiscordChannel($notifiable);
|
||||
if ($message === null || empty($message->webhook_url)) {
|
||||
Log::debug('Discord notifications not configured, skipping');
|
||||
if ($message === null) {
|
||||
//Log::debug('Discord notifications not configured, skipping');
|
||||
return;
|
||||
}
|
||||
|
||||
$webhook_url = $message->webhook_url;
|
||||
if (empty($webhook_url)) {
|
||||
$webhook_url = setting('notifications.discord_private_webhook_url');
|
||||
if (empty($webhook_url)) {
|
||||
//Log::debug('Discord notifications not configured, skipping');
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
$data = $message->toArray();
|
||||
$this->httpClient->post($message->webhook_url, $data);
|
||||
$this->httpClient->post($webhook_url, $data);
|
||||
} catch (RequestException $e) {
|
||||
$request = Psr7\Message::toString($e->getRequest());
|
||||
$response = Psr7\Message::toString($e->getResponse());
|
||||
|
||||
@@ -4,8 +4,6 @@ namespace App\Notifications\Messages;
|
||||
|
||||
use App\Contracts\Notification;
|
||||
use App\Models\User;
|
||||
use App\Notifications\Channels\Discord\DiscordMessage;
|
||||
use App\Notifications\Channels\Discord\DiscordWebhook;
|
||||
use App\Notifications\Channels\MailChannel;
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
|
||||
@@ -32,32 +30,21 @@ class AdminUserRegistered extends Notification implements ShouldQueue
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $notifiable
|
||||
*
|
||||
* @return string[]
|
||||
*/
|
||||
public function via($notifiable)
|
||||
{
|
||||
return ['mail', DiscordWebhook::class];
|
||||
return ['mail'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Send a Discord notification
|
||||
* @param $notifiable
|
||||
*
|
||||
* @param User $pirep
|
||||
* @param mixed $user
|
||||
*
|
||||
* @return DiscordMessage|null
|
||||
* @return array
|
||||
*/
|
||||
public function toDiscordChannel($user): ?DiscordMessage
|
||||
{
|
||||
if (empty(setting('notifications.discord_private_webhook_url'))) {
|
||||
return null;
|
||||
}
|
||||
|
||||
$dm = new DiscordMessage();
|
||||
return $dm->webhook(setting('notifications.discord_private_webhook_url'))
|
||||
->success()
|
||||
->title('New User Registered: '.$user->ident)
|
||||
->fields([]);
|
||||
}
|
||||
|
||||
public function toArray($notifiable)
|
||||
{
|
||||
return [
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
<?php
|
||||
|
||||
namespace App\Notifications\Messages\Broadcast;
|
||||
|
||||
use App\Contracts\Notification;
|
||||
use App\Models\News;
|
||||
use App\Notifications\Channels\Discord\DiscordMessage;
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
|
||||
class NewsAdded extends Notification implements ShouldQueue
|
||||
{
|
||||
private $news;
|
||||
|
||||
public function __construct(News $news)
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
$this->news = $news;
|
||||
}
|
||||
|
||||
public function via($notifiable)
|
||||
{
|
||||
return ['discord_webhook'];
|
||||
}
|
||||
|
||||
/**
|
||||
* @param News $news
|
||||
*
|
||||
* @return DiscordMessage|null
|
||||
*/
|
||||
public function toDiscordChannel($news): ?DiscordMessage
|
||||
{
|
||||
$dm = new DiscordMessage();
|
||||
return $dm->url(setting('notifications.discord_public_webhook_url'))
|
||||
->success()
|
||||
->title('News: '.$news->subject)
|
||||
->author([
|
||||
'name' => $news->user->ident.' - '.$news->user->name_private,
|
||||
'url' => '',
|
||||
'icon_url' => $news->user->resolveAvatarUrl(),
|
||||
])
|
||||
->description($news->body);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the array representation of the notification.
|
||||
*
|
||||
* @param mixed $notifiable
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function toArray($notifiable)
|
||||
{
|
||||
return [
|
||||
'news_id' => $this->news->id,
|
||||
];
|
||||
}
|
||||
}
|
||||
+16
-30
@@ -1,22 +1,18 @@
|
||||
<?php
|
||||
|
||||
namespace App\Notifications\Messages;
|
||||
namespace App\Notifications\Messages\Broadcast;
|
||||
|
||||
use App\Contracts\Notification;
|
||||
use App\Models\Pirep;
|
||||
use App\Notifications\Channels\Discord\DiscordMessage;
|
||||
use App\Notifications\Channels\Discord\DiscordWebhook;
|
||||
use App\Notifications\Channels\MailChannel;
|
||||
use App\Support\Units\Distance;
|
||||
use App\Support\Units\Time;
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
use PhpUnitsOfMeasure\Exception\NonNumericValue;
|
||||
use PhpUnitsOfMeasure\Exception\NonStringUnitName;
|
||||
|
||||
class PirepSubmitted extends Notification implements ShouldQueue
|
||||
class PirepFiled extends Notification implements ShouldQueue
|
||||
{
|
||||
use MailChannel;
|
||||
|
||||
private $pirep;
|
||||
|
||||
/**
|
||||
@@ -29,17 +25,11 @@ class PirepSubmitted extends Notification implements ShouldQueue
|
||||
parent::__construct();
|
||||
|
||||
$this->pirep = $pirep;
|
||||
|
||||
$this->setMailable(
|
||||
'New PIREP Submitted',
|
||||
'notifications.mail.admin.pirep.submitted',
|
||||
['pirep' => $this->pirep]
|
||||
);
|
||||
}
|
||||
|
||||
public function via($notifiable)
|
||||
{
|
||||
return ['mail', DiscordWebhook::class];
|
||||
return ['discord_webhook'];
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -51,34 +41,30 @@ class PirepSubmitted extends Notification implements ShouldQueue
|
||||
*/
|
||||
public function toDiscordChannel($pirep): ?DiscordMessage
|
||||
{
|
||||
if (empty(setting('notifications.discord_public_webhook_url'))) {
|
||||
return null;
|
||||
}
|
||||
|
||||
$title = 'Flight '.$pirep->airline->code.$pirep->ident.' Filed';
|
||||
$title = 'Flight '.$pirep->ident.' Filed';
|
||||
$fields = [
|
||||
'Flight' => $pirep->airline->code.$pirep->ident,
|
||||
'Departure Airport' => $pirep->dpt_airport_id,
|
||||
'Arrival Airport' => $pirep->arr_airport_id,
|
||||
'Equipment' => $pirep->aircraft->ident,
|
||||
'Flight Time (Planned)' => Time::minutesToTimeString($pirep->planned_flight_time),
|
||||
'Flight' => $pirep->ident,
|
||||
'Departure Airport' => $pirep->dpt_airport_id,
|
||||
'Arrival Airport' => $pirep->arr_airport_id,
|
||||
'Equipment' => $pirep->aircraft->ident,
|
||||
'Flight Time' => Time::minutesToTimeString($pirep->flight_time),
|
||||
];
|
||||
|
||||
if ($pirep->planned_distance) {
|
||||
if ($pirep->distance) {
|
||||
try {
|
||||
$planned_distance = new Distance(
|
||||
$pirep->planned_distance,
|
||||
$distance = new Distance(
|
||||
$pirep->distance,
|
||||
config('phpvms.internal_units.distance')
|
||||
);
|
||||
|
||||
$pd = $planned_distance[$planned_distance->unit].' '.$planned_distance->unit;
|
||||
$fields['Distance (Planned)'] = $pd;
|
||||
} catch (NonNumericValue | NonStringUnitName $e) {
|
||||
$pd = $distance[$distance->unit].' '.$distance->unit;
|
||||
$fields['Distance'] = $pd;
|
||||
} catch (NonNumericValue|NonStringUnitName $e) {
|
||||
}
|
||||
}
|
||||
|
||||
$dm = new DiscordMessage();
|
||||
return $dm->webhook(setting('notifications.discord_public_webhook_url'))
|
||||
return $dm->url(setting('notifications.discord_public_webhook_url'))
|
||||
->success()
|
||||
->title($title)
|
||||
->description($pirep->user->discord_id ? 'Flight by <@'.$pirep->user->discord_id.'>' : '')
|
||||
+3
-3
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace App\Notifications\Messages;
|
||||
namespace App\Notifications\Messages\Broadcast;
|
||||
|
||||
use App\Contracts\Notification;
|
||||
use App\Models\Pirep;
|
||||
@@ -48,9 +48,9 @@ class PirepPrefiled extends Notification implements ShouldQueue
|
||||
return null;
|
||||
}
|
||||
|
||||
$title = 'Flight '.$pirep->airline->code.$pirep->ident.' Prefiled';
|
||||
$title = 'Flight '.$pirep->ident.' Prefiled';
|
||||
$fields = [
|
||||
'Flight' => $pirep->airline->code.$pirep->ident,
|
||||
'Flight' => $pirep->ident,
|
||||
'Departure Airport' => $pirep->dpt_airport_id,
|
||||
'Arrival Airport' => $pirep->arr_airport_id,
|
||||
'Equipment' => $pirep->aircraft->ident,
|
||||
+8
-10
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace App\Notifications\Messages;
|
||||
namespace App\Notifications\Messages\Broadcast;
|
||||
|
||||
use App\Contracts\Notification;
|
||||
use App\Models\Enums\PirepStatus;
|
||||
@@ -9,9 +9,11 @@ use App\Notifications\Channels\Discord\DiscordMessage;
|
||||
use App\Notifications\Channels\Discord\DiscordWebhook;
|
||||
use App\Support\Units\Distance;
|
||||
use App\Support\Units\Time;
|
||||
use function config;
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
use PhpUnitsOfMeasure\Exception\NonNumericValue;
|
||||
use PhpUnitsOfMeasure\Exception\NonStringUnitName;
|
||||
use function route;
|
||||
|
||||
/**
|
||||
* Send the PIREP accepted message to a particular user, can also be sent to Discord
|
||||
@@ -73,14 +75,10 @@ class PirepStatusChanged extends Notification implements ShouldQueue
|
||||
*/
|
||||
public function toDiscordChannel($pirep): ?DiscordMessage
|
||||
{
|
||||
if (empty(setting('notifications.discord_public_webhook_url'))) {
|
||||
return null;
|
||||
}
|
||||
|
||||
$title = 'Flight '.$pirep->airline->code.$pirep->ident.' '.self::$verbs[$pirep->status];
|
||||
$title = 'Flight '.$pirep->ident.' '.self::$verbs[$pirep->status];
|
||||
|
||||
$fields = [
|
||||
'Flight' => $pirep->airline->code.$pirep->ident,
|
||||
'Flight' => $pirep->ident,
|
||||
'Departure Airport' => $pirep->dpt_airport_id,
|
||||
'Arrival Airport' => $pirep->arr_airport_id,
|
||||
'Equipment' => $pirep->aircraft->ident,
|
||||
@@ -102,17 +100,17 @@ class PirepStatusChanged extends Notification implements ShouldQueue
|
||||
$planned_distance = new Distance($pirep->planned_distance, $unit);
|
||||
$pd = $planned_distance[$planned_distance->unit];
|
||||
$fields['Distance'] .= '/'.$pd;
|
||||
} catch (NonNumericValue | NonStringUnitName $e) {
|
||||
} catch (NonNumericValue|NonStringUnitName $e) {
|
||||
}
|
||||
}
|
||||
|
||||
$fields['Distance'] .= ' '.$planned_distance->unit;
|
||||
} catch (NonNumericValue | NonStringUnitName $e) {
|
||||
} catch (NonNumericValue|NonStringUnitName $e) {
|
||||
}
|
||||
}
|
||||
|
||||
$dm = new DiscordMessage();
|
||||
return $dm->webhook(setting('notifications.discord_public_webhook_url'))
|
||||
return $dm->url(setting('notifications.discord_public_webhook_url'))
|
||||
->success()
|
||||
->title($title)
|
||||
->description($pirep->user->discord_id ? 'Flight by <@'.$pirep->user->discord_id.'>' : '')
|
||||
@@ -0,0 +1,74 @@
|
||||
<?php
|
||||
|
||||
namespace App\Notifications\Messages\Broadcast;
|
||||
|
||||
use App\Contracts\Notification;
|
||||
use App\Models\User;
|
||||
use App\Notifications\Channels\Discord\DiscordMessage;
|
||||
use App\Notifications\Channels\MailChannel;
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
|
||||
/**
|
||||
* Send a message to a Discord channel that a user was registered
|
||||
*/
|
||||
class UserRegistered extends Notification implements ShouldQueue
|
||||
{
|
||||
use MailChannel;
|
||||
|
||||
private $user;
|
||||
|
||||
/**
|
||||
* Create a new notification instance.
|
||||
*
|
||||
* @param \App\Models\User $user
|
||||
*/
|
||||
public function __construct(User $user)
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
$this->user = $user;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $notifiable
|
||||
*
|
||||
* @return string[]
|
||||
*/
|
||||
public function via($notifiable)
|
||||
{
|
||||
return ['discord_webhook'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Send a Discord notification
|
||||
*
|
||||
* @param $notifiable
|
||||
*
|
||||
* @return DiscordMessage|null
|
||||
*/
|
||||
public function toDiscordChannel($notifiable): ?DiscordMessage
|
||||
{
|
||||
$dm = new DiscordMessage();
|
||||
return $dm->url(setting('notifications.discord_private_webhook_url'))
|
||||
->success()
|
||||
->title('New User Registered: '.$this->user->ident)
|
||||
->author([
|
||||
'name' => $this->user->ident.' - '.$this->user->name_private,
|
||||
'url' => '',
|
||||
'icon_url' => $this->user->resolveAvatarUrl(),
|
||||
])
|
||||
->fields([]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $notifiable
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function toArray($notifiable)
|
||||
{
|
||||
return [
|
||||
'user_id' => $this->user->id,
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
<?php
|
||||
|
||||
namespace App\Notifications\Messages;
|
||||
|
||||
use App\Contracts\Notification;
|
||||
use App\Models\Pirep;
|
||||
use App\Notifications\Channels\MailChannel;
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
|
||||
class PirepFiled extends Notification implements ShouldQueue
|
||||
{
|
||||
use MailChannel;
|
||||
|
||||
private $pirep;
|
||||
|
||||
/**
|
||||
* Create a new notification instance.
|
||||
*
|
||||
* @param \App\Models\Pirep $pirep
|
||||
*/
|
||||
public function __construct(Pirep $pirep)
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
$this->pirep = $pirep;
|
||||
|
||||
$this->setMailable(
|
||||
'New PIREP Submitted',
|
||||
'notifications.mail.admin.pirep.submitted',
|
||||
['pirep' => $this->pirep]
|
||||
);
|
||||
}
|
||||
|
||||
public function via($notifiable)
|
||||
{
|
||||
return ['mail'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the array representation of the notification.
|
||||
*
|
||||
* @param mixed $notifiable
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function toArray($notifiable)
|
||||
{
|
||||
return [
|
||||
'pirep_id' => $this->pirep->id,
|
||||
'user_id' => $this->pirep->user_id,
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -134,10 +134,10 @@ class NotificationEventsHandler extends Listener
|
||||
*/
|
||||
$this->notifyAdmins(new Messages\AdminUserRegistered($event->user));
|
||||
|
||||
/**
|
||||
* Discord and other notifications
|
||||
/*
|
||||
* Broadcast notifications
|
||||
*/
|
||||
Notification::send([$event->user], new Messages\AdminUserRegistered($event->user));
|
||||
Notification::send([$event->user], new Messages\Broadcast\UserRegistered($event->user));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -166,16 +166,20 @@ class NotificationEventsHandler extends Listener
|
||||
public function onPirepPrefile(PirepPrefiled $event): void
|
||||
{
|
||||
Log::info('NotificationEvents::onPirepPrefile: '.$event->pirep->id.' prefiled');
|
||||
Notification::send([$event->pirep], new Messages\PirepPrefiled($event->pirep));
|
||||
|
||||
/*
|
||||
* Broadcast notifications
|
||||
*/
|
||||
Notification::send([$event->pirep], new Messages\Broadcast\PirepPrefiled($event->pirep));
|
||||
}
|
||||
|
||||
/**
|
||||
* Status Change notification
|
||||
* Status Change notification. Disabled for now, too noisy
|
||||
*/
|
||||
public function onPirepStatusChange(PirepStatusChange $event): void
|
||||
{
|
||||
Log::info('NotificationEvents::onPirepStatusChange: '.$event->pirep->id.' prefiled');
|
||||
Notification::send([$event->pirep], new Messages\PirepStatusChanged($event->pirep));
|
||||
// Log::info('NotificationEvents::onPirepStatusChange: '.$event->pirep->id.' prefiled');
|
||||
// Notification::send([$event->pirep], new Messages\Discord\PirepStatusChanged($event->pirep));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -186,8 +190,12 @@ class NotificationEventsHandler extends Listener
|
||||
public function onPirepFile(PirepFiled $event): void
|
||||
{
|
||||
Log::info('NotificationEvents::onPirepFile: '.$event->pirep->id.' filed');
|
||||
$this->notifyAdmins(new Messages\PirepSubmitted($event->pirep));
|
||||
Notification::send([$event->pirep], new Messages\PirepSubmitted($event->pirep));
|
||||
$this->notifyAdmins(new Messages\PirepFiled($event->pirep));
|
||||
|
||||
/*
|
||||
* Broadcast notifications
|
||||
*/
|
||||
Notification::send([$event->pirep], new Messages\Broadcast\PirepFiled($event->pirep));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -221,6 +229,10 @@ class NotificationEventsHandler extends Listener
|
||||
{
|
||||
Log::info('NotificationEvents::onNewsAdded');
|
||||
$this->notifyAllUsers(new Messages\NewsAdded($event->news));
|
||||
Notification::send([$event->news], new Messages\NewsAdded($event->news));
|
||||
|
||||
/*
|
||||
* Broadcast notifications
|
||||
*/
|
||||
Notification::send([$event->news], new Messages\Broadcast\NewsAdded($event->news));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,10 +2,12 @@
|
||||
|
||||
namespace App\Providers;
|
||||
|
||||
use App\Notifications\Channels\Discord\DiscordWebhook;
|
||||
use App\Services\ModuleService;
|
||||
use App\Support\ThemeViewFinder;
|
||||
use App\Support\Utils;
|
||||
use Illuminate\Pagination\Paginator;
|
||||
use Illuminate\Support\Facades\Notification;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Support\Facades\View;
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
@@ -15,8 +17,13 @@ class AppServiceProvider extends ServiceProvider
|
||||
public function boot(): void
|
||||
{
|
||||
Schema::defaultStringLength(191);
|
||||
|
||||
Paginator::useBootstrap();
|
||||
View::share('moduleSvc', app(ModuleService::class));
|
||||
|
||||
Notification::extend('discord_webhook', function ($app) {
|
||||
return app(DiscordWebhook::class);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -3,11 +3,13 @@
|
||||
namespace App\Providers;
|
||||
|
||||
use App\Events\Expenses;
|
||||
use App\Events\Fares;
|
||||
use App\Events\PirepFiled;
|
||||
use App\Events\UserStatsChanged;
|
||||
use App\Listeners\AwardHandler;
|
||||
use App\Listeners\BidEventHandler;
|
||||
use App\Listeners\ExpenseListener;
|
||||
use App\Listeners\FareListener;
|
||||
use App\Listeners\FinanceEventHandler;
|
||||
use App\Listeners\PirepEventsHandler;
|
||||
use App\Listeners\UserStateListener;
|
||||
@@ -25,6 +27,10 @@ class EventServiceProvider extends ServiceProvider
|
||||
ExpenseListener::class,
|
||||
],
|
||||
|
||||
Fares::class => [
|
||||
FareListener::class,
|
||||
],
|
||||
|
||||
PirepFiled::class => [
|
||||
UserStateListener::class,
|
||||
],
|
||||
|
||||
@@ -376,6 +376,21 @@ class RouteServiceProvider extends ServiceProvider
|
||||
], 'settings', 'SettingsController@update')
|
||||
->name('settings.update')->middleware('ability:admin,settings');
|
||||
|
||||
// Type Ratings
|
||||
Route::resource('typeratings', 'TypeRatingController')->middleware('ability:admin,typeratings');
|
||||
Route::match([
|
||||
'get',
|
||||
'post',
|
||||
'put',
|
||||
'delete',
|
||||
], 'typeratings/{id}/subfleets', 'TypeRatingController@subfleets')->middleware('ability:admin,typeratings');
|
||||
Route::match([
|
||||
'get',
|
||||
'post',
|
||||
'put',
|
||||
'delete',
|
||||
], 'typeratings/{id}/users', 'TypeRatingController@users')->middleware('ability:admin,typeratings');
|
||||
|
||||
// maintenance
|
||||
Route::match(['get'], 'maintenance', 'MaintenanceController@index')
|
||||
->name('maintenance.index')->middleware('ability:admin,maintenance');
|
||||
@@ -426,6 +441,13 @@ class RouteServiceProvider extends ServiceProvider
|
||||
'delete',
|
||||
], 'subfleets/{id}/ranks', 'SubfleetController@ranks')->middleware('ability:admin,fleet');
|
||||
|
||||
Route::match([
|
||||
'get',
|
||||
'post',
|
||||
'put',
|
||||
'delete',
|
||||
], 'subfleets/{id}/typeratings', 'SubfleetController@typeratings')->middleware('ability:admin,fleet');
|
||||
|
||||
Route::resource('subfleets', 'SubfleetController')->middleware('ability:admin,fleet');
|
||||
|
||||
/**
|
||||
@@ -439,6 +461,13 @@ class RouteServiceProvider extends ServiceProvider
|
||||
|
||||
Route::resource('users', 'UserController')->middleware('ability:admin,users');
|
||||
|
||||
Route::match([
|
||||
'get',
|
||||
'post',
|
||||
'put',
|
||||
'delete',
|
||||
], 'users/{id}/typeratings', 'UserController@typeratings')->middleware('ability:admin,users');
|
||||
|
||||
// defaults
|
||||
Route::get('', ['uses' => 'DashboardController@index'])
|
||||
->middleware('update_pending', 'ability:admin,admin-access');
|
||||
|
||||
@@ -18,8 +18,10 @@ class FlightRepository extends Repository implements CacheableInterface
|
||||
|
||||
protected $fieldSearchable = [
|
||||
'arr_airport_id',
|
||||
'callsign',
|
||||
'distance',
|
||||
'dpt_airport_id',
|
||||
'flight_time',
|
||||
'flight_type',
|
||||
'flight_number' => 'like',
|
||||
'route_code' => 'like',
|
||||
@@ -94,6 +96,10 @@ class FlightRepository extends Repository implements CacheableInterface
|
||||
$where['flight_number'] = $request->input('flight_number');
|
||||
}
|
||||
|
||||
if ($request->filled('callsign')) {
|
||||
$where['callsign'] = $request->input('callsign');
|
||||
}
|
||||
|
||||
if ($request->filled('flight_type') && $request->input('flight_type') !== '0') {
|
||||
$where['flight_type'] = $request->input('flight_type');
|
||||
}
|
||||
@@ -128,6 +134,16 @@ class FlightRepository extends Repository implements CacheableInterface
|
||||
$where[] = ['distance', '<=', $request->input('dlt')];
|
||||
}
|
||||
|
||||
// Time, greater than
|
||||
if ($request->filled('tgt')) {
|
||||
$where[] = ['flight_time', '>=', $request->input('tgt')];
|
||||
}
|
||||
|
||||
// Time, less than
|
||||
if ($request->filled('tlt')) {
|
||||
$where[] = ['flight_time', '<=', $request->input('tlt')];
|
||||
}
|
||||
|
||||
// Do a special query for finding the child subfleets
|
||||
if ($request->filled('subfleet_id')) {
|
||||
$relations['subfleets'] = [
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
namespace App\Repositories;
|
||||
|
||||
use App\Contracts\Repository;
|
||||
use App\Models\Typerating;
|
||||
use Prettus\Repository\Contracts\CacheableInterface;
|
||||
use Prettus\Repository\Traits\CacheableRepository;
|
||||
|
||||
class TypeRatingRepository extends Repository implements CacheableInterface
|
||||
{
|
||||
use CacheableRepository;
|
||||
|
||||
protected $fieldSearchable = [
|
||||
'name' => 'like',
|
||||
'type' => 'like',
|
||||
];
|
||||
|
||||
public function model()
|
||||
{
|
||||
return Typerating::class;
|
||||
}
|
||||
|
||||
public function selectBoxList($add_blank = false, $only_active = true): array
|
||||
{
|
||||
$retval = [];
|
||||
$where = [
|
||||
'active' => $only_active,
|
||||
];
|
||||
|
||||
$items = $this->findWhere($where);
|
||||
|
||||
if ($add_blank) {
|
||||
$retval[''] = '';
|
||||
}
|
||||
|
||||
foreach ($items as $i) {
|
||||
$retval[$i->id] = $i->name;
|
||||
}
|
||||
|
||||
return $retval;
|
||||
}
|
||||
}
|
||||
@@ -90,11 +90,11 @@ class UserRepository extends Repository
|
||||
}
|
||||
|
||||
if ($request->filled('name')) {
|
||||
$where['name'] = $request->name;
|
||||
$where[] = ['name', 'LIKE', '%'.$request->name.'%'];
|
||||
}
|
||||
|
||||
if ($request->filled('email')) {
|
||||
$where['email'] = $request->email;
|
||||
$where[] = ['email', 'LIKE', '%'.$request->email.'%'];
|
||||
}
|
||||
|
||||
if ($request->filled('state')) {
|
||||
|
||||
@@ -33,7 +33,7 @@ class BidService extends Service
|
||||
*
|
||||
* @return \App\Models\Bid|\Illuminate\Database\Eloquent\Model|object|null
|
||||
*/
|
||||
public function getBid(User $user, $bid_id): Bid
|
||||
public function getBid(User $user, $bid_id): ?Bid
|
||||
{
|
||||
$with = [
|
||||
'flight',
|
||||
@@ -48,7 +48,18 @@ class BidService extends Service
|
||||
'flight.subfleets.fares',
|
||||
];
|
||||
|
||||
return Bid::with($with)->where(['id' => $bid_id])->first();
|
||||
/** @var Bid $bid */
|
||||
$bid = Bid::with($with)->where(['id' => $bid_id])->first();
|
||||
if ($bid === null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
// Reconcile the aircraft for this bid
|
||||
// TODO: Only do this if there isn't a Simbrief attached?
|
||||
$bid->flight = $this->flightSvc->filterSubfleets($user, $bid->flight);
|
||||
$bid->flight = $this->fareSvc->getReconciledFaresForFlight($bid->flight);
|
||||
|
||||
return $bid;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -4,6 +4,7 @@ namespace App\Services\Finance;
|
||||
|
||||
use App\Contracts\Service;
|
||||
use App\Events\Expenses as ExpensesEvent;
|
||||
use App\Events\Fares as FaresEvent;
|
||||
use App\Models\Aircraft;
|
||||
use App\Models\Airport;
|
||||
use App\Models\Enums\ExpenseType;
|
||||
@@ -13,6 +14,7 @@ use App\Models\Enums\PirepSource;
|
||||
use App\Models\Enums\PirepState;
|
||||
use App\Models\Enums\PirepStatus;
|
||||
use App\Models\Expense;
|
||||
use App\Models\Fare;
|
||||
use App\Models\Pirep;
|
||||
use App\Models\Subfleet;
|
||||
use App\Repositories\ExpenseRepository;
|
||||
@@ -81,6 +83,7 @@ class PirepFinanceService extends Service
|
||||
// Now start and pay from scratch
|
||||
$this->payFuelCosts($pirep);
|
||||
$this->payFaresForPirep($pirep);
|
||||
$this->payFaresEventsForPirep($pirep);
|
||||
$this->payExpensesForSubfleet($pirep);
|
||||
$this->payExpensesForPirep($pirep);
|
||||
$this->payAirportExpensesForPirep($pirep);
|
||||
@@ -145,6 +148,53 @@ class PirepFinanceService extends Service
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Collect all of the fares from listeners and apply those to the journal
|
||||
*
|
||||
* @param Pirep $pirep
|
||||
*
|
||||
* @throws \UnexpectedValueException
|
||||
* @throws \InvalidArgumentException
|
||||
* @throws \Prettus\Validator\Exceptions\ValidatorException
|
||||
*/
|
||||
public function payFaresEventsForPirep(Pirep $pirep): void
|
||||
{
|
||||
// Throw an event and collect any fares returned from it
|
||||
$gathered_fares = event(new FaresEvent($pirep));
|
||||
if (!\is_array($gathered_fares)) {
|
||||
return;
|
||||
}
|
||||
|
||||
foreach ($gathered_fares as $event_fare) {
|
||||
if (!\is_array($event_fare)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
foreach ($event_fare as $fare) {
|
||||
// Make sure it's of type Fare Model
|
||||
if (!($fare instanceof Fare)) {
|
||||
Log::info('Finance: Event Fare is not an instance of Fare Model, aborting process!');
|
||||
continue;
|
||||
}
|
||||
|
||||
$credit = Money::createFromAmount($fare->price);
|
||||
$debit = Money::createFromAmount($fare->cost);
|
||||
Log::info('Finance: Income From Listener N='.$fare->name.', C='.$credit.', D='.$debit);
|
||||
|
||||
$this->journalRepo->post(
|
||||
$pirep->airline->journal,
|
||||
$credit,
|
||||
$debit,
|
||||
$pirep,
|
||||
$fare->name,
|
||||
null,
|
||||
$fare->notes,
|
||||
'additional-sales'
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Calculate the fuel used by the PIREP and add those costs in
|
||||
*
|
||||
|
||||
@@ -6,6 +6,7 @@ use App\Contracts\Service;
|
||||
use App\Models\Flight;
|
||||
use App\Models\Rank;
|
||||
use App\Models\Subfleet;
|
||||
use App\Models\Typerating;
|
||||
|
||||
class FleetService extends Service
|
||||
{
|
||||
@@ -33,7 +34,36 @@ class FleetService extends Service
|
||||
public function removeSubfleetFromRank(Subfleet $subfleet, Rank $rank)
|
||||
{
|
||||
$subfleet->ranks()->detach($rank->id);
|
||||
$subfleet->save();
|
||||
$subfleet->refresh();
|
||||
|
||||
return $subfleet;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the subfleet to a type rating
|
||||
*
|
||||
* @param Subfleet $subfleet
|
||||
* @param Typerating $typerating
|
||||
*/
|
||||
public function addSubfleetToTypeRating(Subfleet $subfleet, Typerating $typerating)
|
||||
{
|
||||
$subfleet->typeratings()->syncWithoutDetaching([$typerating->id]);
|
||||
$subfleet->save();
|
||||
$subfleet->refresh();
|
||||
|
||||
return $subfleet;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the subfleet from a type rating
|
||||
*
|
||||
* @param Subfleet $subfleet
|
||||
* @param Typerating $typerating
|
||||
*/
|
||||
public function removeSubfleetFromTypeRating(Subfleet $subfleet, Typerating $typerating)
|
||||
{
|
||||
$subfleet->typeratings()->detach($typerating->id);
|
||||
$subfleet->save();
|
||||
$subfleet->refresh();
|
||||
|
||||
|
||||
@@ -25,9 +25,12 @@ class AircraftImporter extends ImportExport
|
||||
'subfleet' => 'required',
|
||||
'iata' => 'nullable',
|
||||
'icao' => 'nullable',
|
||||
'hub_id' => 'nullable',
|
||||
'airport_id' => 'nullable',
|
||||
'name' => 'required',
|
||||
'registration' => 'required',
|
||||
'hex_code' => 'nullable',
|
||||
'mtow' => 'nullable|numeric',
|
||||
'zfw' => 'nullable|numeric',
|
||||
'status' => 'nullable',
|
||||
];
|
||||
@@ -51,7 +54,7 @@ class AircraftImporter extends ImportExport
|
||||
}
|
||||
|
||||
/**
|
||||
* Import a flight, parse out the different rows
|
||||
* Import an aircraft, parse out the different rows
|
||||
*
|
||||
* @param array $row
|
||||
* @param int $index
|
||||
|
||||
@@ -29,6 +29,7 @@ class FlightImporter extends ImportExport
|
||||
'airline' => 'required',
|
||||
'flight_number' => 'required',
|
||||
'route_code' => 'nullable',
|
||||
'callsign' => 'nullable',
|
||||
'route_leg' => 'nullable',
|
||||
'dpt_airport' => 'required',
|
||||
'arr_airport' => 'required',
|
||||
@@ -45,6 +46,8 @@ class FlightImporter extends ImportExport
|
||||
'pilot_pay' => 'nullable',
|
||||
'route' => 'nullable',
|
||||
'notes' => 'nullable',
|
||||
'start_date' => 'nullable|date',
|
||||
'end_date' => 'nullable|date',
|
||||
'active' => 'nullable|boolean',
|
||||
'subfleets' => 'nullable',
|
||||
'fares' => 'nullable',
|
||||
@@ -219,7 +222,10 @@ class FlightImporter extends ImportExport
|
||||
|
||||
$subfleet = Subfleet::firstOrCreate(
|
||||
['type' => $subfleet_type],
|
||||
['name' => $subfleet_type]
|
||||
[
|
||||
'name' => $subfleet_type,
|
||||
'airline_id' => $flight->airline_id,
|
||||
]
|
||||
);
|
||||
|
||||
$subfleet->save();
|
||||
@@ -247,8 +253,9 @@ class FlightImporter extends ImportExport
|
||||
$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);
|
||||
$fare->save();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -20,15 +20,14 @@ class SubfleetImporter extends ImportExport
|
||||
*/
|
||||
public static $columns = [
|
||||
'airline' => 'required',
|
||||
'hub_id' => 'nullable',
|
||||
'type' => 'required',
|
||||
'simbrief_type' => 'nullable',
|
||||
'name' => 'required',
|
||||
'fuel_type' => 'nullable',
|
||||
'cost_block_hour' => 'nullable',
|
||||
'cost_delay_minute' => 'nullable',
|
||||
'ground_handling_multiplier' => 'nullable',
|
||||
'cargo_capacity' => 'nullable',
|
||||
'fuel_capacity' => 'nullable',
|
||||
'gross_weight' => 'nullable',
|
||||
'fares' => 'nullable',
|
||||
];
|
||||
|
||||
@@ -85,8 +84,9 @@ class SubfleetImporter extends ImportExport
|
||||
$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);
|
||||
$fare->save();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -206,7 +206,7 @@ class PirepService extends Service
|
||||
/**
|
||||
* Create a new PIREP with some given fields
|
||||
*
|
||||
* @param Pirep $pirep
|
||||
* @param Pirep $pirep
|
||||
* @param array PirepFieldValue[] $field_values
|
||||
*
|
||||
* @return Pirep
|
||||
@@ -243,7 +243,7 @@ class PirepService extends Service
|
||||
|
||||
// Copy some fields over from Flight if we have it
|
||||
if ($pirep->flight) {
|
||||
$pirep->planned_distance = $pirep->flight->distance;
|
||||
$pirep->planned_distance = $pirep->flight->planned_distance;
|
||||
$pirep->planned_flight_time = $pirep->flight->flight_time;
|
||||
}
|
||||
|
||||
@@ -336,7 +336,7 @@ class PirepService extends Service
|
||||
|
||||
// Copy some fields over from Flight if we have it
|
||||
if ($pirep->flight) {
|
||||
$pirep->planned_distance = $pirep->flight->distance;
|
||||
$pirep->distance = $pirep->flight->distance;
|
||||
$pirep->planned_flight_time = $pirep->flight->flight_time;
|
||||
}
|
||||
|
||||
@@ -460,19 +460,6 @@ class PirepService extends Service
|
||||
*/
|
||||
public function submit(Pirep $pirep)
|
||||
{
|
||||
// Figure out what default state should be. Look at the default
|
||||
// behavior from the rank that the pilot is assigned to
|
||||
$default_state = PirepState::PENDING;
|
||||
if ($pirep->source === PirepSource::ACARS) {
|
||||
if ($pirep->user->rank->auto_approve_acars) {
|
||||
$default_state = PirepState::ACCEPTED;
|
||||
}
|
||||
} else {
|
||||
if ($pirep->user->rank->auto_approve_manual) {
|
||||
$default_state = PirepState::ACCEPTED;
|
||||
}
|
||||
}
|
||||
|
||||
// Check if there is a simbrief_id, change it to be set to the PIREP
|
||||
// at the end of the flight when it's been submitted finally.
|
||||
// Prefile, Save (as draft) and File already have this but the Submit button
|
||||
@@ -489,6 +476,24 @@ class PirepService extends Service
|
||||
Log::info('New PIREP filed', [$pirep]);
|
||||
event(new PirepFiled($pirep));
|
||||
|
||||
$pirep->refresh();
|
||||
|
||||
// Figure out what pirep state should be, if nothing provided yet.
|
||||
if ($pirep->state != PirepState::ACCEPTED && $pirep->state != PirepState::REJECTED) {
|
||||
$default_state = PirepState::PENDING;
|
||||
} else {
|
||||
$default_state = $pirep->state;
|
||||
}
|
||||
|
||||
// If pirep is still at PENDING state decide the default behavior by looking at rank settings
|
||||
if ($pirep->state === PirepState::PENDING) {
|
||||
if ($pirep->source === PirepSource::ACARS && $pirep->user->rank->auto_approve_acars) {
|
||||
$default_state = PirepState::ACCEPTED;
|
||||
} elseif ($pirep->source === PirepSource::MANUAL && $pirep->user->rank->auto_approve_manual) {
|
||||
$default_state = PirepState::ACCEPTED;
|
||||
}
|
||||
}
|
||||
|
||||
// only update the pilot last state if they are accepted
|
||||
if ($default_state === PirepState::ACCEPTED) {
|
||||
$pirep = $this->accept($pirep);
|
||||
|
||||
@@ -15,6 +15,7 @@ use App\Models\Enums\UserState;
|
||||
use App\Models\Pirep;
|
||||
use App\Models\Rank;
|
||||
use App\Models\Role;
|
||||
use App\Models\Typerating;
|
||||
use App\Models\User;
|
||||
use App\Models\UserFieldValue;
|
||||
use App\Repositories\AircraftRepository;
|
||||
@@ -343,7 +344,7 @@ class UserService extends Service
|
||||
|
||||
/**
|
||||
* Return the subfleets this user is allowed access to,
|
||||
* based on their current rank
|
||||
* based on their current Rank and/or by Type Rating
|
||||
*
|
||||
* @param $user
|
||||
*
|
||||
@@ -351,14 +352,31 @@ class UserService extends Service
|
||||
*/
|
||||
public function getAllowableSubfleets($user)
|
||||
{
|
||||
if ($user === null || setting('pireps.restrict_aircraft_to_rank') === false) {
|
||||
/** @var Collection $subfleets */
|
||||
$subfleets = $this->subfleetRepo->with('aircraft')->all();
|
||||
$restrict_rank = setting('pireps.restrict_aircraft_to_rank', true);
|
||||
$restrict_type = setting('pireps.restrict_aircraft_to_typerating', false);
|
||||
$restricted_to = [];
|
||||
|
||||
if ($user) {
|
||||
$rank_sf_array = $restrict_rank ? $user->rank->subfleets()->pluck('id')->toArray() : [];
|
||||
$type_sf_array = $restrict_type ? $user->rated_subfleets->pluck('id')->toArray() : [];
|
||||
|
||||
if ($restrict_rank && !$restrict_type) {
|
||||
$restricted_to = $rank_sf_array;
|
||||
} elseif (!$restrict_rank && $restrict_type) {
|
||||
$restricted_to = $type_sf_array;
|
||||
} elseif ($restrict_rank && $restrict_type) {
|
||||
$restricted_to = array_intersect($rank_sf_array, $type_sf_array);
|
||||
}
|
||||
} else {
|
||||
/** @var Collection $subfleets */
|
||||
$subfleets = $user->rank->subfleets()->with('aircraft')->get();
|
||||
$restrict_rank = false;
|
||||
$restrict_type = false;
|
||||
}
|
||||
|
||||
// @var Collection $subfleets
|
||||
$subfleets = $this->subfleetRepo->when(($restrict_rank || $restrict_type), function ($query) use ($restricted_to) {
|
||||
return $query->whereIn('id', $restricted_to);
|
||||
})->with('aircraft')->get();
|
||||
|
||||
// Map the subfleets with the proper fare information
|
||||
return $subfleets->transform(function ($sf, $key) {
|
||||
$sf->fares = $this->fareSvc->getForSubfleet($sf);
|
||||
@@ -398,9 +416,7 @@ class UserService extends Service
|
||||
return $user;
|
||||
}
|
||||
|
||||
Log::info('User '.$user->ident.' state changing from '
|
||||
.UserState::label($old_state).' to '
|
||||
.UserState::label($user->state));
|
||||
Log::info('User '.$user->ident.' state changing from '.UserState::label($old_state).' to '.UserState::label($user->state));
|
||||
|
||||
event(new UserStateChanged($user, $old_state));
|
||||
|
||||
@@ -561,11 +577,39 @@ class UserService extends Service
|
||||
// Recalc the rank
|
||||
$this->calculatePilotRank($user);
|
||||
|
||||
Log::info('User '.$user->ident.' updated; pirep count='.$pirep_count
|
||||
.', rank='.$user->rank->name
|
||||
.', flight_time='.$user->flight_time.' minutes');
|
||||
Log::info('User '.$user->ident.' updated; pirep count='.$pirep_count.', rank='.$user->rank->name.', flight_time='.$user->flight_time.' minutes');
|
||||
|
||||
$user->save();
|
||||
return $user;
|
||||
}
|
||||
|
||||
/**
|
||||
* Attach a type rating to the user
|
||||
*
|
||||
* @param User $user
|
||||
* @param Typerating $typerating
|
||||
*/
|
||||
public function addUserToTypeRating(User $user, Typerating $typerating)
|
||||
{
|
||||
$user->typeratings()->syncWithoutDetaching([$typerating->id]);
|
||||
$user->save();
|
||||
$user->refresh();
|
||||
|
||||
return $user;
|
||||
}
|
||||
|
||||
/**
|
||||
* Detach a type rating from the user
|
||||
*
|
||||
* @param User $user
|
||||
* @param Typerating $typerating
|
||||
*/
|
||||
public function removeUserFromTypeRating(User $user, Typerating $typerating)
|
||||
{
|
||||
$user->typeratings()->detach($typerating->id);
|
||||
$user->save();
|
||||
$user->refresh();
|
||||
|
||||
return $user;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -134,6 +134,11 @@ class Database
|
||||
->where($id_col, $row[$id_col])
|
||||
->update($row);
|
||||
} 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);
|
||||
}
|
||||
} catch (QueryException $e) {
|
||||
|
||||
@@ -23,7 +23,7 @@ class LatestNews extends Widget
|
||||
|
||||
return view('widgets.latest_news', [
|
||||
'config' => $this->config,
|
||||
'news' => $newsRepo->recent($this->config['count']),
|
||||
'news' => $newsRepo->with('user')->recent($this->config['count']),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ class LatestPilots extends Widget
|
||||
public function run()
|
||||
{
|
||||
$userRepo = app(UserRepository::class);
|
||||
$userRepo = $userRepo->where('state', '!=', UserState::DELETED)->orderby('created_at', 'desc')->take($this->config['count'])->get();
|
||||
$userRepo = $userRepo->with('home_airport')->where('state', '!=', UserState::DELETED)->orderby('created_at', 'desc')->take($this->config['count'])->get();
|
||||
|
||||
return view('widgets.latest_pilots', [
|
||||
'config' => $this->config,
|
||||
|
||||
@@ -39,7 +39,7 @@ class application extends Illuminate\Foundation\Application
|
||||
$bootstrappers = array_replace(
|
||||
$bootstrappers,
|
||||
array_fill_keys(
|
||||
array_keys($bootstrappers, $find),
|
||||
array_keys($bootstrappers, $find, true),
|
||||
$replace
|
||||
)
|
||||
);
|
||||
|
||||
+27
-11
@@ -15,12 +15,23 @@
|
||||
"ext-bcmath": "*",
|
||||
"ext-pdo": "*",
|
||||
"ext-intl": "*",
|
||||
"cache/adapter-common": "1.2.0",
|
||||
"cache/array-adapter": "1.1.0",
|
||||
"cache/hierarchical-cache": "1.1.0",
|
||||
"symfony/flex": "^1.0",
|
||||
"symfony/polyfill-intl-icu": "*",
|
||||
"symfony/polyfill-intl-idn": "*",
|
||||
"symfony/polyfill-mbstring": "*",
|
||||
"symfony/polyfill-php74": "*",
|
||||
"symfony/polyfill-php80": "*",
|
||||
"composer/composer": "~1.0",
|
||||
"symfony/polyfill-php81": "*",
|
||||
"symfony/deprecation-contracts": "^v2.5.0",
|
||||
"symfony/event-dispatcher-contracts": "^2",
|
||||
"symfony/property-info": "^5.4",
|
||||
"symfony/string": "^5.4",
|
||||
"symfony/translation": "^5.4",
|
||||
"psr/container": "1.1.1",
|
||||
"composer/composer": "~2.0",
|
||||
"composer/installers": "~1.0",
|
||||
"laravel/framework": "~8.0",
|
||||
"anhskohbo/no-captcha": "^3.0",
|
||||
@@ -41,21 +52,21 @@
|
||||
"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/commonmark": "~1.6.0",
|
||||
"league/csv": "9.7.*",
|
||||
"league/geotools": "0.8.*",
|
||||
"league/iso3166": "^3.0.0",
|
||||
"markrogoyski/math-php": "^1.10",
|
||||
"markrogoyski/math-php": "^1.11.0",
|
||||
"myclabs/deep-copy": "~1.10.0",
|
||||
"nabeel/vacentral": "~2.0",
|
||||
"nwidart/laravel-modules": "^8.2",
|
||||
"nwidart/laravel-modules": "^8.2.0",
|
||||
"php-units-of-measure/php-units-of-measure": "~2.1.0",
|
||||
"phpvms/sample-module": "^1.0",
|
||||
"pragmarx/version": ">=v1.2.3",
|
||||
"prettus/l5-repository": "~2.7.0",
|
||||
"santigarcor/laratrust": "~6.3",
|
||||
"santigarcor/laratrust": "~6.3.0",
|
||||
"semver/semver": "~1.1.0",
|
||||
"spatie/valuestore": "~1.2",
|
||||
"spatie/valuestore": "~1.2.0",
|
||||
"symfony/polyfill-iconv": "~1.22.0",
|
||||
"tivie/php-os-detector": "~1.1.0",
|
||||
"vlucas/phpdotenv": "^5.3.0",
|
||||
@@ -69,14 +80,16 @@
|
||||
"wildbit/swiftmailer-postmark": "^3.3",
|
||||
"queueworker/sansdaemon": "^1.2",
|
||||
"jpkleemans/attribute-events": "^1.1",
|
||||
"akaunting/laravel-money": "^1.2"
|
||||
"akaunting/laravel-money": "^1.2",
|
||||
"staudenmeir/belongs-to-through": "^2.5",
|
||||
"staudenmeir/eloquent-has-many-deep": "1.14.3"
|
||||
},
|
||||
"require-dev": {
|
||||
"barryvdh/laravel-debugbar": "^3.5",
|
||||
"barryvdh/laravel-ide-helper": "^2.9",
|
||||
"barryvdh/laravel-ide-helper": "^2.10",
|
||||
"bpocallaghan/generators": "~7.0",
|
||||
"filp/whoops": "~2.0",
|
||||
"friendsofphp/php-cs-fixer": "^2.16",
|
||||
"friendsofphp/php-cs-fixer": "^3.3",
|
||||
"mockery/mockery": "^1.4.0",
|
||||
"nunomaduro/collision": "^5.3.0",
|
||||
"phpunit/phpunit": "~9.0",
|
||||
@@ -104,7 +117,10 @@
|
||||
"installer-paths": {
|
||||
"modules/{$name}/": ["type:phpvms-module"]
|
||||
},
|
||||
"module-dir": "modules"
|
||||
"module-dir": "modules",
|
||||
"symfony": {
|
||||
"require": "^5.4"
|
||||
}
|
||||
},
|
||||
"scripts": {
|
||||
"pre-package-uninstall": [
|
||||
|
||||
Generated
+1375
-1129
File diff suppressed because it is too large
Load Diff
@@ -3,8 +3,8 @@
|
||||
use App\Notifications\Messages\AdminUserRegistered;
|
||||
use App\Notifications\Messages\NewsAdded;
|
||||
use App\Notifications\Messages\PirepAccepted;
|
||||
use App\Notifications\Messages\PirepFiled;
|
||||
use App\Notifications\Messages\PirepRejected;
|
||||
use App\Notifications\Messages\PirepSubmitted;
|
||||
use App\Notifications\Messages\UserPending;
|
||||
use App\Notifications\Messages\UserRegistered;
|
||||
use App\Notifications\Messages\UserRejected;
|
||||
@@ -18,7 +18,7 @@ return [
|
||||
NewsAdded::class => ['mail'],
|
||||
PirepAccepted::class => ['mail'],
|
||||
PirepRejected::class => ['mail'],
|
||||
PirepSubmitted::class => ['mail'],
|
||||
PirepFiled::class => ['mail'],
|
||||
UserPending::class => ['mail'],
|
||||
UserRegistered::class => ['mail'],
|
||||
UserRejected::class => ['mail'],
|
||||
|
||||
@@ -24,9 +24,8 @@ services:
|
||||
- ./tests:/var/www/tests
|
||||
- ./composer.json:/var/www/composer.json
|
||||
- ./composer-lock.json:/var/www/composer-lock.json
|
||||
- ./env.php:/var/www/env.php
|
||||
#- ./env.php:/var/www/env.php
|
||||
- ./resources/docker/php/www.conf:/usr/local/etc/php-fpm.d/www.conf
|
||||
- ./vendor:/var/www/vendor
|
||||
depends_on:
|
||||
- mysql
|
||||
- redis
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
version: '3'
|
||||
services:
|
||||
app:
|
||||
image: phpvms:latest
|
||||
image: nabeelio/phpvms
|
||||
environment:
|
||||
DB_HOST: mysql
|
||||
REDIS_HOST: redis
|
||||
|
||||
Generated
+376
-234
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "phpvms",
|
||||
"name": "npm-proj-1644437580670-0.60402830570294548RynpF",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
@@ -22,7 +22,7 @@
|
||||
"jquery": "^3.5.1",
|
||||
"jquery-pjax": "~2.0",
|
||||
"js-yaml": "^3.14.0",
|
||||
"laravel-mix": "^6.0.25",
|
||||
"laravel-mix": "^6.0.30",
|
||||
"leaflet": "^1.3.4",
|
||||
"leaflet-ajax": "2.1.0",
|
||||
"leaflet-providers": "1.0.*",
|
||||
@@ -1752,9 +1752,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@types/http-proxy": {
|
||||
"version": "1.17.7",
|
||||
"resolved": "https://registry.npmjs.org/@types/http-proxy/-/http-proxy-1.17.7.tgz",
|
||||
"integrity": "sha512-9hdj6iXH64tHSLTY+Vt2eYOGzSogC+JQ2H7bdPWkuh7KXP5qLllWx++t+K9Wk556c3dkDdPws/SpMRi0sdCT1w==",
|
||||
"version": "1.17.8",
|
||||
"resolved": "https://registry.npmjs.org/@types/http-proxy/-/http-proxy-1.17.8.tgz",
|
||||
"integrity": "sha512-5kPLG5BKpWYkw/LVOGWpiq3nEVqxiN32rTgI53Sk12/xHFQ2rG3ehI9IO+O3W2QoKeyB92dJkoka8SUm6BX1pA==",
|
||||
"dependencies": {
|
||||
"@types/node": "*"
|
||||
}
|
||||
@@ -1801,9 +1801,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@types/json-schema": {
|
||||
"version": "7.0.8",
|
||||
"resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.8.tgz",
|
||||
"integrity": "sha512-YSBPTLTVm2e2OoQIDYx8HaeWJ5tTToLH67kXR7zYNGupXMEHa2++G8k+DczX2cFVgalypqtyZIcU19AFcmOpmg=="
|
||||
"version": "7.0.9",
|
||||
"resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.9.tgz",
|
||||
"integrity": "sha512-qcUXuemtEu+E5wZSJHNxUXeCZhAfXKQ41D+duX+VYPde7xyEVZci+/oXKJL13tnRs9lR2pr4fod59GT6/X1/yQ=="
|
||||
},
|
||||
"node_modules/@types/minimatch": {
|
||||
"version": "3.0.5",
|
||||
@@ -2039,6 +2039,42 @@
|
||||
"url": "https://github.com/sponsors/epoberezkin"
|
||||
}
|
||||
},
|
||||
"node_modules/ajv-formats": {
|
||||
"version": "2.1.1",
|
||||
"resolved": "https://registry.npmjs.org/ajv-formats/-/ajv-formats-2.1.1.tgz",
|
||||
"integrity": "sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA==",
|
||||
"dependencies": {
|
||||
"ajv": "^8.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"ajv": "^8.0.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"ajv": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/ajv-formats/node_modules/ajv": {
|
||||
"version": "8.10.0",
|
||||
"resolved": "https://registry.npmjs.org/ajv/-/ajv-8.10.0.tgz",
|
||||
"integrity": "sha512-bzqAEZOjkrUMl2afH8dknrq5KEk2SrwdBROR+vH1EKVQTqaUbJVPdc/gEdggTMM0Se+s+Ja4ju4TlNcStKl2Hw==",
|
||||
"dependencies": {
|
||||
"fast-deep-equal": "^3.1.1",
|
||||
"json-schema-traverse": "^1.0.0",
|
||||
"require-from-string": "^2.0.2",
|
||||
"uri-js": "^4.2.2"
|
||||
},
|
||||
"funding": {
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/epoberezkin"
|
||||
}
|
||||
},
|
||||
"node_modules/ajv-formats/node_modules/json-schema-traverse": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz",
|
||||
"integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug=="
|
||||
},
|
||||
"node_modules/ajv-keywords": {
|
||||
"version": "3.5.2",
|
||||
"resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz",
|
||||
@@ -2082,10 +2118,10 @@
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/ansi-html": {
|
||||
"version": "0.0.7",
|
||||
"resolved": "https://registry.npmjs.org/ansi-html/-/ansi-html-0.0.7.tgz",
|
||||
"integrity": "sha1-gTWEAhliqenm/QOflA0S9WynhZ4=",
|
||||
"node_modules/ansi-html-community": {
|
||||
"version": "0.0.8",
|
||||
"resolved": "https://registry.npmjs.org/ansi-html-community/-/ansi-html-community-0.0.8.tgz",
|
||||
"integrity": "sha512-1APHAyr3+PCamwNw3bXCPp4HFLONZt/yIH0sZp0/469KWNTEy+qN5jQ3GVX6DMZ1UXAi34yVwtTeaG/HpBuuzw==",
|
||||
"engines": [
|
||||
"node >= 0.8.0"
|
||||
],
|
||||
@@ -4009,6 +4045,14 @@
|
||||
"node": ">= 10"
|
||||
}
|
||||
},
|
||||
"node_modules/define-lazy-prop": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz",
|
||||
"integrity": "sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og==",
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/define-properties": {
|
||||
"version": "1.1.3",
|
||||
"resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz",
|
||||
@@ -6168,6 +6212,20 @@
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/has-tostringtag": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz",
|
||||
"integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==",
|
||||
"dependencies": {
|
||||
"has-symbols": "^1.0.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/has-value": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz",
|
||||
@@ -7162,11 +7220,12 @@
|
||||
}
|
||||
},
|
||||
"node_modules/is-arguments": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.0.tgz",
|
||||
"integrity": "sha512-1Ij4lOMPl/xB5kBDn7I+b2ttPMKa8szhEIrXDuXQD/oe3HJLTLhqhgGspwgyGd6MOywBUqVvYicF72lkgDnIHg==",
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.1.tgz",
|
||||
"integrity": "sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==",
|
||||
"dependencies": {
|
||||
"call-bind": "^1.0.0"
|
||||
"call-bind": "^1.0.2",
|
||||
"has-tostringtag": "^1.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
@@ -7738,11 +7797,6 @@
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/killable": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/killable/-/killable-1.0.1.tgz",
|
||||
"integrity": "sha512-LzqtLKlUwirEUyl/nicirVmNiPvYs7l5n8wOPP7fyJVpUPkvCnW/vuiXGpylGUlnPDnB7311rARzAt3Mhswpjg=="
|
||||
},
|
||||
"node_modules/kind-of": {
|
||||
"version": "3.2.2",
|
||||
"resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
|
||||
@@ -7778,9 +7832,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/laravel-mix": {
|
||||
"version": "6.0.25",
|
||||
"resolved": "https://registry.npmjs.org/laravel-mix/-/laravel-mix-6.0.25.tgz",
|
||||
"integrity": "sha512-SDpLGUnXJ8g0rvtiLljSTJSR6awj86M2Jd3MhbtT32TCgwXdtajVLF7Mv2blsPLixGHtynwZgi+UFlYQbquPLg==",
|
||||
"version": "6.0.30",
|
||||
"resolved": "https://registry.npmjs.org/laravel-mix/-/laravel-mix-6.0.30.tgz",
|
||||
"integrity": "sha512-Y5EjdPVEqVMgnglzJvDuDEpUa2EouutS4ySrukZkBWh2EPPYM1iszu8TItvQ2J08N5BPIrYWh8McUbTwq6tcrQ==",
|
||||
"dependencies": {
|
||||
"@babel/core": "^7.14.5",
|
||||
"@babel/plugin-proposal-object-rest-spread": "^7.14.5",
|
||||
@@ -7827,7 +7881,7 @@
|
||||
"vue-style-loader": "^4.1.3",
|
||||
"webpack": "^5.38.1",
|
||||
"webpack-cli": "^4.7.2",
|
||||
"webpack-dev-server": "4.0.0-beta.3",
|
||||
"webpack-dev-server": "4.1.1",
|
||||
"webpack-merge": "^5.8.0",
|
||||
"webpack-notifier": "^1.13.0",
|
||||
"webpackbar": "^5.0.0-3",
|
||||
@@ -7878,9 +7932,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/laravel-mix/node_modules/ansi-regex": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz",
|
||||
"integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==",
|
||||
"version": "5.0.1",
|
||||
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
|
||||
"integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
}
|
||||
@@ -7981,18 +8035,26 @@
|
||||
}
|
||||
},
|
||||
"node_modules/laravel-mix/node_modules/http-proxy-middleware": {
|
||||
"version": "1.3.1",
|
||||
"resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-1.3.1.tgz",
|
||||
"integrity": "sha512-13eVVDYS4z79w7f1+NPllJtOQFx/FdUW4btIvVRMaRlUY9VGstAbo5MOhLEuUgZFRHn3x50ufn25zkj/boZnEg==",
|
||||
"version": "2.0.3",
|
||||
"resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-2.0.3.tgz",
|
||||
"integrity": "sha512-1bloEwnrHMnCoO/Gcwbz7eSVvW50KPES01PecpagI+YLNLci4AcuKJrujW4Mc3sBLpFxMSlsLNHS5Nl/lvrTPA==",
|
||||
"dependencies": {
|
||||
"@types/http-proxy": "^1.17.5",
|
||||
"@types/http-proxy": "^1.17.8",
|
||||
"http-proxy": "^1.18.1",
|
||||
"is-glob": "^4.0.1",
|
||||
"is-plain-obj": "^3.0.0",
|
||||
"micromatch": "^4.0.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8.0.0"
|
||||
"node": ">=12.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@types/express": "^4.17.13"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"@types/express": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/laravel-mix/node_modules/import-local": {
|
||||
@@ -8058,15 +8120,16 @@
|
||||
}
|
||||
},
|
||||
"node_modules/laravel-mix/node_modules/open": {
|
||||
"version": "7.4.2",
|
||||
"resolved": "https://registry.npmjs.org/open/-/open-7.4.2.tgz",
|
||||
"integrity": "sha512-MVHddDVweXZF3awtlAS+6pgKLlm/JgxZ90+/NBurBoQctVOOB/zDdVjcyPzQ+0laDGbsWgrRkflI65sQeOgT9Q==",
|
||||
"version": "8.4.0",
|
||||
"resolved": "https://registry.npmjs.org/open/-/open-8.4.0.tgz",
|
||||
"integrity": "sha512-XgFPPM+B28FtCCgSb9I+s9szOC1vZRSwgWsRUA5ylIxRTgKozqjOCrVOqGsYABPYK5qnfqClxZTFBa8PKt2v6Q==",
|
||||
"dependencies": {
|
||||
"is-docker": "^2.0.0",
|
||||
"is-wsl": "^2.1.1"
|
||||
"define-lazy-prop": "^2.0.0",
|
||||
"is-docker": "^2.1.1",
|
||||
"is-wsl": "^2.2.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
"node": ">=12"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
@@ -8175,11 +8238,11 @@
|
||||
}
|
||||
},
|
||||
"node_modules/laravel-mix/node_modules/strip-ansi": {
|
||||
"version": "6.0.0",
|
||||
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz",
|
||||
"integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==",
|
||||
"version": "6.0.1",
|
||||
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
|
||||
"integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
|
||||
"dependencies": {
|
||||
"ansi-regex": "^5.0.0"
|
||||
"ansi-regex": "^5.0.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
@@ -8251,37 +8314,35 @@
|
||||
}
|
||||
},
|
||||
"node_modules/laravel-mix/node_modules/webpack-dev-server": {
|
||||
"version": "4.0.0-beta.3",
|
||||
"resolved": "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-4.0.0-beta.3.tgz",
|
||||
"integrity": "sha512-Ud7ieH15No/KiSdRuzk+2k+S4gSCR/N7m4hJhesDbKQEZy3P+NPXTXfsimNOZvbVX2TRuIEFB+VdLZFn8DwGwg==",
|
||||
"version": "4.1.1",
|
||||
"resolved": "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-4.1.1.tgz",
|
||||
"integrity": "sha512-Kl1mnCEw8Cy1Kw173gCxLIB242LfPKEOj9WoKhKz/MbryZTNrILzOJTk8kiczw/YUEPzn3gcltCQv6hDsLudRg==",
|
||||
"dependencies": {
|
||||
"ansi-html": "^0.0.7",
|
||||
"ansi-html-community": "^0.0.8",
|
||||
"bonjour": "^3.5.0",
|
||||
"chokidar": "^3.5.1",
|
||||
"colorette": "^1.2.2",
|
||||
"compression": "^1.7.4",
|
||||
"connect-history-api-fallback": "^1.6.0",
|
||||
"del": "^6.0.0",
|
||||
"express": "^4.17.1",
|
||||
"find-cache-dir": "^3.3.1",
|
||||
"graceful-fs": "^4.2.6",
|
||||
"html-entities": "^2.3.2",
|
||||
"http-proxy-middleware": "^1.3.1",
|
||||
"http-proxy-middleware": "^2.0.0",
|
||||
"internal-ip": "^6.2.0",
|
||||
"ipaddr.js": "^2.0.0",
|
||||
"is-absolute-url": "^3.0.3",
|
||||
"killable": "^1.0.1",
|
||||
"open": "^7.4.2",
|
||||
"ipaddr.js": "^2.0.1",
|
||||
"open": "^8.0.9",
|
||||
"p-retry": "^4.5.0",
|
||||
"portfinder": "^1.0.28",
|
||||
"schema-utils": "^3.0.0",
|
||||
"schema-utils": "^3.1.0",
|
||||
"selfsigned": "^1.10.11",
|
||||
"serve-index": "^1.9.1",
|
||||
"sockjs": "^0.3.21",
|
||||
"spdy": "^4.0.2",
|
||||
"strip-ansi": "^6.0.0",
|
||||
"strip-ansi": "^7.0.0",
|
||||
"url": "^0.11.0",
|
||||
"webpack-dev-middleware": "^4.1.0",
|
||||
"ws": "^7.4.5"
|
||||
"webpack-dev-middleware": "^5.0.0",
|
||||
"ws": "^8.1.0"
|
||||
},
|
||||
"bin": {
|
||||
"webpack-dev-server": "bin/webpack-dev-server.js"
|
||||
@@ -8290,7 +8351,7 @@
|
||||
"node": ">= 12.13.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"webpack": "^4.0.0 || ^5.0.0"
|
||||
"webpack": "^4.37.0 || ^5.0.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"webpack-cli": {
|
||||
@@ -8298,12 +8359,37 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/laravel-mix/node_modules/ws": {
|
||||
"version": "7.5.3",
|
||||
"resolved": "https://registry.npmjs.org/ws/-/ws-7.5.3.tgz",
|
||||
"integrity": "sha512-kQ/dHIzuLrS6Je9+uv81ueZomEwH0qVYstcAQ4/Z93K8zeko9gtAbttJWzoC5ukqXY1PpoouV3+VSOqEAFt5wg==",
|
||||
"node_modules/laravel-mix/node_modules/webpack-dev-server/node_modules/ansi-regex": {
|
||||
"version": "6.0.1",
|
||||
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz",
|
||||
"integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==",
|
||||
"engines": {
|
||||
"node": ">=8.3.0"
|
||||
"node": ">=12"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/chalk/ansi-regex?sponsor=1"
|
||||
}
|
||||
},
|
||||
"node_modules/laravel-mix/node_modules/webpack-dev-server/node_modules/strip-ansi": {
|
||||
"version": "7.0.1",
|
||||
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.0.1.tgz",
|
||||
"integrity": "sha512-cXNxvT8dFNRVfhVME3JAe98mkXDYN2O1l7jmcwMnOslDeESg1rF/OZMtK0nRAhiari1unG5cD4jG3rapUAkLbw==",
|
||||
"dependencies": {
|
||||
"ansi-regex": "^6.0.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/chalk/strip-ansi?sponsor=1"
|
||||
}
|
||||
},
|
||||
"node_modules/laravel-mix/node_modules/ws": {
|
||||
"version": "8.5.0",
|
||||
"resolved": "https://registry.npmjs.org/ws/-/ws-8.5.0.tgz",
|
||||
"integrity": "sha512-BWX0SWVgLPzYwF8lTzEy1egjhS4S4OEAHfsO8o65WOVsrnSRGaSiUaa9e0ggGlkMTtBlmOpEXiie9RUcBO86qg==",
|
||||
"engines": {
|
||||
"node": ">=10.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"bufferutil": "^4.0.1",
|
||||
@@ -8521,17 +8607,6 @@
|
||||
"semver": "bin/semver.js"
|
||||
}
|
||||
},
|
||||
"node_modules/map-age-cleaner": {
|
||||
"version": "0.1.3",
|
||||
"resolved": "https://registry.npmjs.org/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz",
|
||||
"integrity": "sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w==",
|
||||
"dependencies": {
|
||||
"p-defer": "^1.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6"
|
||||
}
|
||||
},
|
||||
"node_modules/map-cache": {
|
||||
"version": "0.2.2",
|
||||
"resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz",
|
||||
@@ -8601,33 +8676,10 @@
|
||||
"node": ">= 0.6"
|
||||
}
|
||||
},
|
||||
"node_modules/mem": {
|
||||
"version": "8.1.1",
|
||||
"resolved": "https://registry.npmjs.org/mem/-/mem-8.1.1.tgz",
|
||||
"integrity": "sha512-qFCFUDs7U3b8mBDPyz5EToEKoAkgCzqquIgi9nkkR9bixxOVOre+09lbuH7+9Kn2NFpm56M3GUWVbU2hQgdACA==",
|
||||
"dependencies": {
|
||||
"map-age-cleaner": "^0.1.3",
|
||||
"mimic-fn": "^3.1.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sindresorhus/mem?sponsor=1"
|
||||
}
|
||||
},
|
||||
"node_modules/mem/node_modules/mimic-fn": {
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-3.1.0.tgz",
|
||||
"integrity": "sha512-Ysbi9uYW9hFyfrThdDEQuykN4Ey6BuwPD2kpI5ES/nFTDn/98yxYNLZJcgUAKPT/mcrLLKaGzJR9YVxJrIdASQ==",
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/memfs": {
|
||||
"version": "3.2.2",
|
||||
"resolved": "https://registry.npmjs.org/memfs/-/memfs-3.2.2.tgz",
|
||||
"integrity": "sha512-RE0CwmIM3CEvpcdK3rZ19BC4E6hv9kADkMN5rPduRak58cNArWLi/9jFLsa4rhsjfVxMP3v0jO7FHXq7SvFY5Q==",
|
||||
"version": "3.4.1",
|
||||
"resolved": "https://registry.npmjs.org/memfs/-/memfs-3.4.1.tgz",
|
||||
"integrity": "sha512-1c9VPVvW5P7I85c35zAdEr1TD5+F11IToIHIlrVIcflfnzPkJa0ZoYEoEdYDP8KgPFoSZ/opDrUsAoZWym3mtw==",
|
||||
"dependencies": {
|
||||
"fs-monkey": "1.0.3"
|
||||
},
|
||||
@@ -9555,14 +9607,6 @@
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/p-defer": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/p-defer/-/p-defer-1.0.0.tgz",
|
||||
"integrity": "sha1-n26xgvbJqozXQwBKfU+WsZaw+ww=",
|
||||
"engines": {
|
||||
"node": ">=4"
|
||||
}
|
||||
},
|
||||
"node_modules/p-event": {
|
||||
"version": "4.2.0",
|
||||
"resolved": "https://registry.npmjs.org/p-event/-/p-event-4.2.0.tgz",
|
||||
@@ -11332,6 +11376,14 @@
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/require-from-string": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz",
|
||||
"integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==",
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/require-main-filename": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz",
|
||||
@@ -11656,9 +11708,9 @@
|
||||
"integrity": "sha512-1JeB87s6oN/TDxQQYCvS5EFoQyvV6eYMZZ0AeA4tdFDYWN3BAGZ8npr17UBFddU0lgAt3H0yjX3X6/ekOj1yjw=="
|
||||
},
|
||||
"node_modules/selfsigned": {
|
||||
"version": "1.10.11",
|
||||
"resolved": "https://registry.npmjs.org/selfsigned/-/selfsigned-1.10.11.tgz",
|
||||
"integrity": "sha512-aVmbPOfViZqOZPgRBT0+3u4yZFHpmnIghLMlAcb5/xhp5ZtB/RVnKhz5vl2M32CLXAqR4kha9zfhNg0Lf/sxKA==",
|
||||
"version": "1.10.14",
|
||||
"resolved": "https://registry.npmjs.org/selfsigned/-/selfsigned-1.10.14.tgz",
|
||||
"integrity": "sha512-lkjaiAye+wBZDCBsu5BGi0XiLRxeUlsGod5ZP924CRSEoGuZAw/f7y9RKu28rwTfiHVhdavhB0qH0INV6P1lEA==",
|
||||
"dependencies": {
|
||||
"node-forge": "^0.10.0"
|
||||
}
|
||||
@@ -13653,19 +13705,18 @@
|
||||
}
|
||||
},
|
||||
"node_modules/webpack-dev-middleware": {
|
||||
"version": "4.3.0",
|
||||
"resolved": "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-4.3.0.tgz",
|
||||
"integrity": "sha512-PjwyVY95/bhBh6VUqt6z4THplYcsvQ8YNNBTBM873xLVmw8FLeALn0qurHbs9EmcfhzQis/eoqypSnZeuUz26w==",
|
||||
"version": "5.3.1",
|
||||
"resolved": "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-5.3.1.tgz",
|
||||
"integrity": "sha512-81EujCKkyles2wphtdrnPg/QqegC/AtqNH//mQkBYSMqwFVCQrxM6ktB2O/SPlZy7LqeEfTbV3cZARGQz6umhg==",
|
||||
"dependencies": {
|
||||
"colorette": "^1.2.2",
|
||||
"mem": "^8.1.1",
|
||||
"memfs": "^3.2.2",
|
||||
"mime-types": "^2.1.30",
|
||||
"colorette": "^2.0.10",
|
||||
"memfs": "^3.4.1",
|
||||
"mime-types": "^2.1.31",
|
||||
"range-parser": "^1.2.1",
|
||||
"schema-utils": "^3.0.0"
|
||||
"schema-utils": "^4.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= v10.23.3"
|
||||
"node": ">= 12.13.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
@@ -13675,17 +13726,54 @@
|
||||
"webpack": "^4.0.0 || ^5.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/webpack-dev-middleware/node_modules/schema-utils": {
|
||||
"version": "3.1.1",
|
||||
"resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.1.tgz",
|
||||
"integrity": "sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw==",
|
||||
"node_modules/webpack-dev-middleware/node_modules/ajv": {
|
||||
"version": "8.10.0",
|
||||
"resolved": "https://registry.npmjs.org/ajv/-/ajv-8.10.0.tgz",
|
||||
"integrity": "sha512-bzqAEZOjkrUMl2afH8dknrq5KEk2SrwdBROR+vH1EKVQTqaUbJVPdc/gEdggTMM0Se+s+Ja4ju4TlNcStKl2Hw==",
|
||||
"dependencies": {
|
||||
"@types/json-schema": "^7.0.8",
|
||||
"ajv": "^6.12.5",
|
||||
"ajv-keywords": "^3.5.2"
|
||||
"fast-deep-equal": "^3.1.1",
|
||||
"json-schema-traverse": "^1.0.0",
|
||||
"require-from-string": "^2.0.2",
|
||||
"uri-js": "^4.2.2"
|
||||
},
|
||||
"funding": {
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/epoberezkin"
|
||||
}
|
||||
},
|
||||
"node_modules/webpack-dev-middleware/node_modules/ajv-keywords": {
|
||||
"version": "5.1.0",
|
||||
"resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-5.1.0.tgz",
|
||||
"integrity": "sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw==",
|
||||
"dependencies": {
|
||||
"fast-deep-equal": "^3.1.3"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"ajv": "^8.8.2"
|
||||
}
|
||||
},
|
||||
"node_modules/webpack-dev-middleware/node_modules/colorette": {
|
||||
"version": "2.0.16",
|
||||
"resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.16.tgz",
|
||||
"integrity": "sha512-hUewv7oMjCp+wkBv5Rm0v87eJhq4woh5rSR+42YSQJKecCqgIqNkZ6lAlQms/BwHPJA5NKMRlpxPRv0n8HQW6g=="
|
||||
},
|
||||
"node_modules/webpack-dev-middleware/node_modules/json-schema-traverse": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz",
|
||||
"integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug=="
|
||||
},
|
||||
"node_modules/webpack-dev-middleware/node_modules/schema-utils": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-4.0.0.tgz",
|
||||
"integrity": "sha512-1edyXKgh6XnJsJSQ8mKWXnN/BVaIbFMLpouRUrXgVq7WYne5kw3MW7UPhO44uRXQSIpTSXoJbmrR2X0w9kUTyg==",
|
||||
"dependencies": {
|
||||
"@types/json-schema": "^7.0.9",
|
||||
"ajv": "^8.8.0",
|
||||
"ajv-formats": "^2.1.1",
|
||||
"ajv-keywords": "^5.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 10.13.0"
|
||||
"node": ">= 12.13.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
@@ -15421,9 +15509,9 @@
|
||||
}
|
||||
},
|
||||
"@types/http-proxy": {
|
||||
"version": "1.17.7",
|
||||
"resolved": "https://registry.npmjs.org/@types/http-proxy/-/http-proxy-1.17.7.tgz",
|
||||
"integrity": "sha512-9hdj6iXH64tHSLTY+Vt2eYOGzSogC+JQ2H7bdPWkuh7KXP5qLllWx++t+K9Wk556c3dkDdPws/SpMRi0sdCT1w==",
|
||||
"version": "1.17.8",
|
||||
"resolved": "https://registry.npmjs.org/@types/http-proxy/-/http-proxy-1.17.8.tgz",
|
||||
"integrity": "sha512-5kPLG5BKpWYkw/LVOGWpiq3nEVqxiN32rTgI53Sk12/xHFQ2rG3ehI9IO+O3W2QoKeyB92dJkoka8SUm6BX1pA==",
|
||||
"requires": {
|
||||
"@types/node": "*"
|
||||
}
|
||||
@@ -15470,9 +15558,9 @@
|
||||
}
|
||||
},
|
||||
"@types/json-schema": {
|
||||
"version": "7.0.8",
|
||||
"resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.8.tgz",
|
||||
"integrity": "sha512-YSBPTLTVm2e2OoQIDYx8HaeWJ5tTToLH67kXR7zYNGupXMEHa2++G8k+DczX2cFVgalypqtyZIcU19AFcmOpmg=="
|
||||
"version": "7.0.9",
|
||||
"resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.9.tgz",
|
||||
"integrity": "sha512-qcUXuemtEu+E5wZSJHNxUXeCZhAfXKQ41D+duX+VYPde7xyEVZci+/oXKJL13tnRs9lR2pr4fod59GT6/X1/yQ=="
|
||||
},
|
||||
"@types/minimatch": {
|
||||
"version": "3.0.5",
|
||||
@@ -15687,6 +15775,32 @@
|
||||
"uri-js": "^4.2.2"
|
||||
}
|
||||
},
|
||||
"ajv-formats": {
|
||||
"version": "2.1.1",
|
||||
"resolved": "https://registry.npmjs.org/ajv-formats/-/ajv-formats-2.1.1.tgz",
|
||||
"integrity": "sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA==",
|
||||
"requires": {
|
||||
"ajv": "^8.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"ajv": {
|
||||
"version": "8.10.0",
|
||||
"resolved": "https://registry.npmjs.org/ajv/-/ajv-8.10.0.tgz",
|
||||
"integrity": "sha512-bzqAEZOjkrUMl2afH8dknrq5KEk2SrwdBROR+vH1EKVQTqaUbJVPdc/gEdggTMM0Se+s+Ja4ju4TlNcStKl2Hw==",
|
||||
"requires": {
|
||||
"fast-deep-equal": "^3.1.1",
|
||||
"json-schema-traverse": "^1.0.0",
|
||||
"require-from-string": "^2.0.2",
|
||||
"uri-js": "^4.2.2"
|
||||
}
|
||||
},
|
||||
"json-schema-traverse": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz",
|
||||
"integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug=="
|
||||
}
|
||||
}
|
||||
},
|
||||
"ajv-keywords": {
|
||||
"version": "3.5.2",
|
||||
"resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz",
|
||||
@@ -15718,10 +15832,10 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"ansi-html": {
|
||||
"version": "0.0.7",
|
||||
"resolved": "https://registry.npmjs.org/ansi-html/-/ansi-html-0.0.7.tgz",
|
||||
"integrity": "sha1-gTWEAhliqenm/QOflA0S9WynhZ4="
|
||||
"ansi-html-community": {
|
||||
"version": "0.0.8",
|
||||
"resolved": "https://registry.npmjs.org/ansi-html-community/-/ansi-html-community-0.0.8.tgz",
|
||||
"integrity": "sha512-1APHAyr3+PCamwNw3bXCPp4HFLONZt/yIH0sZp0/469KWNTEy+qN5jQ3GVX6DMZ1UXAi34yVwtTeaG/HpBuuzw=="
|
||||
},
|
||||
"ansi-regex": {
|
||||
"version": "4.1.0",
|
||||
@@ -17210,6 +17324,11 @@
|
||||
"execa": "^5.0.0"
|
||||
}
|
||||
},
|
||||
"define-lazy-prop": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz",
|
||||
"integrity": "sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og=="
|
||||
},
|
||||
"define-properties": {
|
||||
"version": "1.1.3",
|
||||
"resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz",
|
||||
@@ -18881,6 +19000,14 @@
|
||||
"resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz",
|
||||
"integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw=="
|
||||
},
|
||||
"has-tostringtag": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz",
|
||||
"integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==",
|
||||
"requires": {
|
||||
"has-symbols": "^1.0.2"
|
||||
}
|
||||
},
|
||||
"has-value": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz",
|
||||
@@ -19637,11 +19764,12 @@
|
||||
}
|
||||
},
|
||||
"is-arguments": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.0.tgz",
|
||||
"integrity": "sha512-1Ij4lOMPl/xB5kBDn7I+b2ttPMKa8szhEIrXDuXQD/oe3HJLTLhqhgGspwgyGd6MOywBUqVvYicF72lkgDnIHg==",
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.1.tgz",
|
||||
"integrity": "sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==",
|
||||
"requires": {
|
||||
"call-bind": "^1.0.0"
|
||||
"call-bind": "^1.0.2",
|
||||
"has-tostringtag": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"is-arrayish": {
|
||||
@@ -20041,11 +20169,6 @@
|
||||
"resolved": "https://registry.npmjs.org/junk/-/junk-3.1.0.tgz",
|
||||
"integrity": "sha512-pBxcB3LFc8QVgdggvZWyeys+hnrNWg4OcZIU/1X59k5jQdLBlCsYGRQaz234SqoRLTCgMH00fY0xRJH+F9METQ=="
|
||||
},
|
||||
"killable": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/killable/-/killable-1.0.1.tgz",
|
||||
"integrity": "sha512-LzqtLKlUwirEUyl/nicirVmNiPvYs7l5n8wOPP7fyJVpUPkvCnW/vuiXGpylGUlnPDnB7311rARzAt3Mhswpjg=="
|
||||
},
|
||||
"kind-of": {
|
||||
"version": "3.2.2",
|
||||
"resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
|
||||
@@ -20075,9 +20198,9 @@
|
||||
}
|
||||
},
|
||||
"laravel-mix": {
|
||||
"version": "6.0.25",
|
||||
"resolved": "https://registry.npmjs.org/laravel-mix/-/laravel-mix-6.0.25.tgz",
|
||||
"integrity": "sha512-SDpLGUnXJ8g0rvtiLljSTJSR6awj86M2Jd3MhbtT32TCgwXdtajVLF7Mv2blsPLixGHtynwZgi+UFlYQbquPLg==",
|
||||
"version": "6.0.30",
|
||||
"resolved": "https://registry.npmjs.org/laravel-mix/-/laravel-mix-6.0.30.tgz",
|
||||
"integrity": "sha512-Y5EjdPVEqVMgnglzJvDuDEpUa2EouutS4ySrukZkBWh2EPPYM1iszu8TItvQ2J08N5BPIrYWh8McUbTwq6tcrQ==",
|
||||
"requires": {
|
||||
"@babel/core": "^7.14.5",
|
||||
"@babel/plugin-proposal-object-rest-spread": "^7.14.5",
|
||||
@@ -20124,7 +20247,7 @@
|
||||
"vue-style-loader": "^4.1.3",
|
||||
"webpack": "^5.38.1",
|
||||
"webpack-cli": "^4.7.2",
|
||||
"webpack-dev-server": "4.0.0-beta.3",
|
||||
"webpack-dev-server": "4.1.1",
|
||||
"webpack-merge": "^5.8.0",
|
||||
"webpack-notifier": "^1.13.0",
|
||||
"webpackbar": "^5.0.0-3",
|
||||
@@ -20152,9 +20275,9 @@
|
||||
"requires": {}
|
||||
},
|
||||
"ansi-regex": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz",
|
||||
"integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg=="
|
||||
"version": "5.0.1",
|
||||
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
|
||||
"integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ=="
|
||||
},
|
||||
"ansi-styles": {
|
||||
"version": "4.3.0",
|
||||
@@ -20222,11 +20345,11 @@
|
||||
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ=="
|
||||
},
|
||||
"http-proxy-middleware": {
|
||||
"version": "1.3.1",
|
||||
"resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-1.3.1.tgz",
|
||||
"integrity": "sha512-13eVVDYS4z79w7f1+NPllJtOQFx/FdUW4btIvVRMaRlUY9VGstAbo5MOhLEuUgZFRHn3x50ufn25zkj/boZnEg==",
|
||||
"version": "2.0.3",
|
||||
"resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-2.0.3.tgz",
|
||||
"integrity": "sha512-1bloEwnrHMnCoO/Gcwbz7eSVvW50KPES01PecpagI+YLNLci4AcuKJrujW4Mc3sBLpFxMSlsLNHS5Nl/lvrTPA==",
|
||||
"requires": {
|
||||
"@types/http-proxy": "^1.17.5",
|
||||
"@types/http-proxy": "^1.17.8",
|
||||
"http-proxy": "^1.18.1",
|
||||
"is-glob": "^4.0.1",
|
||||
"is-plain-obj": "^3.0.0",
|
||||
@@ -20275,12 +20398,13 @@
|
||||
}
|
||||
},
|
||||
"open": {
|
||||
"version": "7.4.2",
|
||||
"resolved": "https://registry.npmjs.org/open/-/open-7.4.2.tgz",
|
||||
"integrity": "sha512-MVHddDVweXZF3awtlAS+6pgKLlm/JgxZ90+/NBurBoQctVOOB/zDdVjcyPzQ+0laDGbsWgrRkflI65sQeOgT9Q==",
|
||||
"version": "8.4.0",
|
||||
"resolved": "https://registry.npmjs.org/open/-/open-8.4.0.tgz",
|
||||
"integrity": "sha512-XgFPPM+B28FtCCgSb9I+s9szOC1vZRSwgWsRUA5ylIxRTgKozqjOCrVOqGsYABPYK5qnfqClxZTFBa8PKt2v6Q==",
|
||||
"requires": {
|
||||
"is-docker": "^2.0.0",
|
||||
"is-wsl": "^2.1.1"
|
||||
"define-lazy-prop": "^2.0.0",
|
||||
"is-docker": "^2.1.1",
|
||||
"is-wsl": "^2.2.0"
|
||||
}
|
||||
},
|
||||
"p-limit": {
|
||||
@@ -20349,11 +20473,11 @@
|
||||
}
|
||||
},
|
||||
"strip-ansi": {
|
||||
"version": "6.0.0",
|
||||
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz",
|
||||
"integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==",
|
||||
"version": "6.0.1",
|
||||
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
|
||||
"integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
|
||||
"requires": {
|
||||
"ansi-regex": "^5.0.0"
|
||||
"ansi-regex": "^5.0.1"
|
||||
}
|
||||
},
|
||||
"supports-color": {
|
||||
@@ -20393,43 +20517,56 @@
|
||||
}
|
||||
},
|
||||
"webpack-dev-server": {
|
||||
"version": "4.0.0-beta.3",
|
||||
"resolved": "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-4.0.0-beta.3.tgz",
|
||||
"integrity": "sha512-Ud7ieH15No/KiSdRuzk+2k+S4gSCR/N7m4hJhesDbKQEZy3P+NPXTXfsimNOZvbVX2TRuIEFB+VdLZFn8DwGwg==",
|
||||
"version": "4.1.1",
|
||||
"resolved": "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-4.1.1.tgz",
|
||||
"integrity": "sha512-Kl1mnCEw8Cy1Kw173gCxLIB242LfPKEOj9WoKhKz/MbryZTNrILzOJTk8kiczw/YUEPzn3gcltCQv6hDsLudRg==",
|
||||
"requires": {
|
||||
"ansi-html": "^0.0.7",
|
||||
"ansi-html-community": "^0.0.8",
|
||||
"bonjour": "^3.5.0",
|
||||
"chokidar": "^3.5.1",
|
||||
"colorette": "^1.2.2",
|
||||
"compression": "^1.7.4",
|
||||
"connect-history-api-fallback": "^1.6.0",
|
||||
"del": "^6.0.0",
|
||||
"express": "^4.17.1",
|
||||
"find-cache-dir": "^3.3.1",
|
||||
"graceful-fs": "^4.2.6",
|
||||
"html-entities": "^2.3.2",
|
||||
"http-proxy-middleware": "^1.3.1",
|
||||
"http-proxy-middleware": "^2.0.0",
|
||||
"internal-ip": "^6.2.0",
|
||||
"ipaddr.js": "^2.0.0",
|
||||
"is-absolute-url": "^3.0.3",
|
||||
"killable": "^1.0.1",
|
||||
"open": "^7.4.2",
|
||||
"ipaddr.js": "^2.0.1",
|
||||
"open": "^8.0.9",
|
||||
"p-retry": "^4.5.0",
|
||||
"portfinder": "^1.0.28",
|
||||
"schema-utils": "^3.0.0",
|
||||
"schema-utils": "^3.1.0",
|
||||
"selfsigned": "^1.10.11",
|
||||
"serve-index": "^1.9.1",
|
||||
"sockjs": "^0.3.21",
|
||||
"spdy": "^4.0.2",
|
||||
"strip-ansi": "^6.0.0",
|
||||
"strip-ansi": "^7.0.0",
|
||||
"url": "^0.11.0",
|
||||
"webpack-dev-middleware": "^4.1.0",
|
||||
"ws": "^7.4.5"
|
||||
"webpack-dev-middleware": "^5.0.0",
|
||||
"ws": "^8.1.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"ansi-regex": {
|
||||
"version": "6.0.1",
|
||||
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz",
|
||||
"integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA=="
|
||||
},
|
||||
"strip-ansi": {
|
||||
"version": "7.0.1",
|
||||
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.0.1.tgz",
|
||||
"integrity": "sha512-cXNxvT8dFNRVfhVME3JAe98mkXDYN2O1l7jmcwMnOslDeESg1rF/OZMtK0nRAhiari1unG5cD4jG3rapUAkLbw==",
|
||||
"requires": {
|
||||
"ansi-regex": "^6.0.1"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"ws": {
|
||||
"version": "7.5.3",
|
||||
"resolved": "https://registry.npmjs.org/ws/-/ws-7.5.3.tgz",
|
||||
"integrity": "sha512-kQ/dHIzuLrS6Je9+uv81ueZomEwH0qVYstcAQ4/Z93K8zeko9gtAbttJWzoC5ukqXY1PpoouV3+VSOqEAFt5wg==",
|
||||
"version": "8.5.0",
|
||||
"resolved": "https://registry.npmjs.org/ws/-/ws-8.5.0.tgz",
|
||||
"integrity": "sha512-BWX0SWVgLPzYwF8lTzEy1egjhS4S4OEAHfsO8o65WOVsrnSRGaSiUaa9e0ggGlkMTtBlmOpEXiie9RUcBO86qg==",
|
||||
"requires": {}
|
||||
}
|
||||
}
|
||||
@@ -20605,14 +20742,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"map-age-cleaner": {
|
||||
"version": "0.1.3",
|
||||
"resolved": "https://registry.npmjs.org/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz",
|
||||
"integrity": "sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w==",
|
||||
"requires": {
|
||||
"p-defer": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"map-cache": {
|
||||
"version": "0.2.2",
|
||||
"resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz",
|
||||
@@ -20667,26 +20796,10 @@
|
||||
"resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz",
|
||||
"integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g="
|
||||
},
|
||||
"mem": {
|
||||
"version": "8.1.1",
|
||||
"resolved": "https://registry.npmjs.org/mem/-/mem-8.1.1.tgz",
|
||||
"integrity": "sha512-qFCFUDs7U3b8mBDPyz5EToEKoAkgCzqquIgi9nkkR9bixxOVOre+09lbuH7+9Kn2NFpm56M3GUWVbU2hQgdACA==",
|
||||
"requires": {
|
||||
"map-age-cleaner": "^0.1.3",
|
||||
"mimic-fn": "^3.1.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"mimic-fn": {
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-3.1.0.tgz",
|
||||
"integrity": "sha512-Ysbi9uYW9hFyfrThdDEQuykN4Ey6BuwPD2kpI5ES/nFTDn/98yxYNLZJcgUAKPT/mcrLLKaGzJR9YVxJrIdASQ=="
|
||||
}
|
||||
}
|
||||
},
|
||||
"memfs": {
|
||||
"version": "3.2.2",
|
||||
"resolved": "https://registry.npmjs.org/memfs/-/memfs-3.2.2.tgz",
|
||||
"integrity": "sha512-RE0CwmIM3CEvpcdK3rZ19BC4E6hv9kADkMN5rPduRak58cNArWLi/9jFLsa4rhsjfVxMP3v0jO7FHXq7SvFY5Q==",
|
||||
"version": "3.4.1",
|
||||
"resolved": "https://registry.npmjs.org/memfs/-/memfs-3.4.1.tgz",
|
||||
"integrity": "sha512-1c9VPVvW5P7I85c35zAdEr1TD5+F11IToIHIlrVIcflfnzPkJa0ZoYEoEdYDP8KgPFoSZ/opDrUsAoZWym3mtw==",
|
||||
"requires": {
|
||||
"fs-monkey": "1.0.3"
|
||||
}
|
||||
@@ -21405,11 +21518,6 @@
|
||||
"integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=",
|
||||
"dev": true
|
||||
},
|
||||
"p-defer": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/p-defer/-/p-defer-1.0.0.tgz",
|
||||
"integrity": "sha1-n26xgvbJqozXQwBKfU+WsZaw+ww="
|
||||
},
|
||||
"p-event": {
|
||||
"version": "4.2.0",
|
||||
"resolved": "https://registry.npmjs.org/p-event/-/p-event-4.2.0.tgz",
|
||||
@@ -22695,6 +22803,11 @@
|
||||
"resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",
|
||||
"integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I="
|
||||
},
|
||||
"require-from-string": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz",
|
||||
"integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw=="
|
||||
},
|
||||
"require-main-filename": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz",
|
||||
@@ -22924,9 +23037,9 @@
|
||||
"integrity": "sha512-1JeB87s6oN/TDxQQYCvS5EFoQyvV6eYMZZ0AeA4tdFDYWN3BAGZ8npr17UBFddU0lgAt3H0yjX3X6/ekOj1yjw=="
|
||||
},
|
||||
"selfsigned": {
|
||||
"version": "1.10.11",
|
||||
"resolved": "https://registry.npmjs.org/selfsigned/-/selfsigned-1.10.11.tgz",
|
||||
"integrity": "sha512-aVmbPOfViZqOZPgRBT0+3u4yZFHpmnIghLMlAcb5/xhp5ZtB/RVnKhz5vl2M32CLXAqR4kha9zfhNg0Lf/sxKA==",
|
||||
"version": "1.10.14",
|
||||
"resolved": "https://registry.npmjs.org/selfsigned/-/selfsigned-1.10.14.tgz",
|
||||
"integrity": "sha512-lkjaiAye+wBZDCBsu5BGi0XiLRxeUlsGod5ZP924CRSEoGuZAw/f7y9RKu28rwTfiHVhdavhB0qH0INV6P1lEA==",
|
||||
"requires": {
|
||||
"node-forge": "^0.10.0"
|
||||
}
|
||||
@@ -24577,26 +24690,55 @@
|
||||
}
|
||||
},
|
||||
"webpack-dev-middleware": {
|
||||
"version": "4.3.0",
|
||||
"resolved": "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-4.3.0.tgz",
|
||||
"integrity": "sha512-PjwyVY95/bhBh6VUqt6z4THplYcsvQ8YNNBTBM873xLVmw8FLeALn0qurHbs9EmcfhzQis/eoqypSnZeuUz26w==",
|
||||
"version": "5.3.1",
|
||||
"resolved": "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-5.3.1.tgz",
|
||||
"integrity": "sha512-81EujCKkyles2wphtdrnPg/QqegC/AtqNH//mQkBYSMqwFVCQrxM6ktB2O/SPlZy7LqeEfTbV3cZARGQz6umhg==",
|
||||
"requires": {
|
||||
"colorette": "^1.2.2",
|
||||
"mem": "^8.1.1",
|
||||
"memfs": "^3.2.2",
|
||||
"mime-types": "^2.1.30",
|
||||
"colorette": "^2.0.10",
|
||||
"memfs": "^3.4.1",
|
||||
"mime-types": "^2.1.31",
|
||||
"range-parser": "^1.2.1",
|
||||
"schema-utils": "^3.0.0"
|
||||
"schema-utils": "^4.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"schema-utils": {
|
||||
"version": "3.1.1",
|
||||
"resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.1.tgz",
|
||||
"integrity": "sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw==",
|
||||
"ajv": {
|
||||
"version": "8.10.0",
|
||||
"resolved": "https://registry.npmjs.org/ajv/-/ajv-8.10.0.tgz",
|
||||
"integrity": "sha512-bzqAEZOjkrUMl2afH8dknrq5KEk2SrwdBROR+vH1EKVQTqaUbJVPdc/gEdggTMM0Se+s+Ja4ju4TlNcStKl2Hw==",
|
||||
"requires": {
|
||||
"@types/json-schema": "^7.0.8",
|
||||
"ajv": "^6.12.5",
|
||||
"ajv-keywords": "^3.5.2"
|
||||
"fast-deep-equal": "^3.1.1",
|
||||
"json-schema-traverse": "^1.0.0",
|
||||
"require-from-string": "^2.0.2",
|
||||
"uri-js": "^4.2.2"
|
||||
}
|
||||
},
|
||||
"ajv-keywords": {
|
||||
"version": "5.1.0",
|
||||
"resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-5.1.0.tgz",
|
||||
"integrity": "sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw==",
|
||||
"requires": {
|
||||
"fast-deep-equal": "^3.1.3"
|
||||
}
|
||||
},
|
||||
"colorette": {
|
||||
"version": "2.0.16",
|
||||
"resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.16.tgz",
|
||||
"integrity": "sha512-hUewv7oMjCp+wkBv5Rm0v87eJhq4woh5rSR+42YSQJKecCqgIqNkZ6lAlQms/BwHPJA5NKMRlpxPRv0n8HQW6g=="
|
||||
},
|
||||
"json-schema-traverse": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz",
|
||||
"integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug=="
|
||||
},
|
||||
"schema-utils": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-4.0.0.tgz",
|
||||
"integrity": "sha512-1edyXKgh6XnJsJSQ8mKWXnN/BVaIbFMLpouRUrXgVq7WYne5kw3MW7UPhO44uRXQSIpTSXoJbmrR2X0w9kUTyg==",
|
||||
"requires": {
|
||||
"@types/json-schema": "^7.0.9",
|
||||
"ajv": "^8.8.0",
|
||||
"ajv-formats": "^2.1.1",
|
||||
"ajv-keywords": "^5.0.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -27,7 +27,7 @@
|
||||
"jquery": "^3.5.1",
|
||||
"jquery-pjax": "~2.0",
|
||||
"js-yaml": "^3.14.0",
|
||||
"laravel-mix": "^6.0.25",
|
||||
"laravel-mix": "^6.0.30",
|
||||
"leaflet": "^1.3.4",
|
||||
"leaflet-ajax": "2.1.0",
|
||||
"leaflet-providers": "1.0.*",
|
||||
|
||||
@@ -2,10 +2,11 @@
|
||||
|
||||
return [
|
||||
'status' => [
|
||||
'active' => 'Aktiv',
|
||||
'stored' => 'Gelagert',
|
||||
'retired' => 'Außer Dienst',
|
||||
'scrapped' => 'Verschrottet',
|
||||
'written' => 'Abgeschrieben',
|
||||
'active' => 'Aktiv',
|
||||
'maintenance' => 'Instandhaltung',
|
||||
'stored' => 'Gelagert',
|
||||
'retired' => 'Außer Dienst',
|
||||
'scrapped' => 'Verschrottet',
|
||||
'written' => 'Abgeschrieben',
|
||||
],
|
||||
];
|
||||
|
||||
@@ -23,17 +23,17 @@ return [
|
||||
'departuretime' => 'Abflugzeit',
|
||||
'arrivaltime' => 'Ankunftszeit',
|
||||
'type' => [
|
||||
'pass_scheduled' => 'Passagier - planmäßig',
|
||||
'cargo_scheduled' => 'Fracht - planmäßig',
|
||||
'charter_pass_only' => 'Charter - Nur Passagier',
|
||||
'addtl_cargo_mail' => 'Zusätzliche Fracht/Post',
|
||||
'special_vip' => 'Spezieller VIP-Flug (FAA/Behörde)',
|
||||
'pass_addtl' => 'Passagier - Zusätzlich',
|
||||
'charter_cargo' => 'Charter - Fracht/Post',
|
||||
'pass_scheduled' => 'Passagier (Planmäßig)',
|
||||
'cargo_scheduled' => 'Fracht (Planmäßig)',
|
||||
'charter_pass_only' => 'Passagier (Charter)',
|
||||
'addtl_cargo_mail' => 'Fracht (Zusätzliche)',
|
||||
'special_vip' => 'Spezieller VIP-Flug',
|
||||
'pass_addtl' => 'Passagier (Zusätzlich)',
|
||||
'charter_cargo' => 'Fracht (Charter)',
|
||||
'ambulance' => 'Ambulanzflug',
|
||||
'training_flight' => 'Trainingsflug',
|
||||
'mail_service' => 'Postdienst',
|
||||
'charter_special' => 'Charter mit Sonderbehandlung',
|
||||
'charter_special' => 'Passagier (Charter mit Sonderbehandlung)',
|
||||
'positioning' => 'Positionierung (Fähre/Lieferung/Demo)',
|
||||
'technical_test' => 'Technischer Test',
|
||||
'military' => 'Militär',
|
||||
|
||||
@@ -19,6 +19,7 @@ return [
|
||||
'nometar' => 'METAR/TAF Daten konnten nicht abgerufen werden',
|
||||
'conditions' => 'Bedingungen',
|
||||
'visibility' => 'Sichtbarkeit',
|
||||
'temp' => 'Temperatur',
|
||||
'humidity' => 'Feuchtigkeit',
|
||||
'dewpoint' => 'Taupunkt',
|
||||
'barometer' => 'Barometer',
|
||||
|
||||
@@ -2,10 +2,11 @@
|
||||
|
||||
return [
|
||||
'status' => [
|
||||
'active' => 'Active',
|
||||
'stored' => 'Stored',
|
||||
'retired' => 'Retired',
|
||||
'scrapped' => 'Scrapped',
|
||||
'written' => 'Written Off',
|
||||
'active' => 'Active',
|
||||
'maintenance' => 'Maintenance',
|
||||
'stored' => 'Stored',
|
||||
'retired' => 'Retired',
|
||||
'scrapped' => 'Scrapped',
|
||||
'written' => 'Written Off',
|
||||
],
|
||||
];
|
||||
|
||||
@@ -23,20 +23,20 @@ return [
|
||||
'departuretime' => 'Departure Time',
|
||||
'arrivaltime' => 'Arrival Time',
|
||||
'type' => [
|
||||
'pass_scheduled' => 'Passenger - Scheduled',
|
||||
'cargo_scheduled' => 'Cargo - Scheduled',
|
||||
'charter_pass_only' => 'Charter - Passenger Only',
|
||||
'addtl_cargo_mail' => 'Additional Cargo/Mail',
|
||||
'special_vip' => 'Special VIP Flight (FAA/Government)',
|
||||
'pass_addtl' => 'Passenger - Additional',
|
||||
'charter_cargo' => 'Charter - Cargo/Mail',
|
||||
'ambulance' => 'Ambulance Flight',
|
||||
'training_flight' => 'Training Flight',
|
||||
'pass_scheduled' => 'Passenger (Scheduled)',
|
||||
'pass_addtl' => 'Passenger (Additional)',
|
||||
'charter_pass_only' => 'Passenger (Charter)',
|
||||
'charter_special' => 'Passenger (Special Charter)',
|
||||
'cargo_scheduled' => 'Cargo (Scheduled)',
|
||||
'addtl_cargo_mail' => 'Cargo (Additional)',
|
||||
'charter_cargo' => 'Cargo (Charter)',
|
||||
'mail_service' => 'Mail Service',
|
||||
'charter_special' => 'Charter w/ Special Handling',
|
||||
'positioning' => 'Positioning (Ferry/Delivery/Demo)',
|
||||
'technical_test' => 'Technical Test',
|
||||
'special_vip' => 'VIP Flight',
|
||||
'ambulance' => 'Ambulance',
|
||||
'training_flight' => 'Training',
|
||||
'military' => 'Military',
|
||||
'positioning' => 'Positioning',
|
||||
'technical_test' => 'Technical Test',
|
||||
'technical_stop' => 'Technical Stop',
|
||||
],
|
||||
];
|
||||
|
||||
@@ -19,6 +19,7 @@ return [
|
||||
'nometar' => 'METAR/TAF data could not be retrieved',
|
||||
'conditions' => 'Conditions',
|
||||
'visibility' => 'visibility',
|
||||
'temp' => 'Temperature',
|
||||
'humidity' => 'humidity',
|
||||
'dewpoint' => 'dew point',
|
||||
'barometer' => 'Barometer',
|
||||
|
||||
@@ -2,10 +2,11 @@
|
||||
|
||||
return [
|
||||
'status' => [
|
||||
'active' => 'Activo',
|
||||
'stored' => 'Guardado',
|
||||
'retired' => 'Retirado',
|
||||
'scrapped' => 'Desguazado',
|
||||
'written' => 'Dado de baja',
|
||||
'active' => 'Activo',
|
||||
'maintenance' => 'Mantenimiento',
|
||||
'stored' => 'Guardado',
|
||||
'retired' => 'Retirado',
|
||||
'scrapped' => 'Desguazado',
|
||||
'written' => 'Dado de baja',
|
||||
],
|
||||
];
|
||||
|
||||
@@ -19,14 +19,14 @@ return [
|
||||
'download' => 'Descarga|Descargas',
|
||||
'from' => 'de',
|
||||
'to' => 'a',
|
||||
'state' => 'Estado',
|
||||
'status' => 'Estatus',
|
||||
'state' => 'Situación',
|
||||
'status' => 'Estado',
|
||||
'departure' => 'Salida',
|
||||
'arrival' => 'Llegada',
|
||||
'aircraft' => 'Aeronave',
|
||||
'airline' => 'Aerolínea',
|
||||
'subfleet' => 'Subfleet',
|
||||
'distance' => 'Distancía',
|
||||
'distance' => 'Distancia',
|
||||
'fuel' => 'Combustible',
|
||||
'metar' => 'METAR',
|
||||
'hour' => 'Hora|Horas',
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
return [
|
||||
'type' => [
|
||||
'flight' => 'Vuelo',
|
||||
'flight' => 'Por vuelo',
|
||||
'daily' => 'Diario',
|
||||
'monthly' => 'Mensual',
|
||||
],
|
||||
|
||||
@@ -23,18 +23,18 @@ return [
|
||||
'departuretime' => 'Hora de salida',
|
||||
'arrivaltime' => 'Hora de llegada',
|
||||
'type' => [
|
||||
'pass_scheduled' => 'Pasajero - Programado',
|
||||
'cargo_scheduled' => 'Carga - Programado',
|
||||
'charter_pass_only' => 'Charter - Solo pasajeros',
|
||||
'addtl_cargo_mail' => 'Carga/correo adicional',
|
||||
'special_vip' => 'Vuelo VIP especial (Autoridad de Aviación Civil)',
|
||||
'pass_addtl' => 'Pasajero - Adicional',
|
||||
'charter_cargo' => 'Charter - Carga/Correo',
|
||||
'pass_scheduled' => 'Pasajero (Programado)',
|
||||
'cargo_scheduled' => 'Carga (Programado)',
|
||||
'charter_pass_only' => 'Pasajero (Charter)',
|
||||
'addtl_cargo_mail' => 'Carga (Adicional)',
|
||||
'special_vip' => 'Vuelo VIP especial',
|
||||
'pass_addtl' => 'Pasajero (Adicional)',
|
||||
'charter_cargo' => 'Carga (Charter)',
|
||||
'ambulance' => 'Vuelo ambulancia',
|
||||
'training_flight' => 'Vuelo de entrenamiento',
|
||||
'mail_service' => 'Servicio postal',
|
||||
'charter_special' => 'Charter con cargas especiales',
|
||||
'positioning' => 'Posicionamiento (Ferry/Entrega/Demo)',
|
||||
'charter_special' => 'Pasajero (Charter con cargas especiales)',
|
||||
'positioning' => 'Posicionamiento',
|
||||
'technical_test' => 'Prueba técnica',
|
||||
'military' => 'Militar',
|
||||
'technical_stop' => 'Parada técnica',
|
||||
|
||||
@@ -6,7 +6,7 @@ return [
|
||||
'pending' => 'Pendiente',
|
||||
'active' => 'Activo',
|
||||
'rejected' => 'Rechazado',
|
||||
'on_leave' => 'De vacaciones',
|
||||
'on_leave' => 'En excedencia',
|
||||
'suspended' => 'Suspendido',
|
||||
'deleted' => 'Borrar',
|
||||
],
|
||||
|
||||
@@ -11,16 +11,17 @@ return [
|
||||
'altitude' => 'Altitud',
|
||||
'heading' => 'Rumbo',
|
||||
'distance' => 'Distancía',
|
||||
'noflights' => 'No hay vuelos.',
|
||||
'noflights' => 'No hay vuelos',
|
||||
'gs' => 'GS',
|
||||
],
|
||||
|
||||
'weather' => [
|
||||
'nometar' => 'No se han encontrado datos METAR/TAF',
|
||||
'conditions' => 'Condiciones',
|
||||
'visibility' => 'visibilidad',
|
||||
'humidity' => 'humedad',
|
||||
'dewpoint' => 'punto de rocío',
|
||||
'visibility' => 'Visibilidad',
|
||||
'temp' => 'Temperatura',
|
||||
'humidity' => 'Humedad',
|
||||
'dewpoint' => 'Punto de rocío',
|
||||
'barometer' => 'Barometro',
|
||||
'clouds' => 'Nubes',
|
||||
'wind' => 'Viento',
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'status' => [
|
||||
'active' => 'Actif',
|
||||
'maintenance' => 'Maintenance',
|
||||
'stored' => 'Stocké',
|
||||
'retired' => 'Retiré',
|
||||
'scrapped' => 'Démantelé',
|
||||
'written' => 'Désaffecté',
|
||||
],
|
||||
];
|
||||
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'ident' => 'Identification',
|
||||
'home' => 'Aéroport d\'Attache',
|
||||
'current' => 'Aéroport Actuel',
|
||||
'departure' => 'Aéroport de Départ',
|
||||
'arrival' => 'Aéroport d\'Arrivée',
|
||||
];
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user