diff --git a/app/Database/migrations/2017_06_21_165410_create_ranks_table.php b/app/Database/migrations/2017_06_21_165410_create_ranks_table.php index 637c98c7..18eef7cf 100644 --- a/app/Database/migrations/2017_06_21_165410_create_ranks_table.php +++ b/app/Database/migrations/2017_06_21_165410_create_ranks_table.php @@ -18,6 +18,7 @@ class CreateRanksTable extends Migration $table->string('name', 50); $table->string('image_link')->nullable(); $table->unsignedInteger('hours')->default(0); + $table->unsignedDecimal('base_pay_rate')->nullable()->default(0); $table->boolean('auto_approve_acars')->nullable()->default(false); $table->boolean('auto_approve_manual')->nullable()->default(false); $table->boolean('auto_promote')->nullable()->default(true); diff --git a/app/Database/seeds/sample.yml b/app/Database/seeds/sample.yml index fd70497f..c3fbf42a 100644 --- a/app/Database/seeds/sample.yml +++ b/app/Database/seeds/sample.yml @@ -75,14 +75,17 @@ ranks: - id: 2 name: Junior First Officer hours: 10 + base_pay_rate: 100 - id: 3 name: First Officer hours: 15 + base_pay_rate: 250 auto_approve_acars: 1 auto_approve_manual: 1 - id: 4 name: Senior Captain hours: 20 + base_pay_rate: 500 auto_approve_acars: 1 auto_approve_manual: 1 auto_promote: 0 diff --git a/app/Models/Rank.php b/app/Models/Rank.php index 012a2ae0..48e076d5 100644 --- a/app/Models/Rank.php +++ b/app/Models/Rank.php @@ -14,6 +14,7 @@ class Rank extends BaseModel 'name', 'hours', 'image_link', + 'base_pay_rate', 'auto_approve_acars', 'auto_approve_manual', 'auto_promote', @@ -21,6 +22,7 @@ class Rank extends BaseModel protected $casts = [ 'hours' => 'integer', + 'base_pay_rate' => 'float', 'auto_approve_acars' => 'bool', 'auto_approve_manual' => 'bool', 'auto_promote' => 'bool', @@ -29,6 +31,7 @@ class Rank extends BaseModel public static $rules = [ 'name' => 'required', 'hours' => 'required|integer', + 'base_pay_rate' => 'nullable|numeric', ]; public function subfleets() { diff --git a/resources/views/admin/ranks/fields.blade.php b/resources/views/admin/ranks/fields.blade.php index 11208065..bad453a9 100644 --- a/resources/views/admin/ranks/fields.blade.php +++ b/resources/views/admin/ranks/fields.blade.php @@ -6,6 +6,23 @@
{{ $errors->first('name') }}
+{{ $errors->first('image_link') }}
+{{ $errors->first('base_pay_rate') }}
+ @component('admin.components.info') + This is the base rate of pay, per-flight hour, for this rank. + This can be adjusted via a multiplier on the subfleet. + @endcomponent +{{ $errors->first('hours') }}
{{ $errors->first('image_link') }}
-