added a check if the task has run yet (#385)

* added a null check on the last_run

* corrected a mistake made when changing the file

* another mistake :/

* changed to be less specific and so it checks against the value instead of >
This commit is contained in:
kasper Franz 2017-04-17 18:03:11 +02:00 committed by Dane Everitt
parent f59e4e0b68
commit 2006920427
3 changed files with 10 additions and 1 deletions

View File

@ -5,7 +5,9 @@ This project follows [Semantic Versioning](http://semver.org) guidelines.
## v0.6.0-beta.3 (Courageous Carniadactylus)
### Fixed
* `[beta.2]` — Corrected the information when a task has not run yet.
* `[beta.2]` — Fixes filemanager 404 when editing a file within a directory.
* `[beta.2]` — Fixes exception in tasks when deleting a server.
## v0.6.0-beta.2 (Courageous Carniadactylus)
### Fixed

View File

@ -57,6 +57,7 @@ return [
'queued' => 'Queued',
'last_run' => 'Last Run',
'next_run' => 'Next Run',
'not_run_yet' => 'Not Run Yet',
'yes' => 'Yes',
'no' => 'No',
'delete' => 'Delete',

View File

@ -65,7 +65,13 @@
<span class="label label-default">@lang('strings.no')</span>
@endif
</td>
<td class="middle">{{ Carbon::parse($task->last_run)->toDayDateTimeString() }}<br /><span class="text-muted small">({{ Carbon::parse($task->last_run)->diffForHumans() }})</span></td>
<td class="middle">
@if($task->last_run)
{{ Carbon::parse($task->last_run)->toDayDateTimeString() }}<br /><span class="text-muted small">({{ Carbon::parse($task->last_run)->diffForHumans() }})</span>
@else
@lang('strings.not_run_yet')
@endif
</td>
<td class="middle">
@if($task->active !== 0)
{{ Carbon::parse($task->next_run)->toDayDateTimeString() }}<br /><span class="text-muted small">({{ Carbon::parse($task->next_run)->diffForHumans() }})</span>