Change Airport tz field to timezone
This commit is contained in:
parent
c6b1a475e9
commit
1cc999a4f9
@ -14,7 +14,7 @@ class CreateAirportsTable extends Migration
|
||||
$table->string('name', 100);
|
||||
$table->string('location', 100)->nullable();
|
||||
$table->string('country', 64)->nullable();
|
||||
$table->string('tz', 64)->nullable();
|
||||
$table->string('timezone', 64)->nullable();
|
||||
$table->boolean('hub')->default(false);
|
||||
$table->unsignedDecimal('fuel_100ll_cost', 8)->nullable()->default(0);
|
||||
$table->unsignedDecimal('fuel_jeta_cost', 8)->nullable()->default(0);
|
||||
|
@ -90,8 +90,8 @@ class Airport extends BaseModel
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getTimezoneAttribute(): string
|
||||
public function getTzAttribute(): string
|
||||
{
|
||||
return $this->tz;
|
||||
return $this->timezone;
|
||||
}
|
||||
}
|
||||
|
@ -54,9 +54,9 @@
|
||||
</div>
|
||||
|
||||
<div class="form-group col-sm-6">
|
||||
{!! Form::label('tz', 'Timezone:') !!}
|
||||
{!! Form::select('tz', $timezones, null, ['class' => 'select2']); !!}
|
||||
<p class="text-danger">{{ $errors->first('tz') }}</p>
|
||||
{!! Form::label('timezone', 'Timezone:') !!}
|
||||
{!! Form::select('timezone', $timezones, null, ['class' => 'select2']); !!}
|
||||
<p class="text-danger">{{ $errors->first('timezone') }}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -46,8 +46,8 @@ $(document).ready(function() {
|
||||
|
||||
$("#" + key).val(value);
|
||||
|
||||
if(key === 'tz') {
|
||||
$("#tz").trigger('change');
|
||||
if(key === 'timezone') {
|
||||
$("#timezone").trigger('change');
|
||||
}
|
||||
});
|
||||
});
|
||||
|
@ -52,7 +52,7 @@
|
||||
['type' => 'submit',
|
||||
'class' => 'btn btn-success btn-s']) !!}
|
||||
<p class="text-danger">{{ $errors->first('name') }}</p>
|
||||
<p class="text-danger">{{ $errors->first('tz') }}</p>
|
||||
<p class="text-danger">{{ $errors->first('value') }}</p>
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user