Type Ratings | New Feature (#1360)
* Type Ratings Adding "Type Rating" definition and assignment possibility to v7 core. * Update ProfileController.php * StyleFix 1 * Update settings.yml Change description text as requested
This commit is contained in:
@@ -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');
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
|
||||
@@ -283,7 +283,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
|
||||
|
||||
Reference in New Issue
Block a user