This commit is contained in:
root
2018-04-27 18:08:04 +01:00
parent 7d9fbb843a
commit aadbe9be40

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();