0d1f38cf85
* Refactor all JS API calls #360 * Remove unused imports * Lint JS * Fix doubled api key * Formatting * Added extra logging to distance lookup * Remove the .editorconfig file in distrib * shell check fixes * Remove the .editorconfig file in distrib
17 lines
450 B
PHP
17 lines
450 B
PHP
@section('scripts')
|
|
<script>
|
|
const select_id = "select#aircraft_select";
|
|
const destContainer = $('#fares_container');
|
|
|
|
$(select_id).change(e => {
|
|
const aircraft_id = $(select_id + ' option:selected').val();
|
|
const url = '/pireps/fares?aircraft_id=' + aircraft_id;
|
|
console.log('aircraft select change: ', aircraft_id);
|
|
|
|
phpvms.request(url).then(response => {
|
|
destContainer.html(response.data);
|
|
});
|
|
});
|
|
</script>
|
|
@endsection
|