Change setting name for pilot flight restriction; some cosmetics
This commit is contained in:
parent
4272946dba
commit
61ea069481
2
Procfile
2
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
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -2,17 +2,20 @@
|
||||
<div class="card border-blue-bottom">
|
||||
<div class="card-block" style="min-height: 0px">
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<div class="col-sm-9">
|
||||
<h5>
|
||||
<a class="text-c" href="{!! route('frontend.flights.show', [$flight->id]) !!}">
|
||||
{!! $flight->airline->code !!}{!! $flight->flight_number !!}
|
||||
@if($flight->route_code)
|
||||
(C: {!! $flight->route_code !!} L: {!! $flight->route_leg !!})
|
||||
Code: {!! $flight->route_code !!}
|
||||
@endif
|
||||
@if($flight->route_leg)
|
||||
Leg: {!! $flight->route_leg !!}
|
||||
@endif
|
||||
</a>
|
||||
</h5>
|
||||
</div>
|
||||
<div class="col-sm-9 text-sm-right">
|
||||
<div class="col-sm-3 text-right">
|
||||
<!-- use for saved: btn-outline-primary -->
|
||||
<button class="btn btn-icon btn-icon-mini btn-round
|
||||
{{ in_array($flight->id, $saved) ? 'btn-danger':'' }}
|
||||
@ -20,8 +23,8 @@
|
||||
<i class="now-ui-icons ui-2_favourite-28"></i>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
|
Loading…
Reference in New Issue
Block a user