Skip to content

Commit

Permalink
Show schedules till they are completed
Browse files Browse the repository at this point in the history
Currently schedules are shown on the status page when they are in the status upcoming or in progress. But, when the scheduled time is in the past - it's hidden, even when it's still going on.

This PR fixes this issue by hiding the maintenance when it's in the status completed, or the completed time has passed.
  • Loading branch information
Wouter0100 committed Sep 6, 2018
1 parent a740d5c commit 9b4e8c1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/Models/Schedule.php
Expand Up @@ -176,7 +176,7 @@ public function scopeInProgress(Builder $query)
*/
public function scopeFutureSchedules($query)
{
return $query->whereIn('status', [self::UPCOMING, self::IN_PROGRESS])->where('scheduled_at', '>=', Carbon::now());
return $query->whereIn('status', [self::UPCOMING, self::IN_PROGRESS])->where('completed_at', '>=', Carbon::now());
}

/**
Expand Down

0 comments on commit 9b4e8c1

Please sign in to comment.