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