Compare commits
18 Commits
a4ea1f6a4a
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| dda6143f8a | |||
| 52d0e89a35 | |||
| 24a1b0e8cf | |||
| b5b7967eb7 | |||
| 683c6f52ad | |||
| a49e7d8fb5 | |||
| fe3bc46636 | |||
| 7244639051 | |||
| 33ed2f4d00 | |||
| f75136f1e5 | |||
| e7d5089e2d | |||
| 695bea264d | |||
| 7ee76e1f70 | |||
| 8978db32ce | |||
| e306c911c3 | |||
| a235246d65 | |||
| 91b3ca5618 | |||
| f7cabcce8f |
Executable
+12
@@ -0,0 +1,12 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
FILES=$(git diff --cached --name-only --diff-filter=ACMR -- '*.php' '*.html' '*.yaml' | sed 's| |\\ |g')
|
||||||
|
[ -z "$FILES" ] && exit 0
|
||||||
|
|
||||||
|
# Prettify all selected files
|
||||||
|
echo "$FILES" | xargs ./node_modules/.bin/prettier --ignore-unknown --write
|
||||||
|
|
||||||
|
# Add back the modified/prettified files to staging
|
||||||
|
echo "$FILES" | xargs git add
|
||||||
|
|
||||||
|
exit 0
|
||||||
|
|
||||||
@@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
- BelongsTo AircraftType
|
- BelongsTo AircraftType
|
||||||
- BelongsToMany AircraftTypeGroup
|
- BelongsToMany AircraftTypeGroup
|
||||||
- **TODO** BelongsTo Airport (External DB)
|
- BelongsTo Airport (2x, External DB, creation in Routes Plugin)
|
||||||
|
|
||||||
## AircraftTypeGroup
|
## AircraftTypeGroup
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
<?php namespace GermanAirlinesVa\Fleet\Controllers;
|
<?php namespace GermanAirlinesVa\Fleet\Controllers;
|
||||||
|
|
||||||
use Backend\Classes\Controller;
|
use Backend\Classes\Controller;
|
||||||
use BackendMenu;
|
|
||||||
|
|
||||||
class Aircraft extends Controller
|
class Aircraft extends Controller
|
||||||
{
|
{
|
||||||
@@ -10,6 +9,8 @@ class Aircraft extends Controller
|
|||||||
public $listConfig = 'config_list.yaml';
|
public $listConfig = 'config_list.yaml';
|
||||||
public $formConfig = 'config_form.yaml';
|
public $formConfig = 'config_form.yaml';
|
||||||
|
|
||||||
|
public $requiredPermissions = ['germanairlinesva.fleet.master'];
|
||||||
|
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
parent::__construct();
|
parent::__construct();
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
<?php namespace GermanAirlinesVa\Fleet\Controllers;
|
<?php namespace GermanAirlinesVa\Fleet\Controllers;
|
||||||
|
|
||||||
use Backend\Classes\Controller;
|
use Backend\Classes\Controller;
|
||||||
use BackendMenu;
|
|
||||||
|
|
||||||
class AircraftManufacturer extends Controller
|
class AircraftManufacturer extends Controller
|
||||||
{
|
{
|
||||||
@@ -10,6 +9,8 @@ class AircraftManufacturer extends Controller
|
|||||||
public $listConfig = 'config_list.yaml';
|
public $listConfig = 'config_list.yaml';
|
||||||
public $formConfig = 'config_form.yaml';
|
public $formConfig = 'config_form.yaml';
|
||||||
|
|
||||||
|
public $requiredPermissions = ['germanairlinesva.fleet.master'];
|
||||||
|
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
parent::__construct();
|
parent::__construct();
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
<?php namespace GermanAirlinesVa\Fleet\Controllers;
|
<?php namespace GermanAirlinesVa\Fleet\Controllers;
|
||||||
|
|
||||||
use Backend\Classes\Controller;
|
use Backend\Classes\Controller;
|
||||||
use BackendMenu;
|
|
||||||
|
|
||||||
class AircraftType extends Controller
|
class AircraftType extends Controller
|
||||||
{
|
{
|
||||||
@@ -10,6 +9,8 @@ class AircraftType extends Controller
|
|||||||
public $listConfig = 'config_list.yaml';
|
public $listConfig = 'config_list.yaml';
|
||||||
public $formConfig = 'config_form.yaml';
|
public $formConfig = 'config_form.yaml';
|
||||||
|
|
||||||
|
public $requiredPermissions = ['germanairlinesva.fleet.master'];
|
||||||
|
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
parent::__construct();
|
parent::__construct();
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
<?php namespace GermanAirlinesVa\Fleet\Controllers;
|
<?php namespace GermanAirlinesVa\Fleet\Controllers;
|
||||||
|
|
||||||
use Backend\Classes\Controller;
|
use Backend\Classes\Controller;
|
||||||
use BackendMenu;
|
|
||||||
|
|
||||||
class AircraftTypeGroup extends Controller
|
class AircraftTypeGroup extends Controller
|
||||||
{
|
{
|
||||||
@@ -10,6 +9,8 @@ class AircraftTypeGroup extends Controller
|
|||||||
public $listConfig = 'config_list.yaml';
|
public $listConfig = 'config_list.yaml';
|
||||||
public $formConfig = 'config_form.yaml';
|
public $formConfig = 'config_form.yaml';
|
||||||
|
|
||||||
|
public $requiredPermissions = ['germanairlinesva.fleet.master'];
|
||||||
|
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
parent::__construct();
|
parent::__construct();
|
||||||
|
|||||||
@@ -33,5 +33,7 @@ class Aircraft extends Model
|
|||||||
|
|
||||||
public $belongsTo = [
|
public $belongsTo = [
|
||||||
'aircraft_type' => 'GermanAirlinesVa\Fleet\Models\AircraftType',
|
'aircraft_type' => 'GermanAirlinesVa\Fleet\Models\AircraftType',
|
||||||
|
'home_airport' => 'GermanAirlinesVa\Routes\Models\Airport',
|
||||||
|
'airport' => 'GermanAirlinesVa\Routes\Models\Airport',
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,15 +2,21 @@ columns:
|
|||||||
id:
|
id:
|
||||||
label: id
|
label: id
|
||||||
type: text
|
type: text
|
||||||
aircraft_type_id:
|
aircraft_type:
|
||||||
label: aircraft_type_id
|
label: aircraft_type
|
||||||
type: text
|
type: text
|
||||||
home_airport_id:
|
relation: aircraft_type
|
||||||
label: home_airport_id
|
valueFrom: type
|
||||||
|
home_airport:
|
||||||
|
label: home_airport
|
||||||
type: text
|
type: text
|
||||||
airport_id:
|
relation: home_airport
|
||||||
label: airport_id
|
valueFrom: icao
|
||||||
|
airport:
|
||||||
|
label: airport
|
||||||
type: text
|
type: text
|
||||||
|
relation: airport
|
||||||
|
valueFrom: icao
|
||||||
name:
|
name:
|
||||||
label: name
|
label: name
|
||||||
type: text
|
type: text
|
||||||
|
|||||||
@@ -16,8 +16,10 @@ fields:
|
|||||||
span: auto
|
span: auto
|
||||||
required: 1
|
required: 1
|
||||||
type: text
|
type: text
|
||||||
home_airport_id:
|
home_airport:
|
||||||
label: 'germanairlinesva.fleet::lang.aircrafts.home_base'
|
label: 'germanairlinesva.fleet::lang.aircrafts.home_base'
|
||||||
|
nameFrom: icao
|
||||||
|
descriptionFrom: description
|
||||||
span: auto
|
span: auto
|
||||||
required: 1
|
required: 1
|
||||||
type: number
|
type: relation
|
||||||
|
|||||||
+5
-4
@@ -1,15 +1,16 @@
|
|||||||
{
|
{
|
||||||
"name": "graphql",
|
"name": "fleet",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"main": "Plugin.php",
|
"main": "Plugin.php",
|
||||||
"repository": "https://git.hofmannnet.myhome-server.de/GermanAirlines/GermanAirlinesVA-GraphQL.git",
|
"repository": "https://git.hofmannnet.myhome-server.de/GermanAirlines/GermanAirlinesVA-Fleet.git",
|
||||||
"author": "German Airlines VA",
|
"author": "German Airlines VA",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@prettier/plugin-php": "^0.16.3",
|
"@prettier/plugin-php": "^0.17.3",
|
||||||
"prettier": "^2.3.0"
|
"prettier": "^2.3.0"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"format": "prettier --write './**/*.{php,html,htm,yaml}'"
|
"preinstall": "git config core.hooksPath .hooks",
|
||||||
|
"format": "prettier --write './**/*.{php,html,yaml}'"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -10,7 +10,7 @@ navigation:
|
|||||||
url: /
|
url: /
|
||||||
icon: icon-plane
|
icon: icon-plane
|
||||||
permissions:
|
permissions:
|
||||||
- fleet
|
- germanairlinesva.fleet.master
|
||||||
sideMenu:
|
sideMenu:
|
||||||
side-menu-item:
|
side-menu-item:
|
||||||
label: 'germanairlinesva.fleet::lang.menu.groups'
|
label: 'germanairlinesva.fleet::lang.menu.groups'
|
||||||
@@ -29,6 +29,6 @@ navigation:
|
|||||||
url: germanairlinesva/fleet/aircraft
|
url: germanairlinesva/fleet/aircraft
|
||||||
icon: icon-plane
|
icon: icon-plane
|
||||||
permissions:
|
permissions:
|
||||||
fleet:
|
germanairlinesva.fleet.master:
|
||||||
tab: 'germanairlinesva.fleet::lang.permissions.tab.fleet'
|
tab: 'germanairlinesva.fleet::lang.permissions.tab.fleet'
|
||||||
label: 'germanairlinesva.fleet::lang.permissions.label.fleet'
|
label: 'germanairlinesva.fleet::lang.permissions.label.fleet'
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<?php namespace GermanAirlinesVa\Fleet\Updates;
|
<?php namespace GermanAirlinesVa\Fleet\Updates;
|
||||||
|
|
||||||
use Config;
|
|
||||||
use Schema;
|
use Schema;
|
||||||
use October\Rain\Database\Updates\Migration;
|
use October\Rain\Database\Updates\Migration;
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<?php namespace GermanAirlinesVa\Fleet\Updates;
|
<?php namespace GermanAirlinesVa\Fleet\Updates;
|
||||||
|
|
||||||
use Config;
|
|
||||||
use Schema;
|
use Schema;
|
||||||
use October\Rain\Database\Updates\Migration;
|
use October\Rain\Database\Updates\Migration;
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<?php namespace GermanAirlinesVa\Fleet\Updates;
|
<?php namespace GermanAirlinesVa\Fleet\Updates;
|
||||||
|
|
||||||
use DB;
|
use DB;
|
||||||
use Schema;
|
use Schema;
|
||||||
use October\Rain\Database\Updates\Migration;
|
use October\Rain\Database\Updates\Migration;
|
||||||
@@ -16,18 +17,10 @@ class BuilderTableCreateGermanAirlinesVaFleetAircrafts extends Migration
|
|||||||
->references('id')
|
->references('id')
|
||||||
->on('aircraft_types');
|
->on('aircraft_types');
|
||||||
$table->bigInteger('home_airport_id')->unsigned();
|
$table->bigInteger('home_airport_id')->unsigned();
|
||||||
//$table
|
|
||||||
// ->foreign('home_airport_id')
|
|
||||||
// ->references('id')
|
|
||||||
// ->on('airports');
|
|
||||||
$table
|
$table
|
||||||
->bigInteger('airport_id')
|
->bigInteger('airport_id')
|
||||||
->unsigned()
|
->unsigned()
|
||||||
->nullable();
|
->nullable();
|
||||||
//$table
|
|
||||||
// ->foreign('airport_id')
|
|
||||||
// ->references('id')
|
|
||||||
// ->on('airports');
|
|
||||||
$table->string('name');
|
$table->string('name');
|
||||||
$table->string('registration');
|
$table->string('registration');
|
||||||
$table->boolean('in_use')->default(true);
|
$table->boolean('in_use')->default(true);
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<?php namespace GermanAirlinesVa\Fleet\Updates;
|
<?php namespace GermanAirlinesVa\Fleet\Updates;
|
||||||
|
|
||||||
use Config;
|
|
||||||
use Schema;
|
use Schema;
|
||||||
use October\Rain\Database\Updates\Migration;
|
use October\Rain\Database\Updates\Migration;
|
||||||
|
|
||||||
|
|||||||
@@ -2,14 +2,14 @@
|
|||||||
# yarn lockfile v1
|
# yarn lockfile v1
|
||||||
|
|
||||||
|
|
||||||
"@prettier/plugin-php@^0.16.3":
|
"@prettier/plugin-php@^0.17.3":
|
||||||
version "0.16.3"
|
version "0.17.3"
|
||||||
resolved "https://registry.yarnpkg.com/@prettier/plugin-php/-/plugin-php-0.16.3.tgz#74867210079ba3c0c3ae843029d76e25ff0aadf3"
|
resolved "https://registry.yarnpkg.com/@prettier/plugin-php/-/plugin-php-0.17.3.tgz#193a18e308db7416f26f6e1dc0d2605d1ff01416"
|
||||||
integrity sha512-DNidzeGpP+/wmcCAZNSHxgoAnhEosYG+no4jJRqln19e1o3Okpuir/2JMxb07VCwdG50IWjtNgVwNPVl4uj0Hg==
|
integrity sha512-kD5IrGyKWF/p3XActVZ+GfbMl9knoK3XKBTG2bytpOtCO0+Q8eozimSgk/493rgFkXL3W2Ap/4GKgZf7u64+ow==
|
||||||
dependencies:
|
dependencies:
|
||||||
linguist-languages "^7.5.1"
|
linguist-languages "^7.5.1"
|
||||||
mem "^8.0.0"
|
mem "^8.0.0"
|
||||||
php-parser "3.0.2"
|
php-parser "https://github.com/glayzzle/php-parser#e61e26102144f267ecf5e09020865a9baa6ca2f1"
|
||||||
|
|
||||||
linguist-languages@^7.5.1:
|
linguist-languages@^7.5.1:
|
||||||
version "7.15.0"
|
version "7.15.0"
|
||||||
@@ -41,12 +41,11 @@ p-defer@^1.0.0:
|
|||||||
resolved "https://registry.yarnpkg.com/p-defer/-/p-defer-1.0.0.tgz#9f6eb182f6c9aa8cd743004a7d4f96b196b0fb0c"
|
resolved "https://registry.yarnpkg.com/p-defer/-/p-defer-1.0.0.tgz#9f6eb182f6c9aa8cd743004a7d4f96b196b0fb0c"
|
||||||
integrity sha1-n26xgvbJqozXQwBKfU+WsZaw+ww=
|
integrity sha1-n26xgvbJqozXQwBKfU+WsZaw+ww=
|
||||||
|
|
||||||
php-parser@3.0.2:
|
"php-parser@https://github.com/glayzzle/php-parser#e61e26102144f267ecf5e09020865a9baa6ca2f1":
|
||||||
version "3.0.2"
|
version "3.0.2"
|
||||||
resolved "https://registry.yarnpkg.com/php-parser/-/php-parser-3.0.2.tgz#a86dbbc110e57378cba71ab4cd9b0d18f3872ac3"
|
resolved "https://github.com/glayzzle/php-parser#e61e26102144f267ecf5e09020865a9baa6ca2f1"
|
||||||
integrity sha512-a7y1+odEGsceLDLpu7oNyspZ0pK8FMWJOoim4/yd82AtnEZNLdCLZ67arnOQZ9K0lHJiSp4/7lVUpGELVxE14w==
|
|
||||||
|
|
||||||
prettier@^2.3.0:
|
prettier@^2.3.0:
|
||||||
version "2.3.0"
|
version "2.3.2"
|
||||||
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.3.0.tgz#b6a5bf1284026ae640f17f7ff5658a7567fc0d18"
|
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.3.2.tgz#ef280a05ec253712e486233db5c6f23441e7342d"
|
||||||
integrity sha512-kXtO4s0Lz/DW/IJ9QdWhAf7/NmPWQXkFr/r/WkR3vyI+0v8amTDxiaQSLzs8NBlytfLWX/7uQUMIW677yLKl4w==
|
integrity sha512-lnJzDfJ66zkMy58OL5/NY5zp70S7Nz6KqcKkXYzn2tMVrNxvbqaBpg7H3qHaLxCJ5lNMsGuM8+ohS7cZrthdLQ==
|
||||||
|
|||||||
Reference in New Issue
Block a user