diff --git a/app/helpers.php b/app/helpers.php index bbb3a6be..70ab3394 100644 --- a/app/helpers.php +++ b/app/helpers.php @@ -41,8 +41,12 @@ if(!function_exists('show_datetime')) { * @param \Carbon\Carbon $date * @return string */ - function show_datetime(\Carbon\Carbon $date) + function show_datetime(\Carbon\Carbon $date=null) { + if(empty($date)) { + return '-'; + } + $timezone = 'UTC'; if (Auth::check()) { $timezone = Auth::user()->timezone ?: $timezone; diff --git a/public/assets/admin/js/admin.js b/public/assets/admin/js/admin.js index 7718579d..d2ef127a 100644 --- a/public/assets/admin/js/admin.js +++ b/public/assets/admin/js/admin.js @@ -2,15 +2,3 @@ * admin functions, mostly map/mapping related */ -function phpvms_vacentral_airport_lookup(icao, callback) { - $.ajax({ - url: '/api/airports/' + icao + '/lookup', - method: 'GET', - headers: { - 'x-api-key': PHPVMS_USER_API_KEY - } - }).done(function (data, status) { - callback(data.data); - }); -} - diff --git a/resources/views/admin/airports/script.blade.php b/resources/views/admin/airports/script.blade.php index 2eb94e25..c90f4bce 100644 --- a/resources/views/admin/airports/script.blade.php +++ b/resources/views/admin/airports/script.blade.php @@ -1,5 +1,16 @@ @section('scripts')