Change setting name for pilot flight restriction; some cosmetics
This commit is contained in:
@@ -67,15 +67,6 @@ class CreateSettingsTable extends Migration
|
||||
'options' => 'dollar,euro,gbp,yen,jpy,rupee,ruble',
|
||||
'description' => 'Currency to show in the interface',
|
||||
],
|
||||
[
|
||||
'id' => $this->formatSettingId('flights.only_flights_from_current'),
|
||||
'order' => $this->getNextOrderNumber('flights'),
|
||||
'name' => 'Flights from Current',
|
||||
'group' => 'flights',
|
||||
'value' => true,
|
||||
'type' => 'boolean',
|
||||
'description' => 'Only allow flights from current location',
|
||||
],
|
||||
[
|
||||
'id' => $this->formatSettingId('bids.disable_flight_on_bid'),
|
||||
'order' => $this->getNextOrderNumber('bids'),
|
||||
@@ -133,6 +124,15 @@ class CreateSettingsTable extends Migration
|
||||
'type' => 'boolean',
|
||||
'description' => 'Automatically accept a pilot when they register',
|
||||
],
|
||||
[
|
||||
'id' => $this->formatSettingId('pilots.only_flights_from_current'),
|
||||
'order' => $this->getNextOrderNumber('pilots'),
|
||||
'name' => 'Flights from Current',
|
||||
'group' => 'pilots',
|
||||
'value' => false,
|
||||
'type' => 'boolean',
|
||||
'description' => 'Only show/allow flights from their current location',
|
||||
],
|
||||
[
|
||||
'id' => $this->formatSettingId('pilot.auto_leave_days'),
|
||||
'order' => $this->getNextOrderNumber('pilots'),
|
||||
|
||||
@@ -33,7 +33,7 @@ class CreateFlightTables extends Migration
|
||||
|
||||
$table->primary('id');
|
||||
|
||||
$table->unique('flight_number');
|
||||
#$table->unique('flight_number');
|
||||
|
||||
$table->index('flight_number');
|
||||
$table->index('dpt_airport_id');
|
||||
|
||||
@@ -249,6 +249,19 @@ flights:
|
||||
- id: flightid_2
|
||||
airline_id: 1
|
||||
flight_number: 6028
|
||||
route_code: A
|
||||
dpt_airport_id: KIAH
|
||||
arr_airport_id: KAUS
|
||||
dpt_time: 9AM CST
|
||||
arr_time: 1030AM CST
|
||||
route: PITZZ4 MNURE WLEEE4
|
||||
created_at: NOW
|
||||
updated_at: NOW
|
||||
- id: flightid_3
|
||||
airline_id: 1
|
||||
flight_number: 6028
|
||||
route_code: A
|
||||
route_leg: 1
|
||||
dpt_airport_id: KIAH
|
||||
arr_airport_id: KAUS
|
||||
dpt_time: 9AM CST
|
||||
|
||||
@@ -42,7 +42,7 @@ class FlightController extends AppBaseController
|
||||
$where = ['active' => true];
|
||||
|
||||
// default restrictions on the flights shown. Handle search differently
|
||||
if (setting('flights.only_flights_from_current')) {
|
||||
if (setting('pilots.only_flights_from_current')) {
|
||||
$where['dpt_airport_id'] = Auth::user()->curr_airport_id;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user