specify fares, js to dynamically change fare form; get applicable fares for the flight/pirep #125

This commit is contained in:
Nabeel Shahzad
2018-02-24 15:38:25 -06:00
parent 910c0e0eab
commit 58e0f50c48
28 changed files with 1063 additions and 265 deletions

View File

@@ -60,30 +60,15 @@ class CreatePirepTables extends Migration
$table->timestamps();
});
/*
* Financial tables/fields
*/
Schema::create('pirep_expenses', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('pirep_id', \App\Models\Pirep::ID_MAX_LENGTH);
$table->string('name');
$table->double('value')->nullable();
$table->index('pirep_id');
});
Schema::create('pirep_fares', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('pirep_id', \App\Models\Pirep::ID_MAX_LENGTH);
$table->unsignedBigInteger('fare_id');
$table->unsignedInteger('fare_id');
$table->unsignedInteger('count')->nullable();
$table->index('pirep_id');
});
/*
* Additional PIREP data
*/
Schema::create('pirep_fields', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('name', 50);
@@ -95,6 +80,7 @@ class CreatePirepTables extends Migration
$table->bigIncrements('id');
$table->string('pirep_id', \App\Models\Pirep::ID_MAX_LENGTH);
$table->string('name', 50);
$table->string('slug', 50)->nullable();
$table->string('value')->nullable();
$table->string('source')->nullable();
$table->timestamps();
@@ -112,7 +98,6 @@ class CreatePirepTables extends Migration
{
Schema::dropIfExists('pireps');
Schema::dropIfExists('pirep_comments');
Schema::dropIfExists('pirep_expenses');
Schema::dropIfExists('pirep_fares');
Schema::dropIfExists('pirep_fields');
Schema::dropIfExists('pirep_field_values');

View File

@@ -353,7 +353,14 @@ pirep_field_values:
- id: 1
pirep_id: pirepid_1
name: arrival gate
value: B14
slug: arrival_gate
value: 10
source: manual
- id: 2
pirep_id: pirepid_1
name: departure gate
slug: departure_gate
value: B32
source: manual
pirep_comments: