diff --git a/Procfile b/Procfile index dd368790..1729d537 100644 --- a/Procfile +++ b/Procfile @@ -1,5 +1,5 @@ dnsmasq: /usr/local/sbin/dnsmasq --keep-in-foreground php-fpm: /usr/local/sbin/php-fpm --nodaemonize nginx: /usr/local/bin/nginx -#mysql: /usr/local/bin/mysqld +mysql: /usr/local/bin/mysqld mailhog: /usr/local/bin/mailhog diff --git a/app/Database/migrations/2017_06_07_014930_create_settings_table.php b/app/Database/migrations/2017_06_07_014930_create_settings_table.php index c0a51307..7099ced9 100644 --- a/app/Database/migrations/2017_06_07_014930_create_settings_table.php +++ b/app/Database/migrations/2017_06_07_014930_create_settings_table.php @@ -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'), diff --git a/app/Database/migrations/2017_06_17_214650_create_flight_tables.php b/app/Database/migrations/2017_06_17_214650_create_flight_tables.php index 454baeb9..129ac182 100644 --- a/app/Database/migrations/2017_06_17_214650_create_flight_tables.php +++ b/app/Database/migrations/2017_06_17_214650_create_flight_tables.php @@ -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'); diff --git a/app/Database/seeds/sample.yml b/app/Database/seeds/sample.yml index 722c13a2..7c086c11 100644 --- a/app/Database/seeds/sample.yml +++ b/app/Database/seeds/sample.yml @@ -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 diff --git a/app/Http/Controllers/Frontend/FlightController.php b/app/Http/Controllers/Frontend/FlightController.php index 5cf1434e..32398a33 100644 --- a/app/Http/Controllers/Frontend/FlightController.php +++ b/app/Http/Controllers/Frontend/FlightController.php @@ -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; } diff --git a/resources/views/layouts/default/flights/table.blade.php b/resources/views/layouts/default/flights/table.blade.php index 052de1a6..8491a616 100644 --- a/resources/views/layouts/default/flights/table.blade.php +++ b/resources/views/layouts/default/flights/table.blade.php @@ -2,17 +2,20 @@