From 50abda71cb6298a0401bcf367981dc6f3ec89a8c Mon Sep 17 00:00:00 2001 From: Nabeel Shahzad Date: Mon, 30 Apr 2018 17:51:18 -0500 Subject: [PATCH] Fix if submitted_at blank --- app/Database/seeds/sample.yml | 21 ++++++++++++++++++- .../layouts/default/pireps/table.blade.php | 4 +++- 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/app/Database/seeds/sample.yml b/app/Database/seeds/sample.yml index 2de43b63..95cd35a1 100644 --- a/app/Database/seeds/sample.yml +++ b/app/Database/seeds/sample.yml @@ -182,7 +182,26 @@ airports: lat: 19.2928 lon: -81.3577 ground_handling_cost: 50 - + - id: OMDB + iata: DXB + icao: OMDB + name: Dubai International Airport + location: Dubai, UAE + country: + timezone: Asia/Dubai + lat: 25.2528 + lon: 55.3644 + ground_handling_cost: 50 + - id: LOWW + iata: VIE + icao: LOWW + name: Vienna International Airport + location: Vienna + country: Austria + timezone: Europe/Vienna + lat: 48.1103 + lon: 16.5697 + ground_handling_cost: 50 # aircraft: - id: 1 diff --git a/resources/views/layouts/default/pireps/table.blade.php b/resources/views/layouts/default/pireps/table.blade.php index eb5db7a1..11510201 100644 --- a/resources/views/layouts/default/pireps/table.blade.php +++ b/resources/views/layouts/default/pireps/table.blade.php @@ -50,7 +50,9 @@ {{ PirepState::label($pirep->state) }} - {{ $pirep->submitted_at->diffForHumans() }} + @if(filled($pirep->submitted_at)) + {{ $pirep->submitted_at->diffForHumans() }} + @endif @if(!$pirep->read_only)