Merge pull request #3031 from farhank3389/2.4

forward button now shows properly.
This commit is contained in:
James Brooks 2018-04-27 19:30:50 +01:00 committed by GitHub
commit db8874c5ad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -96,7 +96,7 @@ class StatusPageController extends AbstractApiController
} else {
$date = Date::now();
$canPageForward = (bool) $startDate->gt($date);
$canPageForward = (bool) $startDate->lt($date->sub('1 day'));
$canPageBackward = Incident::where('occurred_at', '<', $date->format('Y-m-d'))->count() > 0;
$previousDate = $date->copy()->subDays($appIncidentDays)->toDateString();
$nextDate = $date->copy()->addDays($appIncidentDays)->toDateString();